chp-1.8.0: An implementation of concurrency ideas from Communicating Sequential Processes

Control.Concurrent.CHP.Channels.Synonyms

Contents

Description

A module containing some useful type synonyms for dealing with channels.

If you get a type error such as:

    Ambiguous type variables `r', `w' in the constraint:
      `Channel r w' arising from a use of `newChannel' at tmp.hs:3:24-33
    Probable fix: add a type signature that fixes these type variable(s)

Then you may want to substitute your use of newChannel for oneToOneChannel (if you are not using channel sharing).

Synopsis

Specific Channel Types

All the functions here are equivalent to newChannel (or newChannelWithLabel), but typed. So for example, oneToOneChannel = newChannel :: MonadCHP m => m OneToOneChannel.

oneToOneChannel :: MonadCHP m => m (OneToOneChannel a)Source

A type-constrained version of newChannel.

oneToOneChannel' :: MonadCHP m => ChanOpts a -> m (OneToOneChannel a)Source

A type-constrained version of newChannel'.

Added in version 1.5.0.

oneToAnyChannel :: MonadCHP m => m (OneToAnyChannel a)Source

A type-constrained version of newChannel.

oneToAnyChannel' :: MonadCHP m => ChanOpts a -> m (OneToAnyChannel a)Source

A type-constrained version of newChannel'.

Added in version 1.5.0.

anyToOneChannel :: MonadCHP m => m (AnyToOneChannel a)Source

A type-constrained version of newChannel.

anyToOneChannel' :: MonadCHP m => ChanOpts a -> m (AnyToOneChannel a)Source

A type-constrained version of newChannel'.

Added in version 1.5.0.

anyToAnyChannel :: MonadCHP m => m (AnyToAnyChannel a)Source

A type-constrained version of newChannel.

anyToAnyChannel' :: MonadCHP m => ChanOpts a -> m (AnyToAnyChannel a)Source

A type-constrained version of newChannel'.

Added in version 1.5.0.