Skip to main content

Identifiers

Identifiers are case sensitive. Therefore, the following is allowed:

let
a = 1,
A = 2
in
a + A // Result is 3

Identifiers must start by an characters or underscore, and can then be followed by any alphanumeric character or underscore.

Special characters can also be used in identifiers but the identifier must be wrapped in backticks ```. For instance

let
`a special name` = 1,
A = 2
in
`a special name` + A // Result is 3

Backticks are useful when trying to name identifiers with a name that clashes with a reserved keyword. For instance, to name a variable as if (a reserved keyword), do:

let `if` = 1
in `if` // Result is 1