Hoogle Search
Within LTS Haskell 24.18 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
modifyTVar' :: MonadSTM stm => TVar stm a -> (a -> a) -> stm ()concurrency Control.Concurrent.Classy.STM.TVar Mutate the contents of a TVar strictly.
newTVar :: MonadSTM stm => a -> stm (TVar stm a)concurrency Control.Concurrent.Classy.STM.TVar Create a new TVar containing the given value.
newTVar = newTVarN ""
newTVarN :: MonadSTM stm => String -> a -> stm (TVar stm a)concurrency Control.Concurrent.Classy.STM.TVar Create a new TVar containing the given value, but it is given a name which may be used to present more useful debugging information. If an empty name is given, a counter starting from 0 is used. If names conflict, successive TVars with the same name are given a numeric suffix, counting up from 1.
newTVarN _ = newTVar
readTVar :: MonadSTM stm => TVar stm a -> stm aconcurrency Control.Concurrent.Classy.STM.TVar Return the current value stored in a TVar.
readTVarConc :: MonadConc m => TVar (STM m) a -> m aconcurrency Control.Concurrent.Classy.STM.TVar Read the current value stored in a TVar. This may be implemented differently for speed.
readTVarConc = atomically . readTVar
stateTVar :: MonadSTM stm => TVar stm s -> (s -> (a, s)) -> stm aconcurrency Control.Concurrent.Classy.STM.TVar Like modifyTVar' but the function is a simple state transition that can return a side value which is passed on as the result of the STM.
swapTVar :: MonadSTM stm => TVar stm a -> a -> stm aconcurrency Control.Concurrent.Classy.STM.TVar Swap the contents of a TVar, returning the old value.
writeTVar :: MonadSTM stm => TVar stm a -> a -> stm ()concurrency Control.Concurrent.Classy.STM.TVar Write the supplied value into the TVar.
newTVarConc :: MonadConc m => a -> m (TVar (STM m) a)concurrency Control.Monad.Conc.Class Create a TVar. This may be implemented differently for speed.
newTVarConc = atomically . newTVar
readTVarConc :: MonadConc m => TVar (STM m) a -> m aconcurrency Control.Monad.Conc.Class Read the current value stored in a TVar. This may be implemented differently for speed.
readTVarConc = atomically . readTVar