[Haskell-cafe] Arrow preprocessor and *** combinator

Peter Verswyvelen bugfact at gmail.com
Wed Apr 29 09:07:25 EDT 2009

After doing some pragmatic tests, it seems that neither the arrow
preprocessor nor GHC's builtin one generate / optimize to the (***)
For example,

p = proc (x,y) -> do
  x' <- f <- x
  y' <- g <- y
  return (x',y')

is equivalent to

p = f *** g

But I have the impression this kind of rewrites is not being done? Is it
possible to provide rewrite rules for arrows?

Since *** is a method of the arrow type class, it might have a more optimal

I haven't looked at the arrow preprocessor or GHC's code  yet, but comments
are welcome, I might see things wrongly.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090429/c54c5e01/attachment.htm

More information about the Haskell-Cafe mailing list