Write stream processing computations with monadic side effects and compose them in a series of tubes.
This is similar to the pipes and conduit libraries in purpose but its implementation is very different. A tube is either a
Source m a
, yielding values of typea
;Sink m a
, awaiting values of typea
; orChannel m a b
, transforminga
values intob
values.
These are all aliases for the same fundamental type: Tube a b m ()
. However
the different variations are all instances of different classes which endow
them with useful capabilities.
The opposite of a tube, the Pump
, is also provided in this package. While it
has not been explored as thoroughly as the Tube
, Pump
is used internally to
run tube computations and fold over streams.
Thorough documentation, examples, and more information are available at http://hackage.haskell.org/package/tubes
(c) 2014 - 2016 Gatlin Johnson gatlin@niltag.net
See LICENSE
.
Use the Issues feature of GitHub to send me bugs. For all other inquiries, please send mail to gatlin@niltag.net with "Tubes" somewhere in the subject line.
Some terms and ideas were stolen from Gabriel Gonzalez, author of the pipes library.