happstack-server 7.3.9 → 7.4.0
raw patch · 2 files changed
+41/−43 lines, 2 filesdep ~monad-controlPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: monad-control
API changes (from Hackage documentation)
Files
- happstack-server.cabal +19/−21
- src/Happstack/Server/Internal/Monads.hs +22/−22
happstack-server.cabal view
@@ -1,5 +1,5 @@ Name: happstack-server-Version: 7.3.9+Version: 7.4.0 Synopsis: Web related tools and services. Description: Happstack Server provides an HTTP server and a rich set of functions for routing requests, handling query parameters, generating responses, working with cookies, serving files, and more. For in-depth documentation see the Happstack Crash Course <http://happstack.com/docs/crashcourse/index.html> License: BSD3@@ -13,9 +13,8 @@ Extra-Source-Files: tests/Happstack/Server/Tests.hs source-repository head- type: darcs- subdir: happstack-server- location: http://hub.darcs.net/stepcut/happstack+ type: git+ location: https://github.com/Happstack/happstack-server.git Flag template_haskell Description: Template Haskell is available on this system@@ -69,35 +68,35 @@ Paths_happstack_server if flag(network-uri)- build-depends: network > 2.6 && < 2.7,+ build-depends: network > 2.6 && < 2.7, network-uri >= 2.6 && < 2.7 else- build-depends: network < 2.6- Build-Depends: base >= 4 && < 5,- base64-bytestring == 1.0.*,- blaze-html >= 0.5 && < 0.8,+ build-depends: network < 2.6+ Build-Depends: base >= 4 && < 5,+ base64-bytestring == 1.0.*,+ blaze-html >= 0.5 && < 0.8, bytestring, containers, directory, extensible-exceptions, filepath,- hslogger >= 1.0.2,+ hslogger >= 1.0.2, html,- monad-control >= 0.3 && < 0.4,- mtl >= 2 && < 2.3,+ monad-control >= 1.0 && < 1.1,+ mtl >= 2 && < 2.3, old-locale,- parsec < 4,+ parsec < 4, process,- sendfile >= 0.7.1 && < 0.8,- system-filepath >= 0.3.1,+ sendfile >= 0.7.1 && < 0.8,+ system-filepath >= 0.3.1, syb,- text >= 0.10 && < 1.3,+ text >= 0.10 && < 1.3, time, time-compat,- threads >= 0.5,- transformers >= 0.1.3 && < 0.5,- transformers-base >= 0.4 && < 0.5,- utf8-string >= 0.3.4 && < 0.4,+ threads >= 0.5,+ transformers >= 0.1.3 && < 0.5,+ transformers-base >= 0.4 && < 0.5,+ utf8-string >= 0.3.4 && < 0.4, xhtml, zlib @@ -138,4 +137,3 @@ happstack-server, parsec < 4, zlib-
src/Happstack/Server/Internal/Monads.hs view
@@ -66,16 +66,16 @@ {-# INLINE liftIO #-} instance MonadTransControl ServerPartT where- newtype StT ServerPartT a = StSP {unStSP :: StT WebT (StT (ReaderT Request) a)}+ type StT ServerPartT a = StT WebT (StT (ReaderT Request) a) liftWith f = ServerPartT $ liftWith $ \runReader -> liftWith $ \runWeb ->- f $ liftM StSP . runWeb . runReader . unServerPartT- restoreT = ServerPartT . restoreT . restoreT . liftM unStSP+ f $ runWeb . runReader . unServerPartT+ restoreT = ServerPartT . restoreT . restoreT instance MonadBaseControl b m => MonadBaseControl b (ServerPartT m) where- newtype StM (ServerPartT m) a = StMSP {unStMSP :: ComposeSt ServerPartT m a}- liftBaseWith = defaultLiftBaseWith StMSP- restoreM = defaultRestoreM unStMSP+ type StM (ServerPartT m) a = ComposeSt ServerPartT m a+ liftBaseWith = defaultLiftBaseWith+ restoreM = defaultRestoreM -- | Particularly useful when combined with 'runWebT' to produce -- a @m ('Maybe' 'Response')@ from a 'Request'.@@ -259,14 +259,14 @@ {-# INLINE liftIO #-} instance MonadTransControl (FilterT a) where- newtype StT (FilterT a) b = StFilter {unStFilter :: StT (Lazy.WriterT (FilterFun a)) b}- liftWith f = FilterT $ liftWith $ \run -> f $ liftM StFilter . run . unFilterT- restoreT = FilterT . restoreT . liftM unStFilter+ type StT (FilterT a) b = StT (Lazy.WriterT (FilterFun a)) b+ liftWith f = FilterT $ liftWith $ \run -> f $ run . unFilterT+ restoreT = FilterT . restoreT instance MonadBaseControl b m => MonadBaseControl b (FilterT a m) where- newtype StM (FilterT a m) c = StMFilter {unStMFilter :: ComposeSt (FilterT a) m c}- liftBaseWith = defaultLiftBaseWith StMFilter- restoreM = defaultRestoreM unStMFilter+ type StM (FilterT a m) c = ComposeSt (FilterT a) m c+ liftBaseWith = defaultLiftBaseWith+ restoreM = defaultRestoreM -- | A set of functions for manipulating filters. --@@ -312,21 +312,21 @@ {-# INLINE liftIO #-} instance MonadTransControl WebT where- newtype StT WebT a = StWeb {unStWeb :: StT MaybeT- (StT (FilterT Response)- (StT (ErrorT Response) a))}+ type StT WebT a = StT MaybeT+ (StT (FilterT Response)+ (StT (ErrorT Response) a)) liftWith f = WebT $ liftWith $ \runError -> liftWith $ \runFilter -> liftWith $ \runMaybe ->- f $ liftM StWeb . runMaybe .- runFilter .- runError . unWebT- restoreT = WebT . restoreT . restoreT . restoreT . liftM unStWeb+ f $ runMaybe .+ runFilter .+ runError . unWebT+ restoreT = WebT . restoreT . restoreT . restoreT instance MonadBaseControl b m => MonadBaseControl b (WebT m) where- newtype StM (WebT m) a = StMWeb {unStMWeb :: ComposeSt WebT m a}- liftBaseWith = defaultLiftBaseWith StMWeb- restoreM = defaultRestoreM unStMWeb+ type StM (WebT m) a = ComposeSt WebT m a+ liftBaseWith = defaultLiftBaseWith+ restoreM = defaultRestoreM -- | 'UnWebT' is almost exclusively used with 'mapServerPartT'. If you -- are not using 'mapServerPartT' then you do not need to wrap your