chp-1.5.1: An implementation of concurrency ideas from Communicating Sequential ProcessesSource codeContentsIndex
Control.Concurrent.CHP.Channels.Synonyms
Contents
Specific Channel Types
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
type OneToOneChannel = Chan Chanin Chanout
oneToOneChannel :: MonadCHP m => m (OneToOneChannel a)
oneToOneChannel' :: MonadCHP m => ChanOpts a -> m (OneToOneChannel a)
type OneToAnyChannel = Chan (Shared Chanin) Chanout
oneToAnyChannel :: MonadCHP m => m (OneToAnyChannel a)
oneToAnyChannel' :: MonadCHP m => ChanOpts a -> m (OneToAnyChannel a)
type AnyToOneChannel = Chan Chanin (Shared Chanout)
anyToOneChannel :: MonadCHP m => m (AnyToOneChannel a)
anyToOneChannel' :: MonadCHP m => ChanOpts a -> m (AnyToOneChannel a)
type AnyToAnyChannel = Chan (Shared Chanin) (Shared Chanout)
anyToAnyChannel :: MonadCHP m => m (AnyToAnyChannel a)
anyToAnyChannel' :: MonadCHP m => ChanOpts a -> m (AnyToAnyChannel a)
Specific Channel Types
All the functions here are equivalent to newChannel (or newChannelWithLabel), but typed. So for example, oneToOneChannel = newChannel :: MonadCHP m => m OneToOneChannel.
type OneToOneChannel = Chan Chanin ChanoutSource
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.

type OneToAnyChannel = Chan (Shared Chanin) ChanoutSource
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.

type AnyToOneChannel = Chan Chanin (Shared Chanout)Source
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.

type AnyToAnyChannel = Chan (Shared Chanin) (Shared Chanout)Source
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.

Produced by Haddock version 2.4.2