Bounded package:hedgehog

The Bounded class is used to name the upper and lower limits of a type. Ord is not a superclass of Bounded since types that are not totally ordered may also have upper and lower bounds. The Bounded class may be derived for any enumeration type; minBound is the first constructor listed in the data declaration and maxBound is the last. Bounded may also be derived for single-constructor datatypes whose constituent types are in Bounded.
Generates a random value from a bounded enumeration. This generator shrinks towards minBound. For example:
enumBounded :: Gen Bool
This is implemented in terms of the Enum class, and thus may be partial for integral types larger than Int, e.g. Word64.
Construct a range which is unaffected by the size parameter using the full range of a data type. A range from -128 to 127, with the origin at 0:
>>> bounds x (constantBounded :: Range Int8)
(-128,127)
>>> origin (constantBounded :: Range Int8)
0
Construct a range which is scaled exponentially relative to the size parameter and uses the full range of a data type.
>>> bounds 0 (exponentialBounded :: Range Int8)
(0,0)
>>> bounds 50 (exponentialBounded :: Range Int8)
(-11,11)
>>> bounds 99 (exponentialBounded :: Range Int8)
(-128,127)
Construct a range which is scaled relative to the size parameter and uses the full range of a data type.
>>> bounds 0 (linearBounded :: Range Int8)
(0,0)
>>> bounds 50 (linearBounded :: Range Int8)
(-64,64)
>>> bounds 99 (linearBounded :: Range Int8)
(-128,127)