Some normal identifiers: x, x',
foo, Bool.
Some module identifiers: foo$bar, System$Bool
abstract, case, concrete, data, do, in, interface, let, module of, open, native, private, public, sig, struct, type, use
! @ # $ % & * + . / < = > ? \ ^ | : - ~ , ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ × ÷An operators can be used where a variable is needed by enclosing it in parenthesis.
::, =, @, \, |, #, ->, |->, ., <-
Operator | Associativity | Precedence |
->,|-> | right | 0 |
=== | none | 1 |
, | left | 1 |
|| | right | 2 |
&& | right | 3 |
==,/=,<=,>=,<,> | none | 4 |
:,++ | right | 5 |
+,- | left | 6 |
*,/ | left | 7 |
· | right | 8 |
other | left | 9 |
Numeric literals have type System$Int.Int.
Escape codes may be used in characters and strings to represent special characters. Note that a single quote ' may be used in a string, but must be escaped in a character; similarly, a double quote " may be used in a character, but must be escaped in a string. \ must always be escaped. The category charesc also includes portable representations for the characters "alert" (\a), "backspace" (\b), "form feed" (\f), "new line" (\n), "carriage return" (\r), "horizontal tab" (\t), and "vertical tab" (\v).
Character literals have type System$Char.Char and string literals System$String.String.