package preface
Module Writer.OverSource
Parameters
module Tape : Preface_specs.MONOIDSignature
type tape = Tape.tThe encapsulated tape.
tell helps to enrich the output. This is done thanks to the semigroup combine operation.
listen executes the effect and return both the result and the corresponding output within the effect.
Performs the action and adds the result of applying the function to the output to the value of the computation.
pass executes the effect and apply the function to the corresponding output.
censor executes the effects, apply the function to the corresponding output and returns an effects with the value unchanged.
Monad
module Monad : Preface_specs.Monad.APIType
Functions
include Preface_specs.Monad.WITH_RETURN with type 'a t := 'a t
include Preface_specs.Monad.WITH_RETURN with type 'a t := 'a t
include Preface_specs.Monad.WITH_RETURN with type 'a t := 'a t
val return : 'a -> 'a tLift a value from 'a into a new 'a t.
Composing monadic functions using Kleisli Arrow (from right to left).
Mapping over from 'a and 'b to 'c over 'a t and 'b t to 'c t.
Mapping over from 'a and 'b and 'c to 'd over 'a t and 'b t and 'c t to 'd t.
Create a new 'a t, replacing all values in the 'b t by given a value of 'a.
Infix operators
module Infix : Preface_specs.Monad.INFIX with type 'a 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 Preface_specs.Functor.CORE.map.
Flipped and infix version of Preface_specs.Functor.CORE.map.
Infix version of Preface_specs.Functor.OPERATION.replace.
Flipped and infix version of Preface_specs.Functor.OPERATION.replace.
Syntax
module Syntax : Preface_specs.Monad.SYNTAX with type 'a t = 'a tSyntactic shortcuts for flipped version of CORE.bind:
let* x = e in f is equals to bind (fun x -> f) e.
Syntactic shortcuts for flipped version of CORE.map:
let+ x = e in f is equals to map (fun x -> f) e.
Functor
module Functor : Preface_specs.FUNCTOR with type 'a t = 'a tApplicative
module Applicative : Preface_specs.APPLICATIVE with type 'a t = 'a tInvariant
module Invariant : Preface_specs.INVARIANT with type 'a t = 'a t