Michael Snoyman wrote:

> You can build this up using the >=< operator[1] in stm-conduit, something
> like:
> 
> eitherSrc :: MonadResourceBase m
>              => Source (ResourceT m) a -> Source (ResourceT m) b -> Source
> (ResourceT m) (Either a b)
> eitherSrc src1 src2 = do
>     join $ lift $ Data.Conduit.mapOutput Left src1 >=<
> Data.Conduit.mapOutput Right src2
> 
> I think this can be generalized to work with more base monads with some
> tweaks to (>=<).

Thanks Michael, that looks like it will fit the bill!

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to