HORIZON HASKELLDocslts/ghc-10.0.xc62e4de2026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · c62e4de · 2026-10-19

Moduleconcurrency-1.11.0.3Haskell2010

Control.Concurrent.Classy.Chan

Unbounded channels.

Deviations: Chan as defined here does not have an Eq instance, this is because the MonadConc MVar type does not have an Eq constraint. The deprecated unGetChan and isEmptyCHan functions are not provided. Furthermore, the getChanContents function is not provided as it needs unsafe I/O.

  • 1 type
  • 5 values

The Chan type

1 declaration
datadata Chan (m :: Type -> Type) a
#

Chan is an abstract type representing an unbounded FIFO channel.

Operations

4 declarations
valuedupChan :: MonadConc m => Chan m a -> m (Chan m a)
#

Duplicate a Chan: the duplicate channel begins empty, but data written to either channel from then on will be available from both. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.

Stream interface

1 declaration