On Sat, 21 Aug 2010 13:36:08 -0700, John Millikin <jmilli...@gmail.com> wrote:
> On Sat, Aug 21, 2010 at 12:44, Magnus Therning <mag...@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[1]?
> 
> 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?

-- 
Nicolas Pouillard
http://nicolaspouillard.fr
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to