Use enumHandle.

enumFile deals with the common case of "read from the filesystem in IO". It 
can't deal with general MonadIO monads because there'd be no guarantee that 
the handle would actually be closed (eg, an ErrorT IO might never run the 
cleanup).

If you need a special monad, do something like:

withBinaryFile $ \h -> runMyMonad (run_ (enumHandle h $$ myIter))
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to