|
|
|
# Derived Instances
|
|
|
|
|
|
|
|
## Minor adjustments
|
|
|
|
|
|
|
|
|
|
|
|
Haskell 98 allows derived instances of `Bounded` only for enumerations and single constructor types.
|
|
|
|
Proposal: allow derived instances of `Bounded` for all algebraic data types, with
|
|
|
|
|
|
|
|
```wiki
|
|
|
|
minBound = K1 minBound ... minBound
|
|
|
|
maxBound = Kn maxBound ... maxBound
|
|
|
|
```
|
|
|
|
|
|
|
|
## Automatic derivation
|
|
|
|
|
|
|
|
|
|
|
|
Automatic derivation of instances is jolly useful. Current problems are:
|
|
|
|
|
| ... | ... | |