Safe Haskell | None |
---|
- data InChan i
- data OutChan i
- getChanContents :: OutChan a -> IO [a]
- dupChan :: OutChan a -> IO (OutChan a)
- module Control.Concurrent.Chan.Class
Chan pairs
The "write side" of a chan pair
The "read side" of a chan pair
Utility functions:
getChanContents :: OutChan a -> IO [a]Source
Return a lazy list representing the contents of the supplied OutChan, much like System.IO.hGetContents.
dupChan :: OutChan a -> IO (OutChan a)Source
Duplicate an OutChan
: the duplicate channel contains any unread messages
in the original (n.b. this differs from the behavior of dupChan in Chan),
and data written to the corresponding InChan
will appear in both, i.e.
consuming a value from the copy will have no affect on the values in the
original OutChan.
(Note that a duplicated channel is not equal to its original.
So: fmap (c /=) $ dupChan c
returns True
for all c
.)