Int package:classy-prelude
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.
32-bit signed integer type
64-bit signed integer type
A map of integers to values a.
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 numbers, supporting integer division.
The Haskell Report defines no laws for 
Integral. However,
Integral instances are customarily expected to define a
Euclidean domain and have the following properties for the
div/
mod and 
quot/
rem pairs, given suitable
Euclidean functions 
f and 
g:
- x = y * quot x y + rem x y with rem x y
= fromInteger 0 or g (rem x y) < g
y
 
- x = y * div x y + mod x y with mod x y
= fromInteger 0 or f (mod x y) < f
y
 
An example of a suitable Euclidean function, for 
Integer's
instance, is 
abs.
Takes a function of type 'LText -> LText' and passes all input on
stdin to it, then prints result to stdout
Uses lazy IO Uses system locale settings
Conversion from an 
Integer. An integer literal represents the
application of the function 
fromInteger to the appropriate
value of type 
Integer, so such literals have type
(Num a) => a.
general coercion from integral types