package monads

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

Monad Transformer Interface.

A monad transformer is a monad composition operator. There is not notion of a generic transformer, that takes two arbitrary monads and compose them, but every single monad should provide its own transformer. This module provides three interfaces of the transfomers:

A composition of two monads denoted as module M = Outer.Make(Inner) can is a new monad M that has properties of both Outer and Inner (you visualize this composition as a russian doll). All transfomers provide a lift function that lifts computations in the inner monad _ m to the resultint monad _ t. The run function will actually run the computation and result in a value of type _ e that each monad transfomer defines differently.

module type S = sig ... end

Unary monad transformer.

module type S1 = sig ... end

Unary to binary monad transfomer.

module type S2 = sig ... end

Binary to binary monad transfomer

OCaml

Innovation. Community. Security.