Unbounded closeable channels.
- data Chan t a
- data R
- data W
- newChan :: IO (Chan R a, Chan W a)
- writeChan :: Chan W a -> a -> IO Bool
- closeChan :: Chan W a -> IO Bool
- isClosedChan :: Chan t a -> IO Bool
- readChan :: Chan R a -> IO (Maybe a)
- forkChan :: Chan t a -> IO (Chan R a)
- unGetChan :: Chan R a -> a -> IO ()
- isEmptyChan :: Chan R a -> IO Bool
- getChanContents :: Chan R a -> IO [a]
- writeList2Chan :: Chan W a -> [a] -> IO (Maybe [a])
Build and returns a pair of
Chan, data written on the W end can be read from the R end.
Write a value to a
Returns True if successful, False if the channel is closed.
Chan: data that will be written (W)
or is yet to be read (R) on the argument, will also be available on the returned channel.
Put a data item back onto a channel, where it will be the next item read.
Return a lazy list representing the contents of the supplied
Chan, much like