Documentation

Classes for Generic Functions

This class forms the foundation for defining generic functions with a
single generic argument. Each method represents a type case. There are cases
for primitive types, structural representation types, and for user-defined
datatypes.

Case for datatypes. This method is used to define the structural
representation of an arbitrary Haskell datatype. The first argument is the
embedding-projection pair, necessary for establishing the isomorphism
between datatype and representation. The second argument is the
run-time representation using the methods of Generic.

See rtype. This case is the primary difference that separates
Generic2 from Generic. Since we have two generic type parameters, we
need to have two EP values. Each translates between the Haskell type and
its generic representation.

See rtype. This case is the primary difference that separates
Generic3 from Generic. Since we have three generic type parameters, we
need three EP values. Each translates between the Haskell type and its
generic representation.