[Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator,
an alternative iteratee package
nicolas.pouillard at gmail.com
Mon Aug 23 03:14:50 EDT 2010
On Sat, 21 Aug 2010 13:36:08 -0700, John Millikin <jmillikin at gmail.com> wrote:
> On Sat, Aug 21, 2010 at 12:44, Magnus Therning <magnus at therning.org> wrote:
> > As an aside, has anyone written the code necessary to convert a parser, such
> > as e.g. attoparsec, into an enumerator-iteratee?
> This sort of conversion is trivial. For an example, I've uploaded the
> attoparsec-enumerator package at <
> http://hackage.haskell.org/package/attoparsec-enumerator > --
> iterParser is about 20 lines, excluding the module header and imports.
< A.Done extra a -> E.yield a (E.Chunks [extra])
Maybe it would be better to check if extra is empty to produce
an empty list of chunks?
More information about the Haskell-Cafe