Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module corresponds to STM
in "stm" package
Synopsis
- class (Monad m, Monad (STM m)) => MonadSTM (m :: Type -> Type) where
- type family STM (m :: Type -> Type) = (stm :: Type -> Type) | stm -> m
- data StrictTArray m i e
- type LazyTArray m = TArray m
- data StrictTBQueue m a
- type LazyTBQueue m = TBQueue m
- data StrictTChan m a
- type LazyTChan m = TChan m
- data StrictTMVar m a
- type LazyTMVar m = TMVar m
- data StrictTQueue m a
- type LazyTQueue m = TQueue m
- data StrictTVar m a
- type LazyTVar m = TVar m
- class (MonadSTM m, Monad (InspectMonad m)) => MonadInspectSTM (m :: Type -> Type) where
- type InspectMonad (m :: Type -> Type) :: Type -> Type
- inspectTVar :: proxy m -> TVar m a -> InspectMonad m a
- inspectTMVar :: proxy m -> TMVar m a -> InspectMonad m (Maybe a)
- class MonadSTM m => MonadLabelledSTM (m :: Type -> Type)
- class MonadInspectSTM m => MonadTraceSTM (m :: Type -> Type) where
- traceTSem :: proxy m -> TSem m -> (Maybe Integer -> Integer -> InspectMonad m TraceValue) -> STM m ()
- traceTSemIO :: TSem m -> (Maybe Integer -> Integer -> InspectMonad m TraceValue) -> m ()
- type family InspectMonad (m :: Type -> Type) :: Type -> Type
- data TraceValue where
- TraceValue :: forall tr. Typeable tr => {..} -> TraceValue
- pattern DontTrace :: TraceValue
- pattern TraceDynamic :: () => Typeable tr => tr -> TraceValue
- pattern TraceString :: String -> TraceValue
- newTQueueIO :: MonadSTM m => m (StrictTQueue m a)
- newTBQueueIO :: MonadSTM m => Natural -> m (StrictTBQueue m a)
- newTMVarIO :: MonadSTM m => a -> m (StrictTMVar m a)
- throwSTM :: forall (m :: Type -> Type) e a. (MonadSTM m, MonadThrow (STM m), Exception e) => e -> STM m a
- newTVar :: MonadSTM m => a -> STM m (StrictTVar m a)
- newTVarIO :: MonadSTM m => a -> m (StrictTVar m a)
- readTVarIO :: MonadSTM m => StrictTVar m a -> m a
- readTVar :: MonadSTM m => StrictTVar m a -> STM m a
- writeTVar :: MonadSTM m => StrictTVar m a -> a -> STM m ()
- newTBQueue :: MonadSTM m => Natural -> STM m (StrictTBQueue m a)
- writeTBQueue :: MonadSTM m => StrictTBQueue m a -> a -> STM m ()
- readTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m a
- tryReadTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m (Maybe a)
- flushTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m [a]
- peekTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m a
- tryPeekTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m (Maybe a)
- unGetTBQueue :: MonadSTM m => StrictTBQueue m a -> a -> STM m ()
- lengthTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m Natural
- isEmptyTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m Bool
- isFullTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m Bool
- newTChan :: MonadSTM m => STM m (StrictTChan m a)
- newBroadcastTChan :: MonadSTM m => STM m (StrictTChan m a)
- writeTChan :: MonadSTM m => StrictTChan m a -> a -> STM m ()
- readTChan :: MonadSTM m => StrictTChan m a -> STM m a
- tryReadTChan :: MonadSTM m => StrictTChan m a -> STM m (Maybe a)
- peekTChan :: MonadSTM m => StrictTChan m a -> STM m a
- tryPeekTChan :: MonadSTM m => StrictTChan m a -> STM m (Maybe a)
- dupTChan :: MonadSTM m => StrictTChan m a -> STM m (StrictTChan m a)
- unGetTChan :: MonadSTM m => StrictTChan m a -> a -> STM m ()
- isEmptyTChan :: MonadSTM m => StrictTChan m a -> STM m Bool
- cloneTChan :: MonadSTM m => StrictTChan m a -> STM m (StrictTChan m a)
- newTMVar :: MonadSTM m => a -> STM m (StrictTMVar m a)
- newEmptyTMVar :: MonadSTM m => STM m (StrictTMVar m a)
- newEmptyTMVarIO :: MonadSTM m => m (StrictTMVar m a)
- takeTMVar :: MonadSTM m => StrictTMVar m a -> STM m a
- tryTakeTMVar :: MonadSTM m => StrictTMVar m a -> STM m (Maybe a)
- putTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m ()
- tryPutTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m Bool
- readTMVar :: MonadSTM m => StrictTMVar m a -> STM m a
- tryReadTMVar :: MonadSTM m => StrictTMVar m a -> STM m (Maybe a)
- swapTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m a
- writeTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m ()
- isEmptyTMVar :: MonadSTM m => StrictTMVar m a -> STM m Bool
- newTQueue :: MonadSTM m => STM m (StrictTQueue m a)
- writeTQueue :: MonadSTM m => StrictTQueue m a -> a -> STM m ()
- readTQueue :: MonadSTM m => StrictTQueue m a -> STM m a
- tryReadTQueue :: MonadSTM m => StrictTQueue m a -> STM m (Maybe a)
- flushTQueue :: MonadSTM m => StrictTQueue m a -> STM m [a]
- peekTQueue :: MonadSTM m => StrictTQueue m a -> STM m a
- tryPeekTQueue :: MonadSTM m => StrictTQueue m a -> STM m (Maybe a)
- unGetTQueue :: MonadSTM m => StrictTQueue m a -> a -> STM m ()
- isEmptyTQueue :: MonadSTM m => StrictTQueue m a -> STM m Bool
- modifyTVar :: MonadSTM m => StrictTVar m a -> (a -> a) -> STM m ()
- stateTVar :: MonadSTM m => StrictTVar m s -> (s -> (a, s)) -> STM m a
- swapTVar :: MonadSTM m => StrictTVar m a -> a -> STM m a
- traceTBQueue :: MonadTraceSTM m => proxy m -> StrictTBQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> STM m ()
- traceTBQueueIO :: MonadTraceSTM m => StrictTBQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> m ()
- traceTMVar :: 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 ()
- traceTQueue :: MonadTraceSTM m => proxy m -> StrictTQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> STM m ()
- traceTQueueIO :: MonadTraceSTM m => StrictTQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> m ()
- traceTVar :: MonadTraceSTM m => proxy m -> StrictTVar m a -> (Maybe a -> a -> InspectMonad m TraceValue) -> STM m ()
- traceTVarIO :: MonadTraceSTM m => StrictTVar m a -> (Maybe a -> a -> InspectMonad m TraceValue) -> m ()
- fromLazyTArray :: LazyTArray m i e -> StrictTArray m i e
- fromLazyTBQueue :: LazyTBQueue m a -> StrictTBQueue m a
- castStrictTBQueue :: LazyTBQueue m ~ LazyTBQueue n => StrictTBQueue m a -> StrictTBQueue n a
- labelTBQueue :: MonadLabelledSTM m => StrictTBQueue m a -> String -> STM m ()
- labelTBQueueIO :: MonadLabelledSTM m => StrictTBQueue m a -> String -> m ()
- fromLazyTChan :: LazyTChan m a -> StrictTChan m a
- castStrictTChan :: LazyTChan m ~ LazyTChan n => StrictTChan m a -> StrictTChan n a
- fromLazyTMVar :: LazyTMVar m a -> StrictTMVar m a
- castStrictTMVar :: LazyTMVar m ~ LazyTMVar n => StrictTMVar m a -> StrictTMVar n a
- labelTMVar :: MonadLabelledSTM m => StrictTMVar m a -> String -> STM m ()
- labelTMVarIO :: MonadLabelledSTM m => StrictTMVar m a -> String -> m ()
- fromLazyTQueue :: LazyTQueue m a -> StrictTQueue m a
- castStrictTQueue :: LazyTQueue m ~ LazyTQueue n => StrictTQueue m a -> StrictTQueue n a
- labelTQueue :: MonadLabelledSTM m => StrictTQueue m a -> String -> STM m ()
- labelTQueueIO :: MonadLabelledSTM m => StrictTQueue m a -> String -> m ()
- toLazyTVar :: StrictTVar m a -> LazyTVar m a
- fromLazyTVar :: LazyTVar m a -> StrictTVar m a
- castStrictTVar :: LazyTVar m ~ LazyTVar n => StrictTVar m a -> StrictTVar n a
- labelTVar :: MonadLabelledSTM m => StrictTVar m a -> String -> STM m ()
- labelTVarIO :: MonadLabelledSTM m => StrictTVar m a -> String -> m ()
Documentation
class (Monad m, Monad (STM m)) => MonadSTM (m :: Type -> Type) where #
atomically, newTVar, readTVar, writeTVar, retry, orElse, newTMVar, newEmptyTMVar, takeTMVar, tryTakeTMVar, putTMVar, tryPutTMVar, readTMVar, tryReadTMVar, swapTMVar, writeTMVar, isEmptyTMVar, newTQueue, readTQueue, tryReadTQueue, peekTQueue, tryPeekTQueue, flushTQueue, writeTQueue, isEmptyTQueue, unGetTQueue, newTBQueue, readTBQueue, tryReadTBQueue, peekTBQueue, tryPeekTBQueue, flushTBQueue, writeTBQueue, lengthTBQueue, isEmptyTBQueue, isFullTBQueue, unGetTBQueue, newTSem, waitTSem, signalTSem, signalTSemN, newTChan, newBroadcastTChan, dupTChan, cloneTChan, readTChan, tryReadTChan, peekTChan, tryPeekTChan, writeTChan, unGetTChan, isEmptyTChan
atomically :: HasCallStack => STM m a -> m a #
Instances
MonadSTM IO | |
Defined in Control.Monad.Class.MonadSTM.Internal type STM IO = (stm :: Type -> Type) # type TQueue IO :: Type -> Type type TBQueue IO :: Type -> Type type TArray IO :: Type -> Type -> Type type TSem IO atomically :: HasCallStack => STM IO a -> IO a # newTVar :: a -> STM IO (TVar IO a) readTVar :: TVar IO a -> STM IO a writeTVar :: TVar IO a -> a -> STM IO () orElse :: STM IO a -> STM IO a -> STM IO a # modifyTVar :: TVar IO a -> (a -> a) -> STM IO () modifyTVar' :: TVar IO a -> (a -> a) -> STM IO () stateTVar :: TVar IO s -> (s -> (a, s)) -> STM IO a swapTVar :: TVar IO a -> a -> STM IO a newTMVar :: a -> STM IO (TMVar IO a) newEmptyTMVar :: STM IO (TMVar IO a) takeTMVar :: TMVar IO a -> STM IO a tryTakeTMVar :: TMVar IO a -> STM IO (Maybe a) putTMVar :: TMVar IO a -> a -> STM IO () tryPutTMVar :: TMVar IO a -> a -> STM IO Bool readTMVar :: TMVar IO a -> STM IO a tryReadTMVar :: TMVar IO a -> STM IO (Maybe a) swapTMVar :: TMVar IO a -> a -> STM IO a writeTMVar :: TMVar IO a -> a -> STM IO () isEmptyTMVar :: TMVar IO a -> STM IO Bool newTQueue :: STM IO (TQueue IO a) readTQueue :: TQueue IO a -> STM IO a tryReadTQueue :: TQueue IO a -> STM IO (Maybe a) peekTQueue :: TQueue IO a -> STM IO a tryPeekTQueue :: TQueue IO a -> STM IO (Maybe a) flushTQueue :: TQueue IO a -> STM IO [a] writeTQueue :: TQueue IO a -> a -> STM IO () isEmptyTQueue :: TQueue IO a -> STM IO Bool unGetTQueue :: TQueue IO a -> a -> STM IO () newTBQueue :: Natural -> STM IO (TBQueue IO a) readTBQueue :: TBQueue IO a -> STM IO a tryReadTBQueue :: TBQueue IO a -> STM IO (Maybe a) peekTBQueue :: TBQueue IO a -> STM IO a tryPeekTBQueue :: TBQueue IO a -> STM IO (Maybe a) flushTBQueue :: TBQueue IO a -> STM IO [a] writeTBQueue :: TBQueue IO a -> a -> STM IO () lengthTBQueue :: TBQueue IO a -> STM IO Natural isEmptyTBQueue :: TBQueue IO a -> STM IO Bool isFullTBQueue :: TBQueue IO a -> STM IO Bool unGetTBQueue :: TBQueue IO a -> a -> STM IO () newTSem :: Integer -> STM IO (TSem IO) waitTSem :: TSem IO -> STM IO () signalTSem :: TSem IO -> STM IO () signalTSemN :: Natural -> TSem IO -> STM IO () newTChan :: STM IO (TChan IO a) newBroadcastTChan :: STM IO (TChan IO a) dupTChan :: TChan IO a -> STM IO (TChan IO a) cloneTChan :: TChan IO a -> STM IO (TChan IO a) readTChan :: TChan IO a -> STM IO a tryReadTChan :: TChan IO a -> STM IO (Maybe a) peekTChan :: TChan IO a -> STM IO a tryPeekTChan :: TChan IO a -> STM IO (Maybe a) writeTChan :: TChan IO a -> a -> STM IO () unGetTChan :: TChan IO a -> a -> STM IO () isEmptyTChan :: TChan IO a -> STM IO Bool newTVarIO :: a -> IO (TVar IO a) readTVarIO :: TVar IO a -> IO a newTMVarIO :: a -> IO (TMVar IO a) newEmptyTMVarIO :: IO (TMVar IO a) newTQueueIO :: IO (TQueue IO a) newTBQueueIO :: Natural -> IO (TBQueue IO a) newTChanIO :: IO (TChan IO a) newBroadcastTChanIO :: IO (TChan IO a) | |
MonadSTM m => MonadSTM (ReaderT r m) | |
Defined in Control.Monad.Class.MonadSTM.Internal type STM (ReaderT r m) = (stm :: Type -> Type) # type TVar (ReaderT r m) :: Type -> Type type TMVar (ReaderT r m) :: Type -> Type type TQueue (ReaderT r m) :: Type -> Type type TBQueue (ReaderT r m) :: Type -> Type type TArray (ReaderT r m) :: Type -> Type -> Type type TSem (ReaderT r m) atomically :: HasCallStack => STM (ReaderT r m) a -> ReaderT r m a # newTVar :: a -> STM (ReaderT r m) (TVar (ReaderT r m) a) readTVar :: TVar (ReaderT r m) a -> STM (ReaderT r m) a writeTVar :: TVar (ReaderT r m) a -> a -> STM (ReaderT r m) () retry :: STM (ReaderT r m) a # orElse :: STM (ReaderT r m) a -> STM (ReaderT r m) a -> STM (ReaderT r m) a # modifyTVar :: TVar (ReaderT r m) a -> (a -> a) -> STM (ReaderT r m) () modifyTVar' :: TVar (ReaderT r m) a -> (a -> a) -> STM (ReaderT r m) () stateTVar :: TVar (ReaderT r m) s -> (s -> (a, s)) -> STM (ReaderT r m) a swapTVar :: TVar (ReaderT r m) a -> a -> STM (ReaderT r m) a check :: Bool -> STM (ReaderT r m) () # newTMVar :: a -> STM (ReaderT r m) (TMVar (ReaderT r m) a) newEmptyTMVar :: STM (ReaderT r m) (TMVar (ReaderT r m) a) takeTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) a tryTakeTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) putTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) () tryPutTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) Bool readTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) a tryReadTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) swapTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) a writeTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) () isEmptyTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) Bool newTQueue :: STM (ReaderT r m) (TQueue (ReaderT r m) a) readTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) a tryReadTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) peekTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) a tryPeekTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) flushTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) [a] writeTQueue :: TQueue (ReaderT r m) a -> a -> STM (ReaderT r m) () isEmptyTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) Bool unGetTQueue :: TQueue (ReaderT r m) a -> a -> STM (ReaderT r m) () newTBQueue :: Natural -> STM (ReaderT r m) (TBQueue (ReaderT r m) a) readTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) a tryReadTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) peekTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) a tryPeekTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) flushTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) [a] writeTBQueue :: TBQueue (ReaderT r m) a -> a -> STM (ReaderT r m) () lengthTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Natural isEmptyTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Bool isFullTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Bool unGetTBQueue :: TBQueue (ReaderT r m) a -> a -> STM (ReaderT r m) () newTSem :: Integer -> STM (ReaderT r m) (TSem (ReaderT r m)) waitTSem :: TSem (ReaderT r m) -> STM (ReaderT r m) () signalTSem :: TSem (ReaderT r m) -> STM (ReaderT r m) () signalTSemN :: Natural -> TSem (ReaderT r m) -> STM (ReaderT r m) () newTChan :: STM (ReaderT r m) (TChan (ReaderT r m) a) newBroadcastTChan :: STM (ReaderT r m) (TChan (ReaderT r m) a) dupTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (TChan (ReaderT r m) a) cloneTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (TChan (ReaderT r m) a) readTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) a tryReadTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) peekTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) a tryPeekTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (Maybe a) writeTChan :: TChan (ReaderT r m) a -> a -> STM (ReaderT r m) () unGetTChan :: TChan (ReaderT r m) a -> a -> STM (ReaderT r m) () isEmptyTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) Bool newTVarIO :: a -> ReaderT r m (TVar (ReaderT r m) a) readTVarIO :: TVar (ReaderT r m) a -> ReaderT r m a newTMVarIO :: a -> ReaderT r m (TMVar (ReaderT r m) a) newEmptyTMVarIO :: ReaderT r m (TMVar (ReaderT r m) a) newTQueueIO :: ReaderT r m (TQueue (ReaderT r m) a) newTBQueueIO :: Natural -> ReaderT r m (TBQueue (ReaderT r m) a) newTChanIO :: ReaderT r m (TChan (ReaderT r m) a) newBroadcastTChanIO :: ReaderT r m (TChan (ReaderT r m) a) |
data StrictTArray m i e Source #
Instances
(MArray (TArray m) e stm, Monad stm) => MArray (StrictTArray m) e stm Source # | |
Defined in Control.Concurrent.Class.MonadSTM.Strict.TArray getBounds :: Ix i => StrictTArray m i e -> stm (i, i) # getNumElements :: Ix i => StrictTArray m i e -> stm Int newArray :: Ix i => (i, i) -> e -> stm (StrictTArray m i e) # newArray_ :: Ix i => (i, i) -> stm (StrictTArray m i e) # unsafeNewArray_ :: Ix i => (i, i) -> stm (StrictTArray m i e) unsafeRead :: Ix i => StrictTArray m i e -> Int -> stm e unsafeWrite :: Ix i => StrictTArray m i e -> Int -> e -> stm () |
type LazyTArray m = TArray m Source #
data StrictTBQueue m a Source #
type LazyTBQueue m = TBQueue m Source #
data StrictTChan m a Source #
data StrictTMVar m a Source #
TMVar
that keeps its value in WHNF at all times
data StrictTQueue m a Source #
type LazyTQueue m = TQueue m Source #
data StrictTVar m a Source #
class (MonadSTM m, Monad (InspectMonad m)) => MonadInspectSTM (m :: Type -> Type) where #
inspectTVar :: proxy m -> TVar m a -> InspectMonad m a #
inspectTMVar :: proxy m -> TMVar m a -> InspectMonad m (Maybe a) #
Instances
MonadInspectSTM IO | |
Defined in Control.Monad.Class.MonadSTM.Internal type InspectMonad IO :: Type -> Type # inspectTVar :: proxy IO -> TVar IO a -> InspectMonad IO a # inspectTMVar :: proxy IO -> TMVar IO a -> InspectMonad IO (Maybe a) # |
class MonadSTM m => MonadLabelledSTM (m :: Type -> Type) #
labelTVar
Instances
MonadLabelledSTM IO | |
Defined in Control.Monad.Class.MonadSTM.Internal labelTVar :: TVar IO a -> String -> STM IO () labelTMVar :: TMVar IO a -> String -> STM IO () labelTQueue :: TQueue IO a -> String -> STM IO () labelTBQueue :: TBQueue IO a -> String -> STM IO () labelTArray :: (Ix i, Show i) => TArray IO i e -> String -> STM IO () labelTSem :: TSem IO -> String -> STM IO () labelTChan :: TChan IO a -> String -> STM IO () labelTVarIO :: TVar IO a -> String -> IO () labelTMVarIO :: TMVar IO a -> String -> IO () labelTQueueIO :: TQueue IO a -> String -> IO () labelTBQueueIO :: TBQueue IO a -> String -> IO () labelTArrayIO :: (Ix i, Show i) => TArray IO i e -> String -> IO () labelTSemIO :: TSem IO -> String -> IO () labelTChanIO :: TChan IO a -> String -> IO () |
class MonadInspectSTM m => MonadTraceSTM (m :: Type -> Type) where #
traceTVar, traceTQueue, traceTBQueue
traceTSem :: proxy m -> TSem m -> (Maybe Integer -> Integer -> InspectMonad m TraceValue) -> STM m () #
traceTSemIO :: TSem m -> (Maybe Integer -> Integer -> InspectMonad m TraceValue) -> m () #
Instances
type family InspectMonad (m :: Type -> Type) :: Type -> Type #
Instances
type InspectMonad IO | |
Defined in Control.Monad.Class.MonadSTM.Internal |
data TraceValue where #
TraceValue | |
|
pattern DontTrace :: TraceValue | |
pattern TraceDynamic :: () => Typeable tr => tr -> TraceValue | |
pattern TraceString :: String -> TraceValue |
newTQueueIO :: MonadSTM m => m (StrictTQueue m a) Source #
newTBQueueIO :: MonadSTM m => Natural -> m (StrictTBQueue m a) Source #
newTMVarIO :: MonadSTM m => a -> m (StrictTMVar m a) Source #
throwSTM :: forall (m :: Type -> Type) e a. (MonadSTM m, MonadThrow (STM m), Exception e) => e -> STM m a #
newTVarIO :: MonadSTM m => a -> m (StrictTVar m a) Source #
readTVarIO :: MonadSTM m => StrictTVar m a -> m a Source #
newTBQueue :: MonadSTM m => Natural -> STM m (StrictTBQueue m a) Source #
writeTBQueue :: MonadSTM m => StrictTBQueue m a -> a -> STM m () Source #
readTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m a Source #
tryReadTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m (Maybe a) Source #
flushTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m [a] Source #
peekTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m a Source #
tryPeekTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m (Maybe a) Source #
unGetTBQueue :: MonadSTM m => StrictTBQueue m a -> a -> STM m () Source #
lengthTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m Natural Source #
isEmptyTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m Bool Source #
isFullTBQueue :: MonadSTM m => StrictTBQueue m a -> STM m Bool Source #
newBroadcastTChan :: MonadSTM m => STM m (StrictTChan m a) Source #
writeTChan :: MonadSTM m => StrictTChan m a -> a -> STM m () Source #
tryReadTChan :: MonadSTM m => StrictTChan m a -> STM m (Maybe a) Source #
tryPeekTChan :: MonadSTM m => StrictTChan m a -> STM m (Maybe a) Source #
dupTChan :: MonadSTM m => StrictTChan m a -> STM m (StrictTChan m a) Source #
unGetTChan :: MonadSTM m => StrictTChan m a -> a -> STM m () Source #
isEmptyTChan :: MonadSTM m => StrictTChan m a -> STM m Bool Source #
cloneTChan :: MonadSTM m => StrictTChan m a -> STM m (StrictTChan m a) Source #
newEmptyTMVar :: MonadSTM m => STM m (StrictTMVar m a) Source #
newEmptyTMVarIO :: MonadSTM m => m (StrictTMVar m a) Source #
tryTakeTMVar :: MonadSTM m => StrictTMVar m a -> STM m (Maybe a) Source #
tryPutTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m Bool Source #
tryReadTMVar :: MonadSTM m => StrictTMVar m a -> STM m (Maybe a) Source #
writeTMVar :: MonadSTM m => StrictTMVar m a -> a -> STM m () Source #
isEmptyTMVar :: MonadSTM m => StrictTMVar m a -> STM m Bool Source #
writeTQueue :: MonadSTM m => StrictTQueue m a -> a -> STM m () Source #
readTQueue :: MonadSTM m => StrictTQueue m a -> STM m a Source #
tryReadTQueue :: MonadSTM m => StrictTQueue m a -> STM m (Maybe a) Source #
flushTQueue :: MonadSTM m => StrictTQueue m a -> STM m [a] Source #
peekTQueue :: MonadSTM m => StrictTQueue m a -> STM m a Source #
tryPeekTQueue :: MonadSTM m => StrictTQueue m a -> STM m (Maybe a) Source #
unGetTQueue :: MonadSTM m => StrictTQueue m a -> a -> STM m () Source #
isEmptyTQueue :: MonadSTM m => StrictTQueue m a -> STM m Bool Source #
modifyTVar :: MonadSTM m => StrictTVar m a -> (a -> a) -> STM m () Source #
traceTBQueue :: MonadTraceSTM m => proxy m -> StrictTBQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> STM m () Source #
traceTBQueueIO :: MonadTraceSTM m => StrictTBQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> m () Source #
traceTMVar :: 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 #
traceTQueue :: MonadTraceSTM m => proxy m -> StrictTQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> STM m () Source #
traceTQueueIO :: MonadTraceSTM m => StrictTQueue m a -> (Maybe [a] -> [a] -> InspectMonad m TraceValue) -> m () Source #
traceTVar :: MonadTraceSTM m => proxy m -> StrictTVar m a -> (Maybe a -> a -> InspectMonad m TraceValue) -> STM m () Source #
traceTVarIO :: MonadTraceSTM m => StrictTVar m a -> (Maybe a -> a -> InspectMonad m TraceValue) -> m () Source #
fromLazyTArray :: LazyTArray m i e -> StrictTArray m i e Source #
fromLazyTBQueue :: LazyTBQueue m a -> StrictTBQueue m a Source #
castStrictTBQueue :: LazyTBQueue m ~ LazyTBQueue n => StrictTBQueue m a -> StrictTBQueue n a Source #
labelTBQueue :: MonadLabelledSTM m => StrictTBQueue m a -> String -> STM m () Source #
labelTBQueueIO :: MonadLabelledSTM m => StrictTBQueue m a -> String -> m () Source #
fromLazyTChan :: LazyTChan m a -> StrictTChan m a Source #
castStrictTChan :: LazyTChan m ~ LazyTChan n => StrictTChan m a -> StrictTChan n a Source #
fromLazyTMVar :: LazyTMVar m a -> StrictTMVar m a Source #
castStrictTMVar :: LazyTMVar m ~ LazyTMVar n => StrictTMVar m a -> StrictTMVar n a Source #
labelTMVar :: MonadLabelledSTM m => StrictTMVar m a -> String -> STM m () Source #
labelTMVarIO :: MonadLabelledSTM m => StrictTMVar m a -> String -> m () Source #
fromLazyTQueue :: LazyTQueue m a -> StrictTQueue m a Source #
castStrictTQueue :: LazyTQueue m ~ LazyTQueue n => StrictTQueue m a -> StrictTQueue n a Source #
labelTQueue :: MonadLabelledSTM m => StrictTQueue m a -> String -> STM m () Source #
labelTQueueIO :: MonadLabelledSTM m => StrictTQueue m a -> String -> m () Source #
toLazyTVar :: 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.
fromLazyTVar :: LazyTVar m a -> StrictTVar m a Source #
castStrictTVar :: LazyTVar m ~ LazyTVar n => StrictTVar m a -> StrictTVar n a Source #
Cast the monad if both use the same representation of TVar
s.
This function is useful for monad transformers stacks if the TVar
is used
in different monad stacks.
labelTVar :: MonadLabelledSTM m => StrictTVar m a -> String -> STM m () Source #
labelTVarIO :: MonadLabelledSTM m => StrictTVar m a -> String -> m () Source #