Skip to content
Cinch
← Control.Channel API referenceSAMPLE LISTING
cinch-async / 0.1.1Control/Channel.cinch

Declaration source.

This sample listing contains the declarations shown in the API reference. Package implementations will appear here when real package data is connected.

module Control.Channel where
3-- A bounded channel used to transfer values between tasks.
4opaque Channel a
5
6-- Send a value, waiting when the channel is full.
7send :: forall a. Channel a -> a ->{Io r} Unit
8
9-- Receive the next value. A closed channel produces None.
10receive :: forall a. Channel a ->{Io r} Option a