Signed two’s-complement 64-bit integers and operations.
All of the usual arithmetic operations are supplied by typeclass instances.
import Prelude import Data.Int64 as Int64 let hundred = Int64.fromInt 100 billion = Int64.fromInt 1000000000
> hundred * billion 100000000000l
> billion / hundred 10000000l
> hundred + one 101l
> hundred * zero 0l
> Int64.lowBits (hundred * billion) 1215752192
> Int64.highBits (hundred * billion) 23
Signed two’s-complement 64-bit integer.
Showinstance will suffix a lowercase ‘l’ for “long”. (See
EuclideanRinginstance provides a
modoperator which is only lawful if the divisor is in the
Intrange, -2³¹ ≤ divisor ≤ 2³¹⁻¹.