
Many functions perform the same operation on the nonstructural cases (as
well as Unit). The cases for constant datatypes (Int, Integer,
Float, Double, Char, and Unit) have a default implementation of
rconstant2, thus a generic function may only override rconstant2 if
desired. Note that there is no default implementation for rconstant2
itself.
The class context represents the intersection set of supported type
classes.



Case for the primitive type Int. (Default implementation:
rconstant2.)



Case for the primitive type Integer. (Default implementation:
rconstant2.)



Case for the primitive type Float. (Default implementation:
rconstant2.)



Case for the primitive type Double. (Default implementation:
rconstant2.)



Case for the primitive type Char. (Default implementation:
rconstant2.)



Case for the structural representation type Unit. It is used to
represent a constructor with no arguments. (Default implementation:
rconstant2.)


rsum2 :: g a1 a2 > g b1 b2 > g (a1 :+: b1) (a2 :+: b2)  Source 

Case for the structural representation type '(:+:)', called "sum". It
is used to represent alternative choices between constructors. (No
default implementation.)


rprod2 :: g a1 a2 > g b1 b2 > g (a1 :*: b1) (a2 :*: b2)  Source 

Case for the structural representation type '(:*:)', called "product".
It is used to represent multiple arguments to a constructor. (No
default implementation.)



Case for constructors. It is used to hold the metainformation about a
constructor (ConDescr), e.g. name, arity, fixity, etc. (Since most
generic functions do not use rcon and simply pass the value through, the
default implementation is const id.)


rtype2 :: EP a2 a1 > EP b2 b1 > g a1 b1 > g a2 b2  Source 

Case for datatypes. This method is used to define the structural
representation of an arbitrary Haskell datatype. The first two arguments
are the embeddingprojection pairs, necessary for establishing the
isomorphisms between datatype and representation of the two generic types.
The third argument is the runtime representation using the methods of
Generic2. (No default implementation.)
