packages feed

concurrency 1.8.0.0 → 1.8.1.0

raw patch · 3 files changed

+28/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Monad.Conc.Class: newTVarConc :: MonadConc m => a -> m (TVar (STM m) a)

Files

CHANGELOG.rst view
@@ -7,6 +7,19 @@ .. _PVP: https://pvp.haskell.org/  +1.8.1.0 (2019-11-16)+====================++* Git: :tag:`concurrency-1.8.1.0`+* Hackage: :hackage:`concurrency-1.8.1.0`++Added+~~~~~++* (:issue:`303`) ``Control.Monad.Conc.Class.newTVarConc``, with a+  default implementation of ``atomically . newTVar``.++ 1.8.0.0 (2019-10-04) -------------------- 
Control/Monad/Conc/Class.hs view
@@ -9,7 +9,7 @@  -- | -- Module      : Control.Monad.Conc.Class--- Copyright   : (c) 2016--2018 Michael Walker+-- Copyright   : (c) 2016--2019 Michael Walker -- License     : MIT -- Maintainer  : Michael Walker <mike@barrucadu.co.uk> -- Stability   : experimental@@ -97,7 +97,7 @@ import qualified Control.Monad.Catch          as Ca import           Control.Monad.Fail           (MonadFail(..)) import           Control.Monad.STM.Class      (IsSTM, MonadSTM, TVar, fromIsSTM,-                                               readTVar)+                                               newTVar, readTVar) import           Control.Monad.Trans.Control  (MonadTransControl, StT, liftWith) import           Data.Proxy                   (Proxy(..)) @@ -472,6 +472,14 @@   -- @since 1.0.0.0   atomically :: STM m a -> m a +  -- | Create a @TVar@. This may be implemented differently for speed.+  --+  -- > newTVarConc = atomically . newTVar+  --+  -- @since 1.8.1.0+  newTVarConc :: a -> m (TVar (STM m) a)+  newTVarConc = atomically . newTVar+   -- | Read the current value stored in a @TVar@. This may be   -- implemented differently for speed.   --@@ -774,6 +782,7 @@   casIORef            = IO.casIORef   modifyIORefCAS      = IO.atomicModifyIORefCAS   atomically          = IO.atomically+  newTVarConc         = IO.newTVarIO   readTVarConc        = IO.readTVarIO  -- | Label the current thread, if the given label is nonempty.@@ -852,6 +861,7 @@   modifyIORefCAS r    = toIsConc . modifyIORefCAS r   modifyIORefCAS_ r   = toIsConc . modifyIORefCAS_ r   atomically          = toIsConc . atomically . fromIsSTM+  newTVarConc         = toIsConc . newTVarConc   readTVarConc        = toIsConc . readTVarConc  -------------------------------------------------------------------------------@@ -901,6 +911,7 @@   modifyIORefCAS r    = lift . modifyIORefCAS r                ; \   modifyIORefCAS_ r   = lift . modifyIORefCAS_ r               ; \   atomically          = lift . atomically                      ; \+  newTVarConc         = lift . newTVarConc                     ; \   readTVarConc        = lift . readTVarConc                    }  -- | New threads inherit the reader state of their parent, but do not
concurrency.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                concurrency-version:             1.8.0.0+version:             1.8.1.0 synopsis:            Typeclasses, functions, and data types for concurrency and STM.  description:@@ -32,7 +32,7 @@ source-repository this   type:     git   location: https://github.com/barrucadu/dejafu.git-  tag:      concurrency-1.8.0.0+  tag:      concurrency-1.8.1.0  library   exposed-modules:     Control.Monad.Conc.Class