package preface
Module Free_monad.Over_monad
Parameters
module F : Preface_specs.MONADSignature
type 'a f = 'a F.tThe type held by the Preface_specs.Functor.
module To_monad
(Monad : Preface_specs.Monad.CORE) :
Preface_specs.Free_monad.TO_MONAD
with type 'a t := 'a t
and type 'a f := 'a f
and type 'a monad := 'a Monad.tFunctor API
A Free monad is also a Preface_specs.Functor.
module Functor : Preface_specs.Functor.API with type 'a t = 'a tApplicative API
A Free monad is also an Preface_specs.Applicative.
module Applicative : Preface_specs.Applicative.API with type 'a t = 'a tSelective API
A Free monad is also an Preface_specs.Selective.
module Selective : Preface_specs.Selective.API with type 'a t = 'a tMonad API
A Free monad is also (obviously) a Preface_specs.Monad.
module Monad : Preface_specs.Monad.API with type 'a t = 'a tType
Type
Functions
include Preface_specs.Indexed_monad.WITH_RETURN
with type ('a, 'index) t := 'a t
include Preface_specs.Indexed_monad.WITH_RETURN
with type ('a, 'index) t := 'a t
include Preface_specs.Indexed_monad.WITH_RETURN
with type ('a, 'index) t := 'a t
val return : 'a -> 'a tLift a value into a t.
Composing monadic functions using Kleisli Arrow (from right to left).
Lift a binary function that acts on arbitrary values into a function that acts t values.
Lift a ternary function that acts on arbitrary values into a function that acts t values.
Create a new t, replacing all values of the given functor by given a value of 'a.
Infix operators
module Infix :
Preface_specs.Indexed_monad.INFIX with type ('a, 'index) t := 'a tInfix version of OPERATION.compose_right_to_left.
Sequentially compose two actions, discarding any value produced by the first.
Sequentially compose two actions, discarding any value produced by the second.
Infix version of CORE.map.
Flipped and infix version of CORE.map.
Flipped and infix version of OPERATION.replace.
Syntax
module Syntax :
Preface_specs.Indexed_monad.SYNTAX with type ('a, 'index) t := 'a tSyntactic shortcuts for flipped version of CORE.bind:
let* x = e in f is equals to bind (fun x -> f) e.