haskell infix operator

haskell

Since haskell allows for the use of operators as function names, special operators are frequently seen in haskell libraries. Operator function is called with infix style. The default fixity is infixl 9.

Parentheses can convert an operator into a regular function identifier, which can then be used in prefix style. Backticks can turn an identifier function to an infix operator.

(+) 3 4
3 `add` 4

The following rules are used to translate partial application of operators.

(op e) is translated to \x → x op e
(e op) is translated to \x → e op x

So partial application of $, such as, $ x, yields \f → f $ x.