Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module corresponds to TMVar
in "stm" package
Synopsis
- data StrictTMVar (m :: Type -> Type) a
- type LazyTMVar (m :: Type -> Type) = TMVar m
- toLazyTMVar :: StrictTMVar m a -> LazyTMVar m a
- fromLazyTMVar :: forall (m :: Type -> Type) a. LazyTMVar m a -> StrictTMVar m a
- castStrictTMVar :: forall (m :: Type -> Type) (n :: Type -> Type) a. LazyTMVar m ~ LazyTMVar n => StrictTMVar m a -> StrictTMVar n a
- newTMVar :: forall (m :: Type -> Type) a. MonadSTM m => a -> STM m (StrictTMVar m a)
- newEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => STM m (StrictTMVar m a)
- newTMVarIO :: MonadSTM m => a -> m (StrictTMVar m a)
- newEmptyTMVarIO :: MonadSTM m => m (StrictTMVar m a)
- takeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m a
- tryTakeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a)
- putTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m ()
- tryPutTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m Bool
- readTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m a
- tryReadTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe a)
- swapTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m a
- writeTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> a -> STM m ()
- isEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m Bool
- labelTMVar :: forall (m :: Type -> Type) a. MonadLabelledSTM m => StrictTMVar m a -> String -> STM m ()
- labelTMVarIO :: MonadLabelledSTM m => StrictTMVar m a -> String -> m ()
- traceTMVar :: forall (m :: Type -> Type) proxy a. MonadTraceSTM m => proxy m -> StrictTMVar m a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad m TraceValue) -> STM m ()
- traceTMVarIO :: MonadTraceSTM m => StrictTMVar m a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad m TraceValue) -> m ()
- debugTraceTMVar :: forall (m :: Type -> Type) a proxy. (MonadTraceSTM m, Show a) => proxy m -> StrictTMVar m a -> STM m ()
- debugTraceTMVarIO :: (MonadTraceSTM m, Show a) => StrictTMVar m a -> m ()
StrictTMVar
data StrictTMVar (m :: Type -> Type) a Source #
TMVar
that keeps its value in WHNF at all times
toLazyTMVar :: StrictTMVar m a -> LazyTMVar m a 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 #
newEmptyTMVar :: forall (m :: Type -> Type) a. MonadSTM m => STM m (StrictTMVar m a) Source #
newTMVarIO :: MonadSTM m => a -> m (StrictTMVar m a) Source #
newEmptyTMVarIO :: MonadSTM m => m (StrictTMVar m a) Source #
tryTakeTMVar :: 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 #
tryReadTMVar :: forall (m :: Type -> Type) a. MonadSTM m => StrictTMVar m a -> STM m (Maybe 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 #
labelTMVarIO :: MonadLabelledSTM m => StrictTMVar m a -> String -> 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 #
traceTMVarIO :: MonadTraceSTM m => StrictTMVar m a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad m TraceValue) -> m () Source #
debugTraceTMVar :: forall (m :: Type -> Type) a proxy. (MonadTraceSTM m, Show a) => proxy m -> StrictTMVar m a -> STM m () Source #
debugTraceTMVarIO :: (MonadTraceSTM m, Show a) => StrictTMVar m a -> m () Source #