chan-split-0.4.0: Concurrent Chans as read/write pairs. Also provides generic Chan pair class.

Safe HaskellSafe-Infered

Control.Concurrent.Chan.Class

Synopsis

Documentation

class SplitChan i o | i -> o, o -> i whereSource

A class for chan types with a "write end" and a "read end". A minimal complete instance defines readChan and one of writeChan or writeList2Chan.

Methods

readChan :: o a -> IO aSource

Read the next value from the OutChan.

writeList2Chan :: i a -> [a] -> IO ()Source

Write an entire list of items to a chan type

writeChan :: i a -> a -> IO ()Source

Write a value to a Chan type.

class SplitChan i o => NewSplitChan i o whereSource

A class for SplitChan types that can be instantiated without programmer input. e.g. the standard haskell Chan is a member of this class, however a bounded chan type that took an Int to define the buffer size would not.

Methods

newSplitChan :: IO (i a, o a)Source