|
|
|
Description |
Example usage:
import Generics.MultiRec
import Generics.MultiRec.TH.Alt
import Data.Tree
data TheFam :: (* -> *) where
Tree_Int :: TheFam (Tree Int)
Forest_Int :: TheFam (Forest Int)
$(deriveEverything
(DerivOptions
[ ( [t| Tree Int |], "Tree_Int" )
, ( [t| Forest Int |], "Forest_Int" )
]
"TheFam"
(\t c -> "CONSTRUCTOR_" ++ t ++ "_" ++ c)
"ThePF"
True
)
)
type instance PF TheFam = ThePF
|
|
|
Documentation |
|
|
Constructors | DerivOptions | | familyTypes :: ft | A list of:
(type quotation, name of corresponding constructor of the family GADT)
This defines our mutually recursive family. The types must resolve to
datatypes or newtypes of kind * (type synonyms will be expanded).
| indexGadtName :: String | Name of the family GADT (this type has to be generated
manually because TH doesn't support GADTs yet)
| constructorNameModifier :: String -> String -> String | Scheme for producing names for the
empty types corresponding to constructors. The first arg is the name
of the type (as given in familyTypes), the second arg is the name
of the constructor (builtins will be called: NIL, CONS, TUPLE2, TUPLE3 ...)
| patternFunctorName :: String | Name of the pattern functor (PF) to generate
| verbose :: Bool | Print various informational messges?
|
|
| Instances | |
|
|
|
|
Produced by Haddock version 2.4.2 |