
2 Apr
2011
2 Apr
'11
10:39 a.m.
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))