next up previous contents
Next: Notational conventions used in Up: No Title Previous: Identifiers

Infixed operators

 

An identifier may be given infix status by the infix or infixr directive, which may occur as a declaration. If identifier id has infix status, then exp tex2html_wrap_inline1439id exp tex2html_wrap_inline1441id(exp, exp) or id{1= exp,2=exp} would otherwise occur. Infix identifiers in patterns are analogous. On the other hand, an occurrence of a qualified identifier, or any identifier prefixed by op, is treated as non-infixed. The form of the fixity directives is as follows ( tex2html_wrap_inline1443

tabular112

where tex2html_wrap_inline1455d indicating binding precedence. A higher value of d indicates tighter binding; the default is 0. Fixity directives are subject to the usual scope rules governing visibility of identifiers declared inside let and local.

Mixed left-associative operators of the same precedence associate to the left, mixed right-associative operators of the same precedence associate to the right, and it is illegal to mix left- and right-associative operators of the same precedence.



Moscow ML 1.42