io-classes-1.4.1.0: Type classes for concurrency with STM, ST and timing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Concurrent.Class.MonadSTM.TChan

Description

This module corresponds to TChan in "stm" package

Synopsis

MonadSTM

TChans

type family TChan m :: Type -> Type Source #

Instances

Instances details
type TChan IO Source # 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TChan IO = TChan
type TChan (ReaderT r m) Source # 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TChan (ReaderT r m) = TChan m

Construction

newTChan :: MonadSTM m => STM m (TChan m a) Source #

newTChanIO :: MonadSTM m => m (TChan m a) Source #

dupTChan :: MonadSTM m => TChan m a -> STM m (TChan m a) Source #

cloneTChan :: MonadSTM m => TChan m a -> STM m (TChan m a) Source #

Reading and writing

readTChan :: MonadSTM m => TChan m a -> STM m a Source #

tryReadTChan :: MonadSTM m => TChan m a -> STM m (Maybe a) Source #

peekTChan :: MonadSTM m => TChan m a -> STM m a Source #

tryPeekTChan :: MonadSTM m => TChan m a -> STM m (Maybe a) Source #

writeTChan :: MonadSTM m => TChan m a -> a -> STM m () Source #

unGetTChan :: MonadSTM m => TChan m a -> a -> STM m () Source #