Integral -package:aeson-optics package:numhask

An Integral is anything that satisfies the law:
\a b -> b == zero || b * (a `div` b) + (a `mod` b) == a
>>> 3 `divMod` 2
(1,1)
>>> (-3) `divMod` 2
(-2,1)
>>> (-3) `quotRem` 2
(-1,-1)
Integral classes
Polymorphic version of fromInteger
fromIntegral a == a
toIntegral is kept separate from Integral to help with compatability issues.
toIntegral a == a