
11 Mar
2012
11 Mar
'12
9:09 a.m.
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