[Haskell-cafe] Operator precedence
dave at zednenem.com
Mon Sep 6 14:55:41 EDT 2010
On Mon, Sep 6, 2010 at 2:21 PM, Daniel Díaz <danieldiaz at asofilak.es> wrote:
> El Lun, 6 de Septiembre de 2010, 7:50 pm, David Menendez escribió:
>> Operators default to infixl 9 unless specified otherwise,
>> so no infix declaration is needed.
> Why there is a default infix? Why it is 9?
That's what the Haskell Report says: "Any operator lacking a fixity
declaration is assumed to be infixl 9" (section 4.4.2).
Any function with at least two arguments can be used as an operator,
so there has to be a default. Presumably, infixl 9 was considered the
Dave Menendez <dave at zednenem.com>
More information about the Haskell-Cafe