package MlFront_Thunk

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

Module CONSTRUCTIVE_TRACE_STORE_SYNC.C

A monad constraint

type state
type output
include BuildConstraints.MONAD with type 'a t = state -> 'a * state * output
include BuildConstraints.FUNCTOR with type 'a t = state -> 'a * state * output
type 'a t = state -> 'a * state * output
include BuildConstraints.APPLICATIVE with type 'a t := 'a t
include BuildConstraints.FUNCTOR with type 'a t := 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val pure : 'a -> 'a t
val apply : ('a -> 'b) t -> 'a t -> 'b t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t

State Monad

val get : state t
val gets : (state -> 'a) -> 'a t
val put : state -> unit t
val modify : (state -> state) -> unit t
val run_state : 'a t -> state -> 'a * state
val exec_state : 'a t -> state -> state

Writer Monad

val tell : output -> unit t
val run_writer : 'a t -> ('a * output) t