Re: [Haskell-cafe] Conduit : is it possible to write this function?

2013-08-26 Thread Erik de Castro Lopo
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 $

[Haskell-cafe] Conduit : is it possible to write this function?

2013-08-23 Thread Erik de Castro Lopo
Hi all Using the Conduit library is it possible to write the function: eitherSrc :: MonadResource m = Source m a - Source m b - Source m (Either a b) which combines two sources into new output source such that data being produced aysnchronously by the original two sources will

Re: [Haskell-cafe] Conduit : is it possible to write this function?

2013-08-23 Thread Michael Snoyman
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 =