package travesty

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Signatures for monadic traversal.

The generic signature

As with Mappable, we define the signature of traversable structures in an arity-generic way, then specialise it for arity-0 and arity-1 types.

module type Generic = sig ... end

Generic describes monadic traversal on either an arity-0 or arity-1 type.

Basic signatures

module type S0 = sig ... end

S0 is the signature of a monadic traversal over arity-0 types.

module type S1 = sig ... end

S1 is the signature of a monadic traversal over arity-1 types.

Building containers from traversable types

Input signatures

module type Basic_container0 = sig ... end

Basic_container0 is the signature that traversable containers of arity 0 must implement.

module type Basic_container1 = sig ... end

Basic_container1 is the signature that traversable containers of arity 1 must implement.

Helper signatures

module type Generic_on_monad = sig ... end

Generic_on_monad extends Generic to contain various derived operators; we use it to derive the signatures of the various On_monad modules.

module type On_monad1 = sig ... end

On_monad1 extends Generic_on_monad with functionality that only works on arity-1 containers.

module type Generic_container = sig ... end

Generic_container is a generic interface for traversable containers, used to build Container0 (arity-0) and Container1 (arity-1).

Signatures for traversable containers

module type S0_container = sig ... end

S0_container is a generic interface for arity-0 traversable containers.

module type S1_container = sig ... end

S1_container is a generic interface for arity-1 traversable containers. It also includes the extensions from Mappable.

OCaml

Innovation. Community. Security.