[Haskell-cafe] ANNOUNCE: enumerator 0.4.8

John Millikin jmillikin at gmail.com
Sat Mar 26 20:03:27 CET 2011

On Mar 26, 10:46 am, Michael Snoyman <mich... at snoyman.com> wrote:
> As far as the left-over data in a yield issue: does that require a
> breaking API change, or a change to the definition of >>= which would
> change semantics??

It requires a pretty serious API change, as the definition of
'Iteratee' itself is at fault. Unfortunately, Oleg's new definitions
also have problems (they can yield extra on a continue step), so I'm
at a bit of a loss as to what to do. Either way, underlying primitives
allow users to create iteratees with invalid/undefined behavior. Not
very Haskell-y.

All of the new high-level functions added in recent versions are part
of an attempted workaround. I'd like to move the Iteratee definitions
themselves to a ``Data.Enumerator.Internal`` module, and add some
words discouraging their direct use. There would still be some API
breaks (the >>== , $$, and >==> operators would go away) but at least
clients wouldn't be subjected to a complete rewrite.

Since the API is being broken anyway, I'm also going to take the
opportunity to change the Stream type so it can represent "EOF + some
data". That should allow lots of interesting behaviors, such as
arbitrary lookahead.

More information about the Haskell-Cafe mailing list