> The Category law would be broken, though:
>
> unawait x >>> id == yield x !== unawait x

How did you get this equation? It's not even well-typed:

unawait :: a -> Pipe a b m ()
yield :: b -> Pipe a b m ()

Someone actually implemented a variation of Pipes with unawait:
https://github.com/duairc/pipes/blob/master/src/Control/Pipe/Common.hs
(it's called 'unuse' there).

I actually agree that it might break associativity or identity, but I
don't have a counterexample in mind yet.

BR,
Paolo

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

Reply via email to