Generates an Enum instance declaration for the given data type or data family instance.
Modulederiving-compat-0.6.8Haskell2010
Data.Enum.Deriving
Exports functions to mechanically derive Enum instances.
- 7 values
- Packagederiving-compat-0.6.8
- Exports7
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceDeriving.hs
Enum
7 declarationsGenerates a lambda expression which behaves like enumFromThen (without requiring an Enum instance).
deriveEnum limitations
0 declarationsBe aware of the following potential gotchas:
Type variables of kind
*are assumed to have Enum constraints. If this is not desirable, use makeToEnum or one of its cousins.Generated Enum instances for poly-kinded data family instances are likely to require the use of the
TypeInTypeextension on GHC 8.0, 8.2, or 8.4.