= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
ON THIS PAGE
package travesty
-
travesty
-
-
travesty.containers
-
-
travesty.core_kernel_exts
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Make2
makes an S2 (state transformer with variable state type) from a Monad.S
.
Parameters
module M : Base.Monad.S
Signature
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
with module Inner = M
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 = M
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.
ON THIS PAGE