The foldl-transduce package

[Tags:benchmark, bsd3, library, test]

Stateful transducers and streaming-preserving grouping operations for foldl folds.

[Skip to Readme]


Versions 0.0.1,,,,,,,,,,,,,,,,,,,,,
Change log CHANGELOG
Dependencies base (==4.*), bifunctors (>=5), bytestring (>=, comonad (>=4), containers, foldl (>=1.1.5), free (>=4), monoid-subclasses (==0.4.*), profunctors (>=5), semigroupoids (>=5.0), semigroups (>=0.18), split (>=0.2.2), text (>=, transformers (>=, void (>=0.6) [details]
License BSD3
Copyright 2015 Daniel Diaz
Author Daniel Diaz
Stability Unknown
Category Control
Bug tracker
Source repository head: git clone
Uploaded Tue Feb 16 21:36:22 UTC 2016 by DanielDiazCarrete
Distributions NixOS:
Downloads 1493 total (7 in the last 30 days)
1 []
Status Docs available [build log]
Last success reported on 2016-02-16 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for foldl-transduce

Readme for foldl-transduce-

What's in this library?

Stateful transducers and streaming-preserving group operations for the folds in Gabriel Gonzalez's foldl package.

When to use this library?

  • When you want to wrap a stateful decoder over a Fold. An example is decoding UTF-8: the decoder must be stateful because a multi-byte character may have been split across two blocks of bytes.

  • When you want to tweak the stream of data that arrives into a Fold, but only at certain positions. Stripping whitespace at the beginning of a text stream, for example.

  • When you want to perform group operations without breaking "streaminess", similar to what pipes-group does.

Why use this library for grouping instead of pipes-group?

Grouping fold-side instead of producer-side has the advantage that, since the results are still Folds, you can combine them using Applicative.

Also, Folds can work with sources other than Producers from pipes.

Grouping fold-side has limitations as well:

  • You can't perform bracketing operations like "withFile" that span the folding of an entire group. pipes-group allows them.

  • You have more flexibility in pipes-group to decide how to delimit and fold the next group based on previous results.

Where can I find working examples for this library?

In the examples folder of the repo.