iteratee eneeCheckIfDone vs eneeCheckIfDonePass

Michael Baikov manpacket at
Fri Nov 4 03:43:37 GMT 2011

Current version of eneeCheckIfDone and all Enumeratees (pretty much
every Enumeratee in the library) which uses it are still broken.
I think eneeCheckIfDone should be implemented in terms of
eneeCheckIfDonePass, since eneeCheckIfDone  goes into infinite loop on
every controll message it sees.

Your reasoning about this behaviour was connected to the only control
message you have in your library - seek.
But suppose you are writing some software doing processing of
multicast data (video player analogy). This means that you will have
such control functions as

subscribeMulticast :: String -> Iteratee s m ()
unsubscribeMulticast :: String -> Iteratee s m ()

Those messages should be passed unchanged to the underlying
Enumerator. And to make them work properly currently you have to
reimplement any Enumeratee which uses eneeCheckIfDone - basically
every Enumeratee there is in the library (or create a local fork of
the library with this bug fixed).

Could you please consider this once more and release with
eneeCheckIfDone replaced with checkIfDonePass? Since current
implementation just loops forever on any control messages means that
nobody actually passes any control messages through Enumeratees, which
means no existing code behaviour will be changed. And of cause you can
place a note about your concerns with seek function and different
types of chunks in seek function implementation.

Patch attached
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changes.patch
Type: text/x-patch
Size: 10956 bytes
Desc: not available
URL: <>

More information about the Iteratee mailing list