
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? I've found there are a few situations where the lack of "state threading" is forcing me to use MVars where it would actually be a lot nicer and simpler to just thread an accumulator. AFAICT from the sourceIO implementation there shouldn't really be any problem with doing this. Am I overlooking something? Regards,