io-classes:strict-stm
Safe HaskellNone
LanguageHaskell2010

Control.Concurrent.Class.MonadSTM.Strict.TMVar

Description

This module corresponds to TMVar in "stm" package

Synopsis

StrictTMVar

data StrictTMVar (m :: Type -> Type) a Source #

TMVar that keeps its value in WHNF at all times

type LazyTMVar (m :: Type -> Type) = TMVar m Source #

fromLazyTMVar :: forall (m :: Type -> Type) a. LazyTMVar m a -> StrictTMVar m a Source #

castStrictTMVar :: forall (m :: Type -> Type) (n :: Type -> Type) a. LazyTMVar m ~ LazyTMVar n => StrictTMVar m a -> StrictTMVar n a Source #

newTMVar :: forall (m :: Type -> Type) a. MonadSTM m => a -> STM m (StrictTMVar m a) Source #

newEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => STM m (StrictTMVar m a) Source #

newTMVarIO :: MonadSTM m => a -> m (StrictTMVar m a) Source #

takeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m a Source #

tryTakeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a) Source #

putTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m () Source #

tryPutTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m Bool Source #

readTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m a Source #

tryReadTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a) Source #

swapTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m a Source #

writeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m () Source #

isEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m Bool Source #

MonadLabelledSTM

labelTMVar :: forall (m :: Type -> Type) a. MonadLabelledSTM m => StrictTMVar m a -> String -> STM m () Source #

MonadTraceSTM

traceTMVar :: forall (m :: Type -> Type) proxy a. MonadTraceSTM m => proxy m -> StrictTMVar m a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad m TraceValue) -> STM m () Source #

debugTraceTMVar :: forall (m :: Type -> Type) a proxy. (MonadTraceSTM m, Show a) => proxy m -> StrictTMVar m a -> STM m () Source #