stm 2.1.1.0 → 2.1.1.2
raw patch · 3 files changed
+40/−14 lines, 3 filesdep ~basenew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- Control/Concurrent/STM/TMVar.hs +1/−1
- Control/Sequential/STM.hs +13/−0
- stm.cabal +26/−13
Control/Concurrent/STM/TMVar.hs view
@@ -15,7 +15,7 @@ module Control.Concurrent.STM.TMVar ( #ifdef __GLASGOW_HASKELL__- -- * TVars+ -- * TMVars TMVar, newTMVar, newEmptyTMVar,
Control/Sequential/STM.hs view
@@ -27,15 +27,28 @@ x <- m r unSTM (k x) r +#ifdef BASE4 atomically :: STM a -> IO a atomically (STM m) = do r <- newIORef (return ())+ m r `onException` do+ rollback <- readIORef r+ rollback+#else+atomically :: STM a -> IO a+atomically (STM m) = do+ r <- newIORef (return ()) m r `catch` \ ex -> do rollback <- readIORef r rollback throw ex+#endif +#ifdef BASE4+catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a+#else catchSTM :: STM a -> (Exception -> STM a) -> STM a+#endif catchSTM (STM m) h = STM $ \ r -> do old_rollback <- readIORef r writeIORef r (return ())
stm.cabal view
@@ -1,19 +1,32 @@ name: stm-version: 2.1.1.0+version: 2.1.1.2 license: BSD3 license-file: LICENSE maintainer: libraries@haskell.org synopsis: Software Transactional Memory+category: Concurrency description: A modular composable concurrency abstraction.--- these are the modules exposed by the cut-down non-GHC interface.-exposed-modules:- Control.Concurrent.STM- Control.Concurrent.STM.TArray- Control.Concurrent.STM.TVar- Control.Concurrent.STM.TChan- Control.Concurrent.STM.TMVar- Control.Monad.STM-other-modules:- Control.Sequential.STM-build-depends: base, array-extensions: CPP+build-type: Simple+cabal-version: >=1.2++flag base4++library+ exposed-modules:+ Control.Concurrent.STM+ Control.Concurrent.STM.TArray+ Control.Concurrent.STM.TVar+ Control.Concurrent.STM.TChan+ Control.Concurrent.STM.TMVar+ Control.Monad.STM+ other-modules:+ Control.Sequential.STM+ build-depends: base < 5, array+ if flag(base4)+ build-depends: base >=4+ cpp-options: -DBASE4+ else+ build-depends: base <4+ if impl(ghc >= 6.10)+ build-depends: base >=4+ extensions: CPP