Copyright | (c) 2008--2009 Universiteit Utrecht |
---|---|
License | BSD3 |
Maintainer | generics@haskell.org |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell98 |
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
.