See the official user manual for the most up-to-date version of the information on this page.

The fixity of (binary) operators operators can be specified using the following syntax. There are three kinds of fixity, non-, left- and right-associativity (infix, infixl, and infixr, respectively).

  infix  n op
  infixl n op
  infixr n op

Here n is a number [0..] indicating the operator's precedence and op an operator (simply a function), for example of the form _*_. A higher number means the precedence is higher, i.e. the operator binds more strongly than an operator with a lower numeric value.

If you don't know much about associativity or fixity, See wikipedia.

Page last modified on December 14, 2018, at 06:44 pm
Powered by PmWiki