
In message
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