[Haskell] Re: ANNOUNCE: enumerator, an alternative iteratee package

John Millikin jmillikin at gmail.com
Fri Aug 20 23:30:53 EDT 2010


Just released 0.2. It has the text IO and codecs module, with support
for ASCII, ISO-8859-1, UTF-8, UTF-16, and UTF-32. It should be
relatively easy to add support for codec libraries like libicu or
libiconv in the future. Both encoding and decoding are incremental, so
you can (for example) process million-line logfiles in constant space.

Examples/wc.hs has been updated to use this decoding module for its
"character count" mode, which should allow users to see how it's used.
Basically, you use 'joinI' to flatten the iteratees returned from
enumeratees. The joinI / enumeratee style is used for implementing
nested streams.

This also changes the binary enumHandle to use non-blocking IO, as
recommended by Magnus Therning. I'm embarrassed to admit I still don't
understand the improvement, exactly, but three people so far have told
me it's a good idea.

As always, API docs and a literate PDF are available at:

http://ianen.org/haskell/enumerator/api-docs/
http://ianen.org/haskell/enumerator/enumerator.pdf


More information about the Haskell mailing list