Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions happstack-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Library
network-uri >= 2.6 && < 2.7
else
build-depends: network < 2.6
Build-Depends: base >= 4 && < 5,
Build-Depends: base >= 4.8 && < 5,
base64-bytestring >= 1.0 && < 1.3,
blaze-html >= 0.5 && < 0.10,
bytestring,
Expand Down Expand Up @@ -138,7 +138,7 @@ Test-Suite happstack-server-tests
GHC-Options: -threaded
hs-source-dirs: tests
Build-depends: HUnit,
base >= 4 && < 5,
base >= 4.8 && < 5,
bytestring,
containers,
happstack-server,
Expand Down
8 changes: 3 additions & 5 deletions src/Happstack/Server/Internal/Monads.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import Happstack.Server.Internal.RFC822Headers (parseContentType)
import Happstack.Server.Internal.Types (EscapeHTTP(..), canHaveBody)
import Happstack.Server.Internal.TimeoutIO (TimeoutIO)
import Happstack.Server.Types
import Prelude (Bool(..), Either(..), Eq(..), Functor(..), IO, Monad(..), Char, Maybe(..), String, Show(..), ($), (.), (>), (++), (&&), (||), (=<<), const, concatMap, flip, id, otherwise, zip)
import Prelude (Bool(..), Either(..), Eq(..), Functor(..), IO, Monad(..), return, (>>), Char, Maybe(..), String, Show(..), ($), (.), (>), (++), (&&), (||), (=<<), const, concatMap, flip, id, otherwise, zip)

-- | An alias for 'WebT' when using 'IO'.
type Web a = WebT IO a
Expand Down Expand Up @@ -194,7 +194,7 @@ instance (Monad m, MonadPlus m) => Monoid (ServerPartT m a) where
mappend = (SG.<>)

instance (Monad m, Functor m) => Applicative (ServerPartT m) where
pure = return
pure a = ServerPartT $ pure a
(<*>) = ap

instance (Functor m, MonadPlus m) => Alternative (ServerPartT m) where
Expand Down Expand Up @@ -477,8 +477,6 @@ type UnWebT m a = m (Maybe (Either Response a, FilterFun Response))
instance Monad m => Monad (WebT m) where
m >>= f = WebT $ unWebT m >>= unWebT . f
{-# INLINE (>>=) #-}
return a = WebT $ return a
{-# INLINE return #-}

#if MIN_VERSION_base(4,9,0)
instance MonadFail m => MonadFail (WebT m) where
Expand Down Expand Up @@ -567,7 +565,7 @@ localContext fn hs
= withRequest $ \rq -> fn (runServerPartT hs rq)

instance (Monad m, Functor m) => Applicative (WebT m) where
pure = return
pure a = WebT $ pure a
(<*>) = ap

instance (Functor m, MonadPlus m) => Alternative (WebT m) where
Expand Down
2 changes: 1 addition & 1 deletion src/Happstack/Server/RqData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ instance (Monoid e) => Applicative (ReaderError r e) where
#else
instance (Monoid e, DeprecatedError.Error e) => Applicative (ReaderError r e) where
#endif
pure = return
pure a = ReaderError $ pure a
(ReaderError (ReaderT f)) <*> (ReaderError (ReaderT a))
= ReaderError $ ReaderT $ \env -> (f env) `apEither` (a env)

Expand Down
Loading