Int package:foundation
A fixed-precision integer type with at least the range
[-2^29 ..
2^29-1]. The exact range for a given implementation can be
determined by using
minBound and
maxBound from the
Bounded class.
16-bit signed integer type
32-bit signed integer type
64-bit signed integer type
8-bit signed integer type
Arbitrary precision integers. In contrast with fixed-size integral
types such as
Int, the
Integer type represents the
entire infinite range of integers.
Integers are stored in a kind of sign-magnitude form, hence do not
expect two's complement form when using bit operations.
If the value is small (fit into an
Int),
IS constructor
is used. Otherwise
Integer and
IN constructors are used
to store a
BigNat representing respectively the positive or the
negative value magnitude.
Invariant:
Integer and
IN are used iff value doesn't fit
in
IS
Integral Literal support
e.g. 123 :: Integer 123 :: Word8
Give access to Array non public functions which can be used to make
certains optimisations.
Most of what is available here has no guarantees of stability.
Anything can be removed and changed.
Downsize an integral value
Upsize an integral value
The destination type b size need to be greater or equal than
the size type of a
intercalate xs xss is equivalent to
(mconcat (intersperse xs xss)). It inserts the
list
xs in between the lists in
xss and concatenates
the result.
The
intersperse function takes an element and a list and
`intersperses' that element between the elements of the list. For
example,
intersperse ',' "abcde" == "a,b,c,d,e"
Number literals, convertible through the generic Integer type.
all number are Enum'erable, meaning that you can move to next element
general coercion from integral types
Read an Integer from a String
Consume an optional minus sign and many digits until end of string.