Safe Haskell | Safe-Inferred |
---|
- 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
data U1 p
Unit: used for constructors without arguments
newtype K1 i c p
Constants, additional parameters and recursion of kind *
newtype M1 i c f p
Meta-information (constructor names, etc.)
ConNames f => ConNames (D1 c f) | |
Constructor c => ConNames (C1 c f) | |
GEq' a => GEq' (M1 i c a) | |
Enum' f => Enum' (M1 i c f) | |
GFunctor' f => GFunctor' (M1 i c f) | |
GShow' a => GShow' (M1 D d a) | |
(GShow' a, Constructor c) => GShow' (M1 C c a) | |
(Selector s, GShow' a) => GShow' (M1 S s a) | |
Uniplate' f b => Uniplate' (M1 i c f) b |
data (f :+: g) p
Sums: encode choice between constructors
newtype (f :.: g) p
Composition of functors
Synonyms for convenience
data R
Tag for K1: recursion (of kind *)
data P
Tag for K1: parameters (other than the last)
data C
Tag for M1: constructor
Constructor c => ConNames (C1 c f) | |
(GShow' a, Constructor c) => GShow' (M1 C c a) |
Meta-information
class Datatype d where
Class for datatypes that represent datatypes
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
The name of the constructor
conFixity :: t c f a -> Fixity
The fixity of the constructor
conIsRecord :: t c f a -> Bool
Marks if this constructor is a record
Constructor C_Int | |
Constructor C_Float | |
Constructor C_Double | |
Constructor C_Char | |
Constructor C1_1[] | |
Constructor C1_0[] | |
Constructor C1_2Ordering | |
Constructor C1_1Ordering | |
Constructor C1_0Ordering | |
Constructor C1_1Maybe | |
Constructor C1_0Maybe | |
Constructor C1_1Either | |
Constructor C1_0Either | |
Constructor C1_1Bool | |
Constructor C1_0Bool | |
Constructor C1_0(,,,,,,) | |
Constructor C1_0(,,,,,) | |
Constructor C1_0(,,,,) | |
Constructor C1_0(,,,) | |
Constructor C1_0(,,) | |
Constructor C1_0(,) | |
Constructor C1_0() |
class Selector s where
Class for datatypes that represent records
data Fixity
Datatype to represent the fixity of a constructor. An infix
| declaration directly corresponds to an application of Infix
.
data Associativity
Datatype to represent the associativity of a constructor
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.
type Rep a1 :: * -> *
Generic representation type
Convert from the datatype to its representation
Convert from the representation to the datatype