| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Util.MonadSTM.NormalForm
Contents
Synopsis
- checkInvariant :: HasCallStack => Maybe String -> a -> a
- isEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m Bool
- swapTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m a
- tryReadTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a)
- readTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m a
- tryPutTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m Bool
- putTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m ()
- tryTakeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a)
- takeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m a
- newEmptyTMVarM :: MonadSTM m => m (StrictTMVar m a)
- newEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => STM m (StrictTMVar m a)
- newTMVarM :: MonadSTM m => a -> m (StrictTMVar m a)
- castStrictTMVar :: forall (m :: Type -> Type) (n :: Type -> Type) a. LazyTMVar m ~ LazyTMVar n => StrictTMVar m a -> StrictTMVar n a
- updateTVar :: forall (m :: Type -> Type) a b. MonadSTM m => StrictTVar m a -> (a -> (a, b)) -> STM m b
- stateTVar :: forall (m :: Type -> Type) a b. MonadSTM m => StrictTVar m a -> (a -> (a, b)) -> STM m b
- modifyTVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTVar m a -> (a -> a) -> STM m ()
- writeTVar :: forall (m :: Type -> Type) a. (MonadSTM m, HasCallStack) => StrictTVar m a -> a -> STM m ()
- readTVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTVar m a -> STM m a
- newTVarWithInvariantM :: (MonadSTM m, HasCallStack) => (a -> Maybe String) -> a -> m (StrictTVar m a)
- newTVarM :: MonadSTM m => a -> m (StrictTVar m a)
- toLazyTVar :: forall (m :: Type -> Type) a. StrictTVar m a -> LazyTVar m a
- castStrictTVar :: forall (m :: Type -> Type) (n :: Type -> Type) a. LazyTVar m ~ LazyTVar n => StrictTVar m a -> StrictTVar n a
- type LazyTVar (m :: Type -> Type) = TVar m
- type LazyTMVar (m :: Type -> Type) = TMVar m
- data StrictTVar (m :: Type -> Type) a
- data StrictTMVar (m :: Type -> Type) a
- catchSTM :: (MonadSTMTx stm, MonadCatch stm, Exception e) => stm a -> (e -> stm a) -> stm a
- throwSTM :: (MonadSTMTx stm, MonadThrow stm, Exception e) => e -> stm a
- flushTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m [a]
- lengthTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m Natural
- isFullTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m Bool
- isEmptyTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m Bool
- writeTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> a -> STM m ()
- tryReadTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTMTx (STM m) => TBQueueDefault m a -> STM m (Maybe a)
- readTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m a
- newTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => Natural -> STM m (TBQueueDefault m a)
- isEmptyTQueueDefault :: forall (m :: Type -> Type) a. MonadSTMTx (STM m) => TQueueDefault m a -> STM m Bool
- tryReadTQueueDefault :: forall (m :: Type -> Type) a. MonadSTMTx (STM m) => TQueueDefault m a -> STM m (Maybe a)
- readTQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TQueueDefault m a -> STM m a
- writeTQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TQueueDefault m a -> a -> STM m ()
- newTQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => STM m (TQueueDefault m a)
- isEmptyTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m Bool
- swapTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> a -> STM m a
- tryReadTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m (Maybe a)
- readTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m a
- tryPutTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> a -> STM m Bool
- putTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> a -> STM m ()
- tryTakeTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m (Maybe a)
- takeTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m a
- newEmptyTMVarMDefault :: MonadSTM m => m (TMVarDefault m a)
- newEmptyTMVarIODefault :: MonadSTM m => m (TMVarDefault m a)
- newEmptyTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => STM m (TMVarDefault m a)
- newTMVarMDefault :: MonadSTM m => a -> m (TMVarDefault m a)
- newTMVarIODefault :: MonadSTM m => a -> m (TMVarDefault m a)
- newTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => a -> STM m (TMVarDefault m a)
- type family TBQueue_ (stm :: Type -> Type) :: Type -> Type
- type family TQueue_ (stm :: Type -> Type) :: Type -> Type
- type family TMVar_ (stm :: Type -> Type) :: Type -> Type
- type family TVar_ (stm :: Type -> Type) :: Type -> Type
- class (Monad stm, Alternative stm, MonadPlus stm) => MonadSTMTx (stm :: Type -> Type) where
- type TVar_ (stm :: Type -> Type) :: Type -> Type
- type TMVar_ (stm :: Type -> Type) :: Type -> Type
- type TQueue_ (stm :: Type -> Type) :: Type -> Type
- type TBQueue_ (stm :: Type -> Type) :: Type -> Type
- retry :: stm a
- orElse :: stm a -> stm a -> stm a
- modifyTVar' :: TVar_ stm a -> (a -> a) -> stm ()
- check :: Bool -> stm ()
- newTQueue :: stm (TQueue_ stm a)
- readTQueue :: TQueue_ stm a -> stm a
- tryReadTQueue :: TQueue_ stm a -> stm (Maybe a)
- writeTQueue :: TQueue_ stm a -> a -> stm ()
- isEmptyTQueue :: TQueue_ stm a -> stm Bool
- newTBQueue :: Natural -> stm (TBQueue_ stm a)
- readTBQueue :: TBQueue_ stm a -> stm a
- tryReadTBQueue :: TBQueue_ stm a -> stm (Maybe a)
- flushTBQueue :: TBQueue_ stm a -> stm [a]
- writeTBQueue :: TBQueue_ stm a -> a -> stm ()
- lengthTBQueue :: TBQueue_ stm a -> stm Natural
- isEmptyTBQueue :: TBQueue_ stm a -> stm Bool
- isFullTBQueue :: TBQueue_ stm a -> stm Bool
- type TQueue (m :: Type -> Type) = TQueue_ (STM m)
- type TBQueue (m :: Type -> Type) = TBQueue_ (STM m)
- type family STM (m :: Type -> Type) :: Type -> Type
- class (Monad m, MonadSTMTx (STM m)) => MonadSTM (m :: Type -> Type) where
- type STM (m :: Type -> Type) :: Type -> Type
- atomically :: HasCallStack => STM m a -> m a
- newTBQueueIO :: Natural -> m (TBQueue m a)
- data TMVarDefault (m :: Type -> Type) a
- data TQueueDefault (m :: Type -> Type) a = TQueue !(TVar m [a]) !(TVar m [a])
- data TBQueueDefault (m :: Type -> Type) a = TBQueue !(TVar m Natural) !(TVar m [a]) !(TVar m Natural) !(TVar m [a]) !Natural
- data StrictMVar m a = StrictMVar {}
- castStrictMVar :: (TMVar m ~ TMVar n, TVar m ~ TVar n) => StrictMVar m a -> StrictMVar n a
- takeMVar :: MonadSTM m => StrictMVar m a -> m a
- tryTakeMVar :: MonadSTM m => StrictMVar m a -> m (Maybe a)
- putMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> a -> m ()
- tryPutMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> a -> m Bool
- readMVar :: MonadSTM m => StrictMVar m a -> m a
- tryReadMVar :: MonadSTM m => StrictMVar m a -> m (Maybe a)
- readMVarSTM :: MonadSTM m => StrictMVar m a -> STM m a
- swapMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> a -> m a
- isEmptyMVar :: MonadSTM m => StrictMVar m a -> m Bool
- updateMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> (a -> (a, b)) -> m b
- updateMVar_ :: (MonadSTM m, HasCallStack) => StrictMVar m a -> (a -> a) -> m ()
- modifyMVar :: (MonadSTM m, MonadCatch m, HasCallStack) => StrictMVar m a -> (a -> m (a, b)) -> m b
- modifyMVar_ :: (MonadSTM m, MonadCatch m, HasCallStack) => StrictMVar m a -> (a -> m a) -> m ()
- newTVarIO :: (MonadSTM m, HasCallStack, NoThunks a) => a -> m (StrictTVar m a)
- newMVar :: (MonadSTM m, HasCallStack, NoThunks a) => a -> m (StrictMVar m a)
- newEmptyMVar :: (MonadSTM m, NoThunks a) => a -> m (StrictMVar m a)
- uncheckedNewTVarM :: MonadSTM m => a -> m (StrictTVar m a)
- uncheckedNewMVar :: MonadSTM m => a -> m (StrictMVar m a)
- uncheckedNewEmptyMVar :: MonadSTM m => a -> m (StrictMVar m a)
Documentation
checkInvariant :: HasCallStack => Maybe String -> a -> a Source #
Check invariant (if enabled) before continuing
checkInvariant mErr x is equal to x if mErr == Nothing, and throws
an error err if mErr == Just err.
This is exported so that other code that wants to conditionally check invariants can reuse the same logic, rather than having to introduce new per-package flags.
isEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m Bool Source #
tryReadTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a) Source #
tryPutTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m Bool Source #
tryTakeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a) Source #
newEmptyTMVarM :: MonadSTM m => m (StrictTMVar m a) Source #
newEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => STM m (StrictTMVar m a) Source #
newTMVarM :: MonadSTM m => a -> m (StrictTMVar m a) Source #
castStrictTMVar :: forall (m :: Type -> Type) (n :: Type -> Type) a. LazyTMVar m ~ LazyTMVar n => StrictTMVar m a -> StrictTMVar n a Source #
updateTVar :: forall (m :: Type -> Type) a b. MonadSTM m => StrictTVar m a -> (a -> (a, b)) -> STM m b Source #
stateTVar :: forall (m :: Type -> Type) a b. MonadSTM m => StrictTVar m a -> (a -> (a, b)) -> STM m b Source #
modifyTVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTVar m a -> (a -> a) -> STM m () Source #
writeTVar :: forall (m :: Type -> Type) a. (MonadSTM m, HasCallStack) => StrictTVar m a -> a -> STM m () Source #
newTVarWithInvariantM Source #
Arguments
| :: (MonadSTM m, HasCallStack) | |
| => (a -> Maybe String) | Invariant (expect |
| -> a | |
| -> m (StrictTVar m a) |
newTVarM :: MonadSTM m => a -> m (StrictTVar m a) Source #
toLazyTVar :: forall (m :: Type -> Type) a. StrictTVar m a -> LazyTVar m a Source #
Get the underlying TVar
Since we obviously cannot guarantee that updates to this LazyTVar will be
strict, this should be used with caution.
castStrictTVar :: forall (m :: Type -> Type) (n :: Type -> Type) a. LazyTVar m ~ LazyTVar n => StrictTVar m a -> StrictTVar n a Source #
data StrictTVar (m :: Type -> Type) a Source #
data StrictTMVar (m :: Type -> Type) a Source #
catchSTM :: (MonadSTMTx stm, MonadCatch stm, Exception e) => stm a -> (e -> stm a) -> stm a Source #
catch speclialized for an stm monad.
throwSTM :: (MonadSTMTx stm, MonadThrow stm, Exception e) => e -> stm a Source #
throwIO specialised to stm monad.
flushTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m [a] Source #
lengthTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m Natural Source #
isFullTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m Bool Source #
isEmptyTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m Bool Source #
writeTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> a -> STM m () Source #
tryReadTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTMTx (STM m) => TBQueueDefault m a -> STM m (Maybe a) Source #
readTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TBQueueDefault m a -> STM m a Source #
newTBQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => Natural -> STM m (TBQueueDefault m a) Source #
isEmptyTQueueDefault :: forall (m :: Type -> Type) a. MonadSTMTx (STM m) => TQueueDefault m a -> STM m Bool Source #
tryReadTQueueDefault :: forall (m :: Type -> Type) a. MonadSTMTx (STM m) => TQueueDefault m a -> STM m (Maybe a) Source #
readTQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TQueueDefault m a -> STM m a Source #
writeTQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => TQueueDefault m a -> a -> STM m () Source #
newTQueueDefault :: forall (m :: Type -> Type) a. MonadSTM m => STM m (TQueueDefault m a) Source #
isEmptyTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m Bool Source #
swapTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> a -> STM m a Source #
tryReadTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m (Maybe a) Source #
readTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m a Source #
tryPutTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> a -> STM m Bool Source #
putTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> a -> STM m () Source #
tryTakeTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m (Maybe a) Source #
takeTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => TMVarDefault m a -> STM m a Source #
newEmptyTMVarMDefault :: MonadSTM m => m (TMVarDefault m a) Source #
newEmptyTMVarIODefault :: MonadSTM m => m (TMVarDefault m a) Source #
newEmptyTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => STM m (TMVarDefault m a) Source #
newTMVarMDefault :: MonadSTM m => a -> m (TMVarDefault m a) Source #
newTMVarIODefault :: MonadSTM m => a -> m (TMVarDefault m a) Source #
newTMVarDefault :: forall (m :: Type -> Type) a. MonadSTM m => a -> STM m (TMVarDefault m a) Source #
type family TBQueue_ (stm :: Type -> Type) :: Type -> Type Source #
Instances
| type TBQueue_ STM | |
Defined in Control.Monad.Class.MonadSTM | |
| type TBQueue_ (WithEarlyExit stm) Source # | |
Defined in Ouroboros.Consensus.Util.EarlyExit | |
type family TQueue_ (stm :: Type -> Type) :: Type -> Type Source #
Instances
| type TQueue_ STM | |
Defined in Control.Monad.Class.MonadSTM | |
| type TQueue_ (WithEarlyExit stm) Source # | |
Defined in Ouroboros.Consensus.Util.EarlyExit | |
type family TMVar_ (stm :: Type -> Type) :: Type -> Type Source #
Instances
| type TMVar_ STM | |
Defined in Control.Monad.Class.MonadSTM | |
| type TMVar_ (WithEarlyExit stm) Source # | |
Defined in Ouroboros.Consensus.Util.EarlyExit | |
type family TVar_ (stm :: Type -> Type) :: Type -> Type Source #
Instances
| type TVar_ STM | |
Defined in Control.Monad.Class.MonadSTM | |
| type TVar_ (WithEarlyExit stm) Source # | |
Defined in Ouroboros.Consensus.Util.EarlyExit | |
class (Monad stm, Alternative stm, MonadPlus stm) => MonadSTMTx (stm :: Type -> Type) where Source #
Minimal complete definition
newTVar, readTVar, writeTVar, retry, orElse, newTMVar, newEmptyTMVar, takeTMVar, tryTakeTMVar, putTMVar, tryPutTMVar, readTMVar, tryReadTMVar, swapTMVar, isEmptyTMVar, newTQueue, readTQueue, tryReadTQueue, writeTQueue, isEmptyTQueue, newTBQueue, readTBQueue, tryReadTBQueue, flushTBQueue, writeTBQueue, lengthTBQueue, isEmptyTBQueue, isFullTBQueue
Associated Types
type TVar_ (stm :: Type -> Type) :: Type -> Type Source #
type TMVar_ (stm :: Type -> Type) :: Type -> Type Source #
type TQueue_ (stm :: Type -> Type) :: Type -> Type Source #
type TBQueue_ (stm :: Type -> Type) :: Type -> Type Source #
Methods
orElse :: stm a -> stm a -> stm a Source #
modifyTVar' :: TVar_ stm a -> (a -> a) -> stm () Source #
check :: Bool -> stm () Source #
newTQueue :: stm (TQueue_ stm a) Source #
readTQueue :: TQueue_ stm a -> stm a Source #
tryReadTQueue :: TQueue_ stm a -> stm (Maybe a) Source #
writeTQueue :: TQueue_ stm a -> a -> stm () Source #
isEmptyTQueue :: TQueue_ stm a -> stm Bool Source #
newTBQueue :: Natural -> stm (TBQueue_ stm a) Source #
readTBQueue :: TBQueue_ stm a -> stm a Source #
tryReadTBQueue :: TBQueue_ stm a -> stm (Maybe a) Source #
flushTBQueue :: TBQueue_ stm a -> stm [a] Source #
writeTBQueue :: TBQueue_ stm a -> a -> stm () Source #
lengthTBQueue :: TBQueue_ stm a -> stm Natural Source #
Since: io-sim-classes-0.2.0.0
isEmptyTBQueue :: TBQueue_ stm a -> stm Bool Source #
isFullTBQueue :: TBQueue_ stm a -> stm Bool Source #
Instances
type family STM (m :: Type -> Type) :: Type -> Type Source #
Instances
| type STM IO | |
Defined in Control.Monad.Class.MonadSTM | |
| type STM (WithEarlyExit m) Source # | |
Defined in Ouroboros.Consensus.Util.EarlyExit | |
| type STM (ReaderT r m) | |
Defined in Control.Monad.Class.MonadSTM | |
| type STM (WithTempRegistry st m) Source # | |
Defined in Ouroboros.Consensus.Util.ResourceRegistry | |
class (Monad m, MonadSTMTx (STM m)) => MonadSTM (m :: Type -> Type) where Source #
Minimal complete definition
Methods
atomically :: HasCallStack => STM m a -> m a Source #
newTBQueueIO :: Natural -> m (TBQueue m a) Source #
Instances
data TMVarDefault (m :: Type -> Type) a Source #
data TBQueueDefault (m :: Type -> Type) a Source #
data StrictMVar m a Source #
Strict MVar (modelled using a lazy TMVar under the hood)
The StrictMVar API is slightly stronger than the usual MVar one, as we
offer a primitive to read the value of the MVar even if it is empty (in which
case we will return the oldest known stale one). See readMVarSTM.
There is a weaker invariant for a StrictMVar than for a StrictTVar:
although all functions that modify the StrictMVar check the invariant, we
do not guarantee that the value inside the StrictMVar always satisfies
the invariant. Instead, we do guarantee that if the StrictMVar is updated
with a value that does not satisfy the invariant, an exception is thrown. The
reason for this weaker guarantee is that leaving an MVar empty can lead to
very hard to debug "blocked indefinitely" problems.
This is also the reason we do not offer support for an invariant in
StrictTMVar: if we throw an exception from an STM transaction, the STM
transaction is not executed, and so we would not even be able to provide the
weaker guarantee that we provide for StrictMVar.
Constructors
| StrictMVar | |
Fields
| |
castStrictMVar :: (TMVar m ~ TMVar n, TVar m ~ TVar n) => StrictMVar m a -> StrictMVar n a Source #
takeMVar :: MonadSTM m => StrictMVar m a -> m a Source #
tryTakeMVar :: MonadSTM m => StrictMVar m a -> m (Maybe a) Source #
putMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> a -> m () Source #
tryPutMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> a -> m Bool Source #
readMVar :: MonadSTM m => StrictMVar m a -> m a Source #
tryReadMVar :: MonadSTM m => StrictMVar m a -> m (Maybe a) Source #
readMVarSTM :: MonadSTM m => StrictMVar m a -> STM m a Source #
Read the possibly-stale value of the MVar
Will return the current value of the MVar if it non-empty, or the last
known value otherwise.
swapMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> a -> m a Source #
Swap value of a StrictMVar
NOTE: Since swapping the value can't leave the StrictMVar empty, we
could check the invariant first and only then swap. We nonetheless swap
first and check the invariant after to keep the semantics the same with
putMVar, otherwise it will be difficult to understand when a StrictMVar
is updated and when it is not.
isEmptyMVar :: MonadSTM m => StrictMVar m a -> m Bool Source #
updateMVar :: (MonadSTM m, HasCallStack) => StrictMVar m a -> (a -> (a, b)) -> m b Source #
updateMVar_ :: (MonadSTM m, HasCallStack) => StrictMVar m a -> (a -> a) -> m () Source #
modifyMVar :: (MonadSTM m, MonadCatch m, HasCallStack) => StrictMVar m a -> (a -> m (a, b)) -> m b Source #
modifyMVar_ :: (MonadSTM m, MonadCatch m, HasCallStack) => StrictMVar m a -> (a -> m a) -> m () Source #
newTVarIO :: (MonadSTM m, HasCallStack, NoThunks a) => a -> m (StrictTVar m a) Source #
newMVar :: (MonadSTM m, HasCallStack, NoThunks a) => a -> m (StrictMVar m a) Source #
newEmptyMVar :: (MonadSTM m, NoThunks a) => a -> m (StrictMVar m a) Source #
Temporary
uncheckedNewTVarM :: MonadSTM m => a -> m (StrictTVar m a) Source #
uncheckedNewMVar :: MonadSTM m => a -> m (StrictMVar m a) Source #
uncheckedNewEmptyMVar :: MonadSTM m => a -> m (StrictMVar m a) Source #