pipes-core: Compositional pipelines
This library offers an abstraction similar in scope to iteratees/enumerators/enumeratees, but with different characteristics and naming conventions.
This package is a fork of the original pipes package by Gabriel Gonzalez. See https://github.com/pcapriotti/pipes-core/wiki/pipes-core-vs-pipes for a comparison between the two packages.
Differences with traditional iteratees:
Simpler semantics: There is only one data type (
Pipe
), two basic primitives (await
andyield
), and only one way to composePipe
s (>+>
). In fact, (>+>
) is just convenient syntax for the composition operator inCategory
. Most pipes can be implemented just using theMonad
instance and composition.Different naming conventions: Enumeratees are called
Pipe
s, Enumerators areProducer
s, and Iteratees areConsumer
s.Producer
s andConsumer
s are just type synonyms forPipe
s with either the input or output end closed.Pipes form a Category: that means that composition is associative, and that there is an identity
Pipe
.Vertical concatenation works on every
Pipe
: (>>
), concatenatesPipe
s. Since everything is aPipe
, you can use it to concatenateProducer
s,Consumer
s, and even intermediatePipe
stages. Vertical concatenation can be combined with composition to create elaborate combinators, without the need of executing pipes in "passes" or resuming partially executed pipes.
Check out Control.Pipe for a copious introduction (in the spirit of the
iterIO
library), and Control.Pipe.Combinators for some basic combinators
and Pipe
examples.
Modules
[Index]
Downloads
- pipes-core-0.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.0.1, 0.1.0 |
---|---|
Dependencies | base (>=4 && <5), categories (>=1.0 && <1.1), lifted-base (>=0.1 && <0.2), monad-control (>=0.3 && <0.4), transformers (>=0.2 && <0.4), void (>=0.5 && <0.6) [details] |
Tested with | ghc ==7.0.3 |
License | BSD-3-Clause |
Copyright | 2012 Gabriel Gonzalez, 2012 Paolo Capriotti |
Author | Gabriel Gonzalez, Paolo Capriotti |
Maintainer | p.capriotti@gmail.com |
Category | Control, Enumerator |
Home page | https://github.com/pcapriotti/pipes-core |
Bug tracker | https://github.com/pcapriotti/pipes-core/issues |
Source repo | head: git clone https://github.com/pcapriotti/pipes-core |
Uploaded | by PaoloCapriotti at 2012-04-09T21:29:15Z |
Distributions | |
Reverse Dependencies | 7 direct, 45 indirect [details] |
Downloads | 2239 total (10 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |