GHC.Generics

Introduction

Representing datatypes

Derived and fundamental representation types

Individual fields of constructors: K1

Meta information: M1

Additional generic representation type constructors

Empty datatypes: V1

Constructors without fields: U1

Representation of types with many constructors or many fields

Defining datatype-generic functions

Definition of the generic representation types

Generic instances

The wrapper and generic default

Omitting generic instances

Generic constructor classes

The Generic1 class

Representation of * -> * types

Representation of unlifted types

Generic representation types

data V1 p

data U1 p

data Par1 p

data Rec1 f p

data K1 i c p

data M1 i c f p

data (f :+: g) p

data (f :*: g) p

data (f :.: g) p

Unboxed representation types

data family URec (a :: *) (p :: *)

type UAddr

type UChar

type UDouble

type UFloat

type UInt

type UWord

Synonyms for convenience

type Rec0

data R

type D1

type C1

type S1

data D

data C

data S

Meta-information

class Datatype d

class Constructor c

class Selector s

data Fixity

data FixityI

data Associativity

prec

data SourceUnpackedness

data SourceStrictness

data DecidedStrictness

data Meta

Generic type classes

class Generic a

class Generic1 f