In message <a48d8ad5-c284-4a2e-9b4f-c84608f72...@cs.uu.nl>,
"S. Doaitse Swierstra" writes:

>Currently Haskell has infix, infixl and infixr operators. I see a use for infi
>xlr as well. This indicates that the implemtation may assume the operator to b
>e associative, and thus has the freedom to "balance" an expression containing 
>several operator occurrences.

How would this compare with the GHC's RULES pragma? I think you might
be able to express associativity with the rewrite rules? For example,
GHC's Control.Category library already specifies associativity for the
Category class in rewrite rules. It's not clear to me whether the
rewrite rules allow the compiler to do this balancing in practice, but
in principle the information content in the corresponding rewrite rule
is the same.
-- 
  Esa Pulkkinen
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to