pipes-transduce

Interfacing pipes with foldl folds.

Latest on Hackage:0.4.4.0

See all snapshots pipes-transduce appears in

BSD-3-Clause licensed by Daniel Diaz

Module documentation for 0.4

This version can be pinned in stack with:pipes-transduce-0.4@sha256:1a20855a6ce2f5145f56984afa94eb940e83fe93db9c70290b948c78279a92ff,2123

What’s in this library?

A pair of fold-like datatypes that consume Producers from pipes and can be constructed in a variety of ways, in particular from the more versatile folds in Gabriel Gonzalez’s foldl package.

The Fold1 consumes a single Producer, while the Fold2 datatype consumes two Producers concurrently.

Why was this library created?

I wanted a fold-like datatype for Producers that allowed “bracketing” operations like “withFile”.

I also wanted to be able to fold two Producers concurrently (for example, merge the piped stdout & stderr streams of an external process into one unified stream).

Finally, I wanted the fold-like datatype to have a “failure option” baked in.

If you don’t need any of that, you are better off using pipes and/or foldl by themselves.

Where can I find working examples for this library?

There are none yet.