iteratee sequence_ runs a part of an twice

Akio Takano tkn.akio at gmail.com
Fri Dec 9 01:50:53 GMT 2011


Hi,

The following program should print "4 5", but it prints "4 5 5".

import Control.Monad.Trans
import Data.Iteratee
import qualified Data.Iteratee.ListLike as I

iter = do
    x <- I.head
    liftIO $ print x
    y <- I.head
    liftIO $ print y

main = enumList [[4],[5::Int]] (I.sequence_ [iter]) >>= run

I attached a proposed patch to fix the problem.

Regards,
Takano Akio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sequence_.dpatch
Type: application/octet-stream
Size: 11119 bytes
Desc: not available
URL: <http://projects.haskell.org/pipermail/iteratee/attachments/20111209/7bb1ecdc/attachment.obj>


More information about the Iteratee mailing list