Legend:
Library
Module
Module type
Parameter
Class
Class type
The main groups of signatures provided by this module are:
Basicn: minimal definition of bi-traversable modules;
Sn: full bi-traversable containers, produced by applying functors to the above.
We also define other signatures, mostly for internal book-keeping. They may be useful elsewhere, however.
Inner-traversal signatures
These signatures form the inner body of the On_monad functor in the main signatures. They all have names ending with _on_monad, and assume the existence of a monad M.
While they aren't interesting on their own, they do contain (in slightly abstract form) the specific functions needed to build, and provided on building, bi-traversable containers.
The generic signatures
Here, wee define some signatures for bi-traversable structures in an arity-generic way. We then specialise them for arity-0 and arity-1 types.
Basic2_on_monad is the inner signature of a monadic bi-traversal over arity-2 types with a floating right type and fixed left type.
Basic signatures
We now define basic signatures that generalise the above signatures over all monads.
These signatures form the input to functors that provide derived operations, chaining, type-fixing, and conversion to bi-mappable and regular traversable containers.
The basic signatures are Basic0, which defines traversal across an arity-0 type t (with a fixed, associated element type elt); Basic1_left and Basic1_right, which fix the right and left element type respectively (leaving the named type floating); and Basic2, which defines traversal across an arity-2 type ('l, 'r) t with left element type 'l and right element type 'r.