<h1>Generic Library Reference</h1>
{!indexlist}
{!modules: Generic Generic_util Generic_core Generic_view Generic_fun}

<h2>Main Module</h2>
The module {!Generic} is meant to be used as a single entry
point for using the library. It re-export the content of all
the other namespaces.

<h2>Namespaces</h2>
The library is organised in four namespaces: {!Generic_util}, {!Generic_core},
{!Generic_view} and {!Generic_fun}.

<ul>
  <li>
The {!Generic_util} namespace contains some definitions that where
needed by the {!Core} namespace but were too general to belong
there.
</li>
  <li>
The modules in namespace {!Generic_core} contain all of the definitions required
for generic programming: type expression are reflected in
the {!Generic_core.Ty.t} type, we call such values type witnesses.
The structure of types is captured by the datatype
{!Generic_core.Desc.t}. The type-indexed function {!Generic_core.Desc_fun.view}
computes the structure associated with each type. It is the
most low-level view of OCaml types. Higher-level views are
derived from this one.
{!Generic_core.Extensible} and {!Generic_core.Consumer} implement a mechanism
for creating and extending type indexed functions. This
enables us to define ad-hoc polymorphic functions.
</li>
<li>
The modules in namespace {!Generic_view} define high-level generic views on
types. A view is a uniform representation of the structure of
types on which generic functions can be defined.
</li>
<li>
The modules in namespace {!Generic_fun} contain generic functions. They are
defined by induction on the structure of types given by a
generic view.
</li>
</ul>

<h2>PPX Syntax Extension</h2>
The library comes with two PPX syntax extensions:

<ul>
<li> [reify] which derives the boilerplate that is
necessary to add generic support for a user type.
</li>
<li> [import] which provides a mechanism for importing a set of
names from a module.
</li>
</ul>
