Spock 0.7.5.1 → 0.7.5.2
raw patch · 2 files changed
+10/−1 lines, 2 filesdep ~monad-controlPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: monad-control
API changes (from Hackage documentation)
Files
- Spock.cabal +1/−1
- src/Web/Spock/Internal/Types.hs +9/−0
Spock.cabal view
@@ -1,5 +1,5 @@ name: Spock-version: 0.7.5.1+version: 0.7.5.2 synopsis: Another Haskell web framework for rapid development description: This toolbox provides everything you need to get a quick start into web hacking with haskell: fast routing, middleware, json, blaze, sessions, cookies, database helper, csrf-protection Homepage: https://github.com/agrafix/Spock
src/Web/Spock/Internal/Types.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE CPP #-} module Web.Spock.Internal.Types where import Web.Spock.Internal.CoreAction@@ -112,8 +113,16 @@ instance MonadBase IO (WebStateM conn sess st) where liftBase = WebStateM . liftBase +#if MIN_VERSION_monad_control(1,0,0)+newtype WStM conn sess st a = WStM { unWStM :: StM (ReaderT (WebState conn sess st) (ResourceT IO)) a }+#endif+ instance MonadBaseControl IO (WebStateM conn sess st) where+#if MIN_VERSION_monad_control(1,0,0)+ type StM (WebStateM conn sess st) a = WStM conn sess st a+#else newtype StM (WebStateM conn sess st) a = WStM { unWStM :: StM (ReaderT (WebState conn sess st) (ResourceT IO)) a }+#endif liftBaseWith f = WebStateM . liftBaseWith $ \runInBase -> f $ liftM WStM . runInBase . runWebStateM restoreM = WebStateM . restoreM . unWStM