7.5 Constants

constant::=integer-literal
int32-literal
int64-literal
nativeint-literal
float-literal
char-literal
string-literal
constr
false
true
()
begin end
[]
[||]
`tag-name

See also the following language extension:extension literals.

The syntactic class of constants comprises literals from the fourbase types (integers, floating-point numbers, characters, characterstrings), the integer variants, and constant constructorsfrom both normal and polymorphic variants, as well as the specialconstants false, true, (),[], and [||], which behave like constant constructors, andbeginend, which is equivalent to ().