On Sun, Nov 6, 2011 at 4:46 PM, Duncan Coutts <duncan.coutts@googlemail.com> wrote:
> Ultimately no code breaks, after all it is changing the associativity of an> operator that is by definition *associative*. ;)
That's what I thought too, but I already gave an example:
a <> empty <+> b
This means different things depending on whether we use infixl or
infixr. And as I noted, this doesn't bite Text.PrettyPrint.Leijen
because it lacks the <+> unit law.
So my tentative suggestion is:
infixr 6 <>
infixr 5 <+>
infixr 4 $$, $+$
So <> binds tighter than <+> and $$ and $+$ are still lower precedence
than <> and <+>, but switched round to being right associative.