lifted-base-0.2.3.0: lifted IO operations from the base library

Stabilityexperimental
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
Safe HaskellTrustworthy

Control.Concurrent.Chan.Lifted

Description

This is a wrapped version of Control.Concurrent.Chan with types generalised from IO to all monads in MonadBase.

unGetChan and isEmptyChan are deprecated in base, therefore they are not included here. Use TVar instead.

Synopsis

Documentation

data Chan a

Chan is an abstract type representing an unbounded FIFO channel.

Instances

newChan :: MonadBase IO m => m (Chan a)Source

Generalized version of newChan.

writeChan :: MonadBase IO m => Chan a -> a -> m ()Source

Generalized version of writeChan.

readChan :: MonadBase IO m => Chan a -> m aSource

Generalized version of readChan.

dupChan :: MonadBase IO m => Chan a -> m (Chan a)Source

Generalized version of dupChan.

getChanContents :: MonadBase IO m => Chan a -> m [a]Source

Generalized version of getChanContents.

writeList2Chan :: MonadBase IO m => Chan a -> [a] -> m ()Source

Generalized version of writeList2Chan.