To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
-
travesty
-
-
travesty_containers
-
-
travesty_core_kernel_exts
Library
Module
Module type
Parameter
Class
Class type
S2
is the signature of state transformers parametrised over both value and state types.
include Base.Monad.S2
module Let_syntax : sig ... end
module Monad_infix : sig ... end
Same as Infix
, except the monad type has two arguments. The second is always just passed through.
include Generic with type ('a, 's) t := ('a, 's) t and type 's state := 's
include Generic_builders
with type 'a final := 'a
with type ('a, 's) t := ('a, 's) t
with type 's state := 's
include Generic_types
with type 'a final := 'a
with type ('a, 's) t := ('a, 's) t
with type 's state := 's
val make : ('s -> 's * 'a) -> ('a, 's) t
make
creates a context-sensitive computation that can modify both the current context and the data passing through.
Specialised builders
val peek : ('s -> 'a) -> ('a, 's) t
peek
creates a context-sensitive computation that can look at the current context, but not modify it.
modify
creates a context-sensitive computation that can look at and modify the current context.
val return : 'a -> ('a, 's) t
return
lifts a value or monad into a stateful computation.
module Inner : Base.Monad.S
Inner
is the monad to which we're adding state.
State transformers have the same runner signatures as state monads, but lifted into the inner monad.