pipes: Compositional pipelines

[ bsd3, control, library, pipes ] [ Propose Tags ]

"Iteratees done right". This library implements iteratees/enumerators/enumeratees simply and elegantly, but uses different naming conventions.

Advantages over traditional iteratee implementations:

  • Simpler semantics: There is only one data type (Pipe), two primitives (await and yield), and only one way to compose Pipes (.). In fact, this library introduces no new operators, using only its Monad and Category instances to implement all behavior.

  • Clearer naming conventions: Enumeratees are called Pipes, Enumerators are Producers, and Iteratees are Consumers. Producers and Consumers are just type synonyms for Pipes with either the input or output end closed.

  • Pipes are Categories: You compose them using ordinary composition. There are actually two Category instances: one for Lazy composition and one for Strict composition. Both instances satisfy the Category laws.

  • Intuitive: Pipe composition is easier to reason about because it is a true Category. Composition works seamlessly and you don't have to worry about restarting iteratees, feeding new input, etc. "It just works".

  • Vertical concatenation works flawlessly on everything: (>>) concatenates Pipes, but since everything is a Pipe, you can use it to concatenate Producers, Consumers, and even intermediate Pipe stages. Vertical Concatenation always works the way you expect, picking up where the previous Pipe left off.

  • Symmetric implementation: Most iteratee libraries are either enumerator-driven or iteratee-driven. Pipes are implemented symmetrically, which is why they can be composed with either Lazy (Consumer-driven) or Strict (Producer-driven) semantics.

Check out Control.Pipe for a copious introduction (in the spirit of the iterIO library) and Control.Pipe.Common for the actual implementation.

This library does not yet provide convenience Pipes for common operations, but they are forthcoming. However, there are several examples in the documentation to get you started and I encourage you to write your own to see how easy they are to write.


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS] 1.0, 1.0.1, 1.0.2, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.1.9, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8, 4.3.9, 4.3.10, 4.3.11, 4.3.12, 4.3.13, 4.3.14, 4.3.15, 4.3.16
Dependencies base (>=4 && <5), mtl, void [details]
License BSD-3-Clause
Copyright 2012 Gabriel Gonzalez
Author Gabriel Gonzalez
Maintainer Gabriel439@gmail.com
Category Control, Enumerator
Bug tracker mailto:Gabriel439@gmail.com
Source repo head: git clone https://github.com/Gabriel439/Haskell-Pipes-Library
Uploaded by GabrielGonzalez at 2012-03-20T19:57:30Z
Distributions Arch:4.3.16, Debian:4.3.14, Fedora:4.3.16, LTSHaskell:4.3.16, NixOS:4.3.16, Stackage:4.3.16, openSUSE:4.3.16
Downloads 99552 total (197 in the last 30 days)
Rating 2.75 (votes: 10) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-06-04 [all 1 reports]