The conduit package
conduit is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I/O which guarantees deterministic resource handling, and fits in the same general solution space as enumerator/iteratee and pipes. For a brief tutorial, please see the Data.Conduit module.
- The internals of the package are now separated to the .Internal module, leaving only the higher-level interface in the advertised API. Internally, switched to a Leftover constructor and slightly tweaked the finalization semantics.
- Inspired by the design of the pipes package: we now have a single unified type underlying Source, Sink, and Conduit. This type is named Pipe. There are type synonyms provided for the other three types. Additionally, BufferedSource is no longer provided. Instead, the connect-and-resume operator, $$+, can be used for the same purpose.
- ResourceT has been greatly simplified, specialized for IO, and moved into a separate package. Instead of hard-coding ResourceT into the conduit datatypes, they can now live around any monad. The Conduit datatype has been enhanced to better allow generation of streaming output. The SourceResult, SinkResult, and ConduitResult datatypes have been removed entirely.
- Instead of storing state in mutable variables, we now use CPS. A Source returns the next Source, and likewise for Sinks and Conduits. Not only does this take better advantage of GHC's optimizations (about a 20% speedup), but it allows some operations to have a reduction in algorithmic complexity from exponential to linear. This also allowed us to remove the Prepared set of types. Also, the State functions (e.g., sinkState) use better constructors for return types, avoiding the need for a dummy state on completion.
- BufferedSource is now an abstract type, and has a much more efficient internal representation. The result was a 41% speedup on microbenchmarks (note: do not expect speedups anywhere near that in real usage). In general, we are moving towards BufferedSource being a specific tool used internally as needed, but using Source for all external APIs.
- Initial release.
|Versions||0.0.0, 0.0.0.1, 0.0.0.2, 0.0.1, 0.0.1.1, 0.0.2, 0.0.3, 0.0.4, 0.1.0, 0.1.1, 0.1.1.1, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.4.0, 0.4.0.1, 0.4.1, 0.4.1.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.2.1, 0.5.2.2, 0.5.2.3, 0.5.2.4, 0.5.2.5, 0.5.2.6, 0.5.2.7, 0.5.3, 0.5.4, 0.5.4.1, 0.5.4.2, 0.5.5, 0.5.6, 1.0.0, 220.127.116.11, 18.104.22.168, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 22.214.171.124, 126.96.36.199, 1.0.5|
|Dependencies||base (≥4.3 & <5), bytestring (≥0.9), containers, lifted-base (≥0.1), monad-control (≥0.3.1 & <0.4), resourcet (≥0.4.2 & <0.5), text (≥0.11), transformers (≥0.2.2 & <0.4), transformers-base (≥0.4.1 & <0.5), void (≥0.5.5 & <0.6)|
|Source repository||git clone git://github.com/snoyberg/conduit.git|
|Upload date||Wed Nov 7 13:21:35 UTC 2012|
|Distributions||Fedora: 0.5.2.7, NixOS: 1.0.5, Debian: 1.0.0, FreeBSD: 1.0.2|