chan-split-0.4.0: chan-split.cabal
-- chan-split.cabal auto-generated by cabal init. For additional
-- options, see
-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
-- The name of the package.
Name: chan-split
Homepage: http://coder.bsimmons.name/blog/2011/07/module-chan-split-released/
-- The package version. See the Haskell package versioning policy
-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
-- standards guiding when and how versions should be incremented.
Version: 0.4.0
-- A short (one-line) description of the package.
Synopsis: Concurrent Chans as read/write pairs. Also provides generic
Chan pair class.
-- A longer description of the package.
Description: An implementation of concurrent channels identical to
Control.Concurrent.Chan, except that the channel is
represented as a pair, one of which allows only read
operations, the other write operations.
.
This makes code easier to reason about (the types strictly
delegate read/write permission), suggests useful instances
(e.g. 'Functor' and 'Contravariant' are easily defined)
on the chan pairs, and simplifies the API.
.
Furthermore this allows messages sent to channels with no
readers to be trivially garbage-collected, without relying
on inlining optimizations.
.
We also provide a module that defines a class 'SplitChan'
which defines the basic methods any pair of Chan types
should provide, allowing easy swapping of Chan
implementations.
.
To use standard Chans with these polymorphic functions,
import as follows:
.
> import Control.Concurrent.Chan hiding (readChan,writeChan,writeList2Chan)
> import Control.Concurrent.Chan.Class
.
When used alongside standard Chans, the Split module can be
imported qualified like:
.
> import qualified Control.Concurrent.Chan.Split as S
.
Its interface is mostly backwards compatible with Chan.
Note, we do not implement the deprecated unGetChan and
isEmptyChan functions.
.
This module is used internally by the "simple-actors" package.
.
/CHANGES/: 0.3.0 -> 0.4.0
.
- In\/OutChans now implemented from scratch (after Leon P Smith's implementation)
.
- no longer implement Functor\/Contravariant instances; drop contravariant dependency
.
- implement Eq and Typeable instances
.
-- The license under which the package is released.
License: BSD3
-- The file containing the license text.
License-file: LICENSE
-- The package author(s).
Author: Brandon Simmons
-- An email address to which users can send suggestions, bug reports,
-- and patches.
Maintainer: brandon.m.simmons@gmail.com
-- A copyright notice.
-- Copyright:
Category: Concurrency
Build-type: Simple
-- Extra files to be distributed with the package, such as examples or
-- a README.
-- Extra-source-files:
-- Constraint on the version of Cabal needed to build this package.
Cabal-version: >=1.6
source-repository head
type: git
location: https://github.com/jberryman/chan-split.git
Library
-- for the split chan class:
Extensions: MultiParamTypeClasses
, FunctionalDependencies
-- for Functor / Contravariant instances:
, GADTs
Exposed-modules: Control.Concurrent.Chan.Split
, Control.Concurrent.Chan.Class
Build-depends: base >= 4 && < 5
ghc-options: -Wall
-- Modules not exported by this package.
-- Other-modules:
-- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
-- Build-tools: