name: enumerator version: 0.4.20 license: MIT license-file: license.txt author: John Millikin maintainer: jmillikin@gmail.com copyright: 2010-2011 John Millikin, 2011 Mikhail Vorozhtsov build-type: Simple cabal-version: >= 1.6 category: Data, Enumerator stability: experimental homepage: https://john-millikin.com/software/enumerator/ bug-reports: mailto:jmillikin@gmail.com synopsis: Reliable, high-performance processing with left-fold enumerators description: Typical buffer–based incremental I/O is based around a single loop, which reads data from some source (such as a socket or file), transforms it, and generates one or more outputs (such as a line count, HTTP responses, or modified file). Although efficient and safe, these loops are all single–purpose; it is difficult or impossible to compose buffer–based processing loops. . Haskell’s concept of “lazy I/O” allows pure code to operate on data from an external source. However, lazy I/O has several shortcomings. Most notably, resources such as memory and file handles can be retained for arbitrarily long periods of time, causing unpredictable performance and error conditions. . Enumerators are an efficient, predictable, and safe alternative to lazy I/O. Discovered by Oleg Kiselyov, they allow large datasets to be processed in near–constant space by pure code. Although somewhat more complex to write, using enumerators instead of lazy I/O produces more correct programs. . This library contains an enumerator implementation for Haskell, designed to be both simple and efficient. Three core types are defined, along with numerous helper functions: . * /Iteratee/: Data sinks, analogous to left folds. Iteratees consume a sequence of /input/ values, and generate a single /output/ value. Many iteratees are designed to perform side effects (such as printing to @stdout@), so they can also be used as monad transformers. . * /Enumerator/: Data sources, which generate input sequences. Typical enumerators read from a file handle, socket, random number generator, or other external stream. To operate, enumerators are passed an iteratee, and provide that iteratee with input until either the iteratee has completed its computation, or EOF. . * /Enumeratee/: Data transformers, which operate as both enumerators and iteratees. Enumeratees read from an /outer/ enumerator, and provide the transformed data to an /inner/ iteratee. extra-source-files: benchmarks/enumerator-benchmarks.cabal benchmarks/Benchmarks.hs -- examples/cat.hs examples/wc.hs -- scripts/common.bash scripts/dist scripts/run-benchmarks scripts/run-coverage scripts/run-tests -- tests/enumerator-tests.cabal tests/data/ascii-crlf.txt tests/data/ascii-lf.txt tests/data/utf8-crlf.txt tests/data/utf8-lf.txt tests/EnumeratorTests.hs tests/EnumeratorTests/Binary.hs tests/EnumeratorTests/Binary/Consume.hs tests/EnumeratorTests/Binary/Drop.hs tests/EnumeratorTests/Binary/Fold.hs tests/EnumeratorTests/Binary/Handle.hs tests/EnumeratorTests/Binary/Isolate.hs tests/EnumeratorTests/Binary/Iterate.hs tests/EnumeratorTests/Binary/Map.hs tests/EnumeratorTests/Binary/Repeat.hs tests/EnumeratorTests/Binary/Replicate.hs tests/EnumeratorTests/Binary/Require.hs tests/EnumeratorTests/Binary/Split.hs tests/EnumeratorTests/Binary/Unfold.hs tests/EnumeratorTests/Binary/Util.hs tests/EnumeratorTests/Binary/Zip.hs tests/EnumeratorTests/CatchError.hs tests/EnumeratorTests/Compatibility.hs tests/EnumeratorTests/Instances.hs tests/EnumeratorTests/Join.hs tests/EnumeratorTests/List.hs tests/EnumeratorTests/List/Consume.hs tests/EnumeratorTests/List/Drop.hs tests/EnumeratorTests/List/Fold.hs tests/EnumeratorTests/List/Isolate.hs tests/EnumeratorTests/List/Iterate.hs tests/EnumeratorTests/List/Map.hs tests/EnumeratorTests/List/Repeat.hs tests/EnumeratorTests/List/Replicate.hs tests/EnumeratorTests/List/Require.hs tests/EnumeratorTests/List/Split.hs tests/EnumeratorTests/List/Unfold.hs tests/EnumeratorTests/List/Unique.hs tests/EnumeratorTests/List/Util.hs tests/EnumeratorTests/List/Zip.hs tests/EnumeratorTests/Misc.hs tests/EnumeratorTests/Sequence.hs tests/EnumeratorTests/Stream.hs tests/EnumeratorTests/Text.hs tests/EnumeratorTests/Text/Codecs.hs tests/EnumeratorTests/Text/Consume.hs tests/EnumeratorTests/Text/Drop.hs tests/EnumeratorTests/Text/Fold.hs tests/EnumeratorTests/Text/Handle.hs tests/EnumeratorTests/Text/Isolate.hs tests/EnumeratorTests/Text/Iterate.hs tests/EnumeratorTests/Text/Map.hs tests/EnumeratorTests/Text/Repeat.hs tests/EnumeratorTests/Text/Replicate.hs tests/EnumeratorTests/Text/Require.hs tests/EnumeratorTests/Text/Split.hs tests/EnumeratorTests/Text/Unfold.hs tests/EnumeratorTests/Text/Util.hs tests/EnumeratorTests/Text/Zip.hs tests/EnumeratorTests/Trans.hs tests/EnumeratorTests/Util.hs source-repository head type: git location: https://john-millikin.com/code/haskell-enumerator/ source-repository this type: git location: https://john-millikin.com/code/haskell-enumerator/ tag: haskell-enumerator_0.4.20 library ghc-options: -Wall -O2 hs-source-dirs: lib build-depends: base >= 4.0 && < 5.0 , transformers >= 0.2 , bytestring >= 0.9 , containers >= 0.1 , text >= 0.7 if impl(ghc >= 7.7) cpp-options: -DGHC78_DATA_TYPEABLE=1 exposed-modules: Data.Enumerator Data.Enumerator.Binary Data.Enumerator.Internal Data.Enumerator.IO Data.Enumerator.List Data.Enumerator.Text Data.Enumerator.Trans other-modules: Data.Enumerator.Compatibility Data.Enumerator.Util