After doing some pragmatic tests, it seems that neither the arrow preprocessor nor GHC's builtin one generate / optimize to the (***) combinator.<div><br></div><div>For example,</div><div><br></div><div>p = proc (x,y) -> do</div>
<div> x' <- f <- x</div><div> y' <- g <- y</div><div> return (x',y')</div><div><br></div><div>is equivalent to</div><div><br></div><div>p = f *** g</div><div><br></div><div>But I have the impression this kind of rewrites is not being done? Is it possible to provide rewrite rules for arrows?</div>
<div><br></div><div>Since *** is a method of the arrow type class, it might have a more optimal implementation.</div><div><br></div><div>I haven't looked at the arrow preprocessor or GHC's code yet, but comments are welcome, I might see things wrongly.<br>
</div><div><br></div><div>Cheers,</div><div>Peter</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br><div><br></div></div></div>