deriving-compat-0.3.6: Backports of GHC deriving extensions

Data.Bounded.Deriving

Description

Exports functions to mechanically derive Bounded instances.

Synopsis

# Bounded

Generates a Bounded instance declaration for the given data type or data family instance.

Generates a lambda expression which behaves like minBound (without requiring a Bounded instance).

Generates a lambda expression which behaves like maxBound (without requiring a Bounded instance).

# deriveBounded limitations

Be aware of the following potential gotchas:

• Type variables of kind * are assumed to have Bounded constraints. If this is not desirable, use makeMinBound or one of its cousins.