Module Base__.Monad_intf

module type Basic : sig ... end
module type Infix : sig ... end
module type Syntax : sig ... end

opening a module of this type allows one to use the %bind and %map syntax extensions defined by ppx_let, as well as brings return into scope

module type S_without_syntax : sig ... end
module type S : sig ... end
module type Basic2 : sig ... end

Multi parameter monad. The second parameter gets unified across all the computation. This is used to encode monads working on a multi parameter data structure like (('a,'b) result).

module type Infix2 : sig ... end

Same as Infix, except the monad type has two arguments. The second is always just passed through.

module type Syntax2 : sig ... end
module type S2 : sig ... end

The same as S except the monad type has two arguments. The second is always just passed through.

module type Basic3 : sig ... end

Multi parameter monad. The second and third parameters get unified across all the computation.

module type Infix3 : sig ... end

Same as Infix, except the monad type has three arguments. The second and third are always just passed through.

module type Syntax3 : sig ... end
module type S3 : sig ... end

The same as S except the monad type has three arguments. The second and third are always just passed through.

module type Basic_indexed : sig ... end

Indexed monad, in the style of Atkey. The second and third parameters are composed across all computation. To see this more clearly, you can look at the type of bind:

module type Infix_indexed : sig ... end

Same as Infix, except the monad type has three arguments. The second and third are compose across all computation.

module type Syntax_indexed : sig ... end
module type S_indexed : sig ... end

The same as S except the monad type has three arguments. The second and third are composed across all computation.

module S_to_S2 : functor (X : S) -> S2 with type ('a, 'e) t = 'a X.t
module S2_to_S3 : functor (X : S2) -> S3 with type ('a, 'd, 'e) t = ('a'dX.t
module S_to_S_indexed : functor (X : S) -> S_indexed with type ('a, 'i, 'j) t = 'a X.t
module S2_to_S : functor (X : S2) -> S with type 'a t = ('a, unit) X.t
module S3_to_S2 : functor (X : S3) -> S2 with type ('a, 'e) t = ('a'e, unit) X.t
module S_indexed_to_S2 : functor (X : S_indexed) -> S2 with type ('a, 'e) t = ('a'e'eX.t
module type Monad : sig ... end