Copyright | Liyang HU, Bas van Dijk |
---|---|
License | BSD-style |
Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
Stability | experimental |
Safe Haskell | Trustworthy |
Language | Haskell98 |
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.
- data Chan a :: * -> *
- newChan :: MonadBase IO m => m (Chan a)
- writeChan :: MonadBase IO m => Chan a -> a -> m ()
- readChan :: MonadBase IO m => Chan a -> m a
- dupChan :: MonadBase IO m => Chan a -> m (Chan a)
- getChanContents :: MonadBase IO m => Chan a -> m [a]
- writeList2Chan :: MonadBase IO m => Chan a -> [a] -> m ()
Documentation
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
.