The integers.
This type is special-cased by the compiler and overridden with an efficient implementation. The
runtime has a special representation for Int that stores βsmallβ signed numbers directly, while
larger numbers use a fast arbitrary-precision arithmetic library (usually
GMP). A βsmall numberβ is an integer that can be encoded with one fewer bits
than the platform's pointer size (i.e. 63 bits on 64-bit architectures and 31 bits on 32-bit
architectures).
Constructors
Int.ofNat : Nat β Int
A natural number is an integer.
This constructor covers the non-negative integers (from 0 to β).
Int.negSucc : Nat β Int
The negation of the successor of a natural number is an integer.
This constructor covers the negative integers (from -1 to -β).