happstack-state 6.1.0 → 6.1.1
raw patch · 2 files changed
+19/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- happstack-state.cabal +1/−1
- src/Happstack/State/Monad.hs +18/−3
happstack-state.cabal view
@@ -1,5 +1,5 @@ Name: happstack-state-Version: 6.1.0+Version: 6.1.1 Synopsis: Event-based distributed state. Description: Unplug your machine and restart and have your app recover to exactly where it left off. Happstack-State spares you the need to deal with all the marshalling, consistency, and configuration headache that you would have if you used an external DBMS for this purpose. Its component model makes it easy to compose big applications from smaller reliable parts. Use event subscription to trigger IO actions and support comet-style or irc-bot applications. License: BSD3
src/Happstack/State/Monad.hs view
@@ -72,11 +72,26 @@ liftSTM :: STM a -> AnyEv a liftSTM = unsafeSTMToEv +{-+In stm >= 2.2.0.1 catchSTM always has the type:++catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a++In earlier versions of stm the type of catchSTM depends on what is exported by GHC.Conc.catchSTM from base.+-} class CatchEv m where-#if __GLASGOW_HASKELL__ < 610- catchEv :: Ev m a -> (Exception -> a) -> Ev m a+#if (MIN_VERSION_stm(2,2,0))+ catchEv :: (Exception e) => Ev m a -> (e -> a) -> Ev m a #else- catchEv :: Exception e => Ev m a -> (e -> a) -> Ev m a+#if (MIN_VERSION_base(4,3,0))+ catchEv :: (Exception e) => Ev m a -> (e -> a) -> Ev m a+#else+#if (MIN_VERSION_base(4,0,0))+ catchEv :: Ev m a -> (SomeException -> a) -> Ev m a+#else+ catchEv :: Ev m a -> (Exception -> a) -> Ev m a+#endif+#endif #endif instance CatchEv (ReaderT st STM) where catchEv (Ev cmd) fun = Ev $ \s -> ReaderT $ \r -> runReaderT (cmd s) r `catchSTM` (\a -> return (fun a))