regular-0.2: Generic programming library for regular datatypes.Source codeContentsIndex
Generics.Regular.TH
Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Description
This module contains Template Haskell code that can be used to automatically generate the boilerplate code for the regular library.
Synopsis
deriveAll :: Name -> String -> Q [Dec]
deriveConstructors :: Name -> Q [Dec]
deriveSelectors :: Name -> Q [Dec]
deriveRegular :: Name -> String -> Q [Dec]
derivePF :: String -> Name -> Q [Dec]
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.
deriveRegular :: Name -> String -> Q [Dec]Source
Given the type and the name (as string) for the pattern functor to derive, generate the Regular instance.
derivePF :: String -> Name -> Q [Dec]Source
Derive only the PF instance. Not needed if deriveRegular is used.
Produced by Haddock version 2.4.2