Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | generics@haskell.org |
This module contains Template Haskell code that can be used to automatically generate the boilerplate code for the regular library.
Documentation
deriveAll :: Name -> String -> Q [Dec]Source
Given the type and the name (as string) for the pattern functor to derive,
generate the Constructor' instances, the Selector' instances and the
Regular
instance.
deriveConstructors :: Name -> Q [Dec]Source
Given a datatype name, derive datatypes and
instances of class Constructor
.
deriveSelectors :: Name -> Q [Dec]Source
Given a datatype name, derive datatypes and
instances of class Selector
.