package preface

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

Set of functors (in ML sense) whose role is to achieve the abstractions described in Preface_specs. Each abstraction described in the specifications has its image in Preface.Make and the functors take as arguments modules constrained by the signatures described in Preface_specs and produce modules whose complete interface is also described in Preface_specs.)

For a detailed description of the module breakdown logic, go to the homepage.

Multiple path

The achievement of an abstraction usually offers several paths:

  • using the minimal definition or implement as few combiners as possible. Some abstractions offer several minimal definitions, so it is up to you to choose the path that seems most relevant .
  • A construction on top of another abstraction (ie: Preface_specs.MONOID defined over a Preface_specs.SEMIGROUP)
  • A manual approach where each feature has to be provided (while offering intermediate functors to avoid boring tasks such as defining infix operators).
  • A simplification of an existing abstraction, such as turning a Preface_specs.ALTERNATIVE into a Preface_specs.MONOID by fixing the type of the Alternative.
  • Using a fixed algebra. For example, the sum, product or composition of Preface_specs.FUNCTOR.

Monoid hierarchy

module Semigroup : sig ... end
module Monoid : sig ... end

Functor hierarchy

module Invariant : sig ... end
module Functor : sig ... end
module Alt : sig ... end
module Applicative : sig ... end
module Alternative : sig ... end
module Selective : sig ... end
module Monad : sig ... end
module Monad_plus : sig ... end
module Comonad : sig ... end
module Foldable : sig ... end
module Traversable : sig ... end

Contravariant hierarchy

module Contravariant : sig ... end
module Divisible : sig ... end
module Decidable : sig ... end

Bifunctor hierarchy

module Bifunctor : sig ... end

Profunctor hierarchy

module Profunctor : sig ... end
module Strong : sig ... end
module Choice : sig ... end
module Closed : sig ... end

Arrow hierarchy

module Semigroupoid : sig ... end
module Category : sig ... end
module Arrow : sig ... end
module Arrow_zero : sig ... end
module Arrow_alt : sig ... end
module Arrow_plus : sig ... end
module Arrow_choice : sig ... end
module Arrow_apply : sig ... end

Transformers

Monad Transformers

module Reader : sig ... end

Building a Preface_specs.Reader, a Reader transformer.

module Writer : sig ... end

Building a Preface_specs.Writer, a Writer transformer.

module State : sig ... end

Building a Preface_specs.State, a State transformer.

Comonad Transformers

module Store : sig ... end

Building a Preface_specs.Store, a Store transformer.

module Env : sig ... end

Building a Preface_specs.Env, an Env transformer.

module Traced : sig ... end

Building a Preface_specs.Traced, a Traced transformer.

Free constructions

module Free_applicative : sig ... end
module Free_selective : sig ... end
module Freer_selective : sig ... end
module Free_monad : sig ... end
module Freer_monad : sig ... end

Conversion and Expansion

Produces abstractions based on other abstractions (e.g. bifunctors from functors). Mainly for dealing with different arities.

module Join : sig ... end

Join produces a Functor from a Bifunctor using both arguments of a Bifunctor.

module Clown : sig ... end

Clown can produces Bifunctor or Profunctor using a Functor (or a Contravariant) on the first argument of the Bi/Profunctor as described in Clowns to the Left, Jokers to the Right (Functional Pearl)

module Joker : sig ... end

Joker can produces Bifunctor or Profunctor using a Functor on the second argument of the Bi/Profunctor as described in Clowns to the Left, Jokers to the Right (Functional Pearl)

module Kleisli : sig ... end

Kleisli uses the Kleisli category to describe arity 2 constructions for arity 1 constructions, usually using the form: type ('a, 'b) t = 'a -> F.t.

module Cokleisli : sig ... end

Cokleisli uses the Cokleisli category to describe arity 2 constructions for arity 1 constructions, usually using the form: type ('a, 'b) t = 'a F.t -> 'b.

OCaml

Innovation. Community. Security.