package travesty

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

Extensions for containers.

As usual, we store the extension signatures in a separate intf module.

include module type of T_container_intf

Generic extensions

As is often the case in Travesty, we define an arity-generic signature first, then specialise it for arity-0 and arity-1 containers.

module type Generic_extensions = sig ... end

Containers of predicates

The following functions concern containers of predicates (functions of type 'a -> bool).

module type Generic_predicate_extensions = sig ... end

Arity-0 container extensions

These extensions target arity-0 containers (implementations of Container.S0).

module type Extensions0 = sig ... end

Extensions for a Container.S0.

module type Extensions0_predicate = sig ... end

Extensions for a Container.S0 whose elements are predicates.

Arity-1 container extensions

These extensions target arity-1 containers (implementations of Container.S1).

module type Extensions1 = sig ... end

Extensions for a Container.S1.

Extension functors

These functors extend Core containers with the extensions described in Extensions0 and Extensions1.

module Extend0 (C : Core_kernel.Container.S0) : Extensions0 with type t := C.t and type elt := C.elt

Extend0 creates extensions for a Container.S0.

module Extend0_predicate (P : Core_kernel.T) (C : Core_kernel.Container.S0 with type elt = P.t -> bool) : Extensions0_predicate with type t := C.t and type item := P.t

Extend0_predicate creates extensions for a Container.S0 over predicates.

module Extend1 (C : Core_kernel.Container.S1) : Extensions1 with type 'a t := 'a C.t

Extend1 creates extensions for a Container.S1.

OCaml

Innovation. Community. Security.