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

Joey Adams joeyadams3.14159 at gmail.com
Fri Mar 1 09:22:59 CET 2013


On Thu, Feb 28, 2013 at 9:18 PM, Joey Adams <joeyadams3.14159 at gmail.com>wrote:

> Can I transform a conduit so some values are passed through unchanged, but
> others go through the conduit?  For example:
>
>     right :: Conduit i m o -> Conduit (Either x i) m (Either x o)
>

Actually, I didn't need this after all.  I'm using Automaton from the
arrows package for the first part of my pipeline.  Only the zlib
compression step is a Conduit, so I can just use arrow functions to lift
Flush to the rest.

Nonetheless, someone else might want to do this.  Now that I think of it,
not all of the arrow operations make sense (in particular, (***)), but
splitting data between conduits (like ArrowChoice (+++)) does make sense, I
think.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130301/a62080e9/attachment.htm>


More information about the Haskell-Cafe mailing list