
Bardur Arantsson wrote:
Hi all,
I was just wondering - would it be reasonable to generalize
sourceIO :: ResourceIO m => IO state -> (state -> IO ()) -> (state -> m (SourceIOResult output)) -> Source m output
to
sourceIO :: ResourceIO m => IO state -> (state -> IO ()) -> (state -> m (state, SourceIOResult output)) -> Source m output
so that the state could be "updated" while producing results?
Would it not be possible to achieve what you want with sourceState: http://hackage.haskell.org/packages/archive/conduit/0.2.0/doc/html/Data-Cond... Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/