| Safe Haskell | Trustworthy | 
|---|
GHC.Generics
- data V1 p
- data U1 p = U1
- newtype  Par1 p = Par1 {- unPar1 :: p
 
- newtype  Rec1 f p = Rec1 {- unRec1 :: f p
 
- newtype  K1 i c p = K1 {- unK1 :: c
 
- newtype  M1 i c f p = M1 {- unM1 :: f p
 
- data (f :+: g) p
- data (f :*: g) p = (f p) :*: (g p)
- newtype  (f :.: g) p = Comp1 {- unComp1 :: f (g p)
 
- type Rec0 = K1 R
- type Par0 = K1 P
- data R
- data P
- type D1 = M1 D
- type C1 = M1 C
- type S1 = M1 S
- data D
- data C
- data S
- class  Datatype d  where- datatypeName :: t d (f :: * -> *) a -> [Char]
- moduleName :: t d (f :: * -> *) a -> [Char]
 
- class Constructor c where
- class Selector s where
- data NoSelector
- data  Fixity - = Prefix
- | Infix Associativity Int
 
- data Associativity
- data Arity
- prec :: Fixity -> Int
- class Generic a where
- class Generic1 f where
Generic representation types
data V1 p
Void: used for datatypes without constructors
newtype K1 i c p
Constants, additional parameters and recursion of kind *
Synonyms for convenience
Deprecated: Par0 is no longer used; use Rec0 instead
Type synonym for encoding parameters (other than the last)
data R
Tag for K1: recursion (of kind *)
data P
Deprecated: P is no longer used; use R instead
Tag for K1: parameters (other than the last)
data D
Tag for M1: datatype
data C
Tag for M1: constructor
data S
Tag for M1: record selector
Meta-information
class Datatype d where
Class for datatypes that represent datatypes
Methods
datatypeName :: t d (f :: * -> *) a -> [Char]
The name of the datatype (unqualified)
moduleName :: t d (f :: * -> *) a -> [Char]
The fully-qualified name of the module where the type is declared
class Constructor c where
Class for datatypes that represent data constructors
data Fixity
Datatype to represent the fixity of a constructor. An infix
 | declaration directly corresponds to an application of Infix.
Constructors
| Prefix | |
| Infix Associativity Int | 
data Associativity
Datatype to represent the associativity of a constructor
Constructors
| LeftAssociative | |
| RightAssociative | |
| NotAssociative | 
data Arity
Datatype to represent the arity of a tuple.
Generic type classes
class Generic a where
Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.
Methods
Convert from the datatype to its representation
Convert from the representation to the datatype
class Generic1 f where
Representable types of kind * -> *. This class is derivable in GHC with the DeriveGeneric flag on.
Methods
Convert from the datatype to its representation
Convert from the representation to the datatype