package base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module type Applicative_infix = sig ... end
module type Applicative_infix2 = sig ... end
module type Applicative_infix3 = sig ... end
module type Basic = sig ... end
module type Basic2 = sig ... end
module type Basic3 = sig ... end
module type Basic_using_map2 = sig ... end
module type Basic2_using_map2 = sig ... end
module type Basic3_using_map2 = sig ... end
module type Let_syntax = sig ... end
module type Let_syntax2 = sig ... end
module type Let_syntax3 = sig ... end
module type S = sig ... end
module type S2 = sig ... end
module type S3 = sig ... end
module S2_to_S (X : S2) : S with type 'a t = ('a, unit) X.t
module S_to_S2 (X : S) : S2 with type ('a, 'e) t = 'a X.t
module S3_to_S2 (X : S3) : S2 with type ('a, 'd) t = ('a, 'd, unit) X.t
module S2_to_S3 (X : S2) : S3 with type ('a, 'd, 'e) t = ('a, 'd) X.t
module Make (X : Basic) : S with type 'a t := 'a X.t
module Make2 (X : Basic2) : S2 with type ('a, 'e) t := ('a, 'e) X.t
module Make3 (X : Basic3) : S3 with type ('a, 'd, 'e) t := ('a, 'd, 'e) X.t
module Make_let_syntax (X : sig ... end) (Intf : sig ... end) (Impl : Intf.S) : Let_syntax with type 'a t := 'a X.t with module Open_on_rhs_intf := Intf
module Make_let_syntax2 (X : sig ... end) (Intf : sig ... end) (Impl : Intf.S) : Let_syntax2 with type ('a, 'e) t := ('a, 'e) X.t with module Open_on_rhs_intf := Intf
module Make_let_syntax3 (X : sig ... end) (Intf : sig ... end) (Impl : Intf.S) : Let_syntax3 with type ('a, 'd, 'e) t := ('a, 'd, 'e) X.t with module Open_on_rhs_intf := Intf
module Make_using_map2 (X : Basic_using_map2) : S with type 'a t := 'a X.t
module Make2_using_map2 (X : Basic2_using_map2) : S2 with type ('a, 'e) t := ('a, 'e) X.t
module Make3_using_map2 (X : Basic3_using_map2) : S3 with type ('a, 'd, 'e) t := ('a, 'd, 'e) X.t

The following functors give a sense of what Applicatives one can define.

Of these, Of_monad is likely the most useful. The others are mostly didactic.

module Of_monad (M : Monad.S) : S with type 'a t := 'a M.t

Every monad is Applicative via:

module Of_monad2 (M : Monad.S2) : S2 with type ('a, 'e) t := ('a, 'e) M.t
module Compose (F : S) (G : S) : S with type 'a t = 'a F.t G.t
module Pair (F : S) (G : S) : S with type 'a t = 'a F.t * 'a G.t