[Haskell-cafe] Fixity declaration extension
Twan van Laarhoven
twanvl at gmail.com
Tue Aug 14 17:17:20 CEST 2012
On 14/08/12 13:46, Ketil Malde wrote:
> AntC <anthony_clayden at clear.net.nz> writes:
>
>> I agree. I don't declare operators very often, and when I do I always struggle
>> to remember which way round the precedence numbers go.
> [...]
>> (Anything else we can bikeshed about while we're at it?)
>
> infixl * before +
>
> Perhaps "before" and "after" clearer than "higher" and "lower"?
I would pick "tighter than" and "looser than", but I suppose that "before" and
"after" are also clear enough. Or maybe "inside" and "outside"?
I don't think that we really need a new keyword for precedence declarations. The
current "infix" would suffice if the default was for operators to be non-fix and
of indeterminate precedence. Multiple fixity declarations for the same operator
should then be allowed. Or perhaps just require that separate declarations use
the same "infix[lr]?" keyword.
Twan
More information about the Haskell-Cafe
mailing list