[Haskell-cafe] Simple way to do something like ArrowChoice.right on a Conduit? (version 1.0.0)

Joey Adams joeyadams3.14159 at gmail.com
Sat Mar 9 03:07:43 CET 2013


On Wed, Mar 6, 2013 at 1:42 AM, Michael Snoyman <michael at snoyman.com> wrote:

>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130308/96d90696/attachment.htm>


More information about the Haskell-Cafe mailing list