
On Wed, Mar 6, 2013 at 1:42 AM, Michael Snoyman
I'm still not sure I follow this. In the example I linked to, the go function within breaker could arbitrarily modify the data before it gets passed on to the inner Conduit. So it seems like it should be possible to achieve your goals this way. But I may just not fully understand your use case.
I would have to put my entire message handler in a Sink monad. Also, I'm not sure this approach would work if I wanted to use multiple conduits to process different types of messages, since everything has to go through the zlib conduit. In any case, my existing code is a StateT computation. It'd be convenient if I could just make the ResumableConduit part of my state, rather than turning all that code into a Sink. I pushed a "resumable" branch [1] with a (stub) Data.Conduit.Resumable module. It has ResumableSource, ResumableSink, and ResumableConduit. Data.Conduit re-exports ResumableSource operations. [1]: https://github.com/joeyadams/conduit/tree/resumable