Module State_or_error.S3_to_S2
Parameters
Signature
include Core_kernel.Monad.S2 with type ('a, 'b) t := ( 'a, 'b, unit ) X.t
val (>>=) :
( 'a, 'e, unit ) X.t ->
( 'a -> ( 'b, 'e, unit ) X.t ) ->
( 'b, 'e, unit ) X.t
val (>>|) : ( 'a, 'e, unit ) X.t -> ( 'a -> 'b ) -> ( 'b, 'e, unit ) X.t
val bind :
( 'a, 'e, unit ) X.t ->
f:( 'a -> ( 'b, 'e, unit ) X.t ) ->
( 'b, 'e, unit ) X.t
val return : 'a -> ( 'a, 'b, unit ) X.t
val map : ( 'a, 'e, unit ) X.t -> f:( 'a -> 'b ) -> ( 'b, 'e, unit ) X.t
val join : ( ( 'a, 'e, unit ) X.t, 'e, unit ) X.t -> ( 'a, 'e, unit ) X.t
val ignore_m : ( 'a, 'e, unit ) X.t -> ( unit, 'e, unit ) X.t
val all : ( 'a, 'e, unit ) X.t list -> ( 'a list, 'e, unit ) X.t
val all_unit : ( unit, 'e, unit ) X.t list -> ( unit, 'e, unit ) X.t
val run_state :
( 'b, 'a, unit ) X.t ->
state:( 'a, unit ) X.state ->
('b * ( 'a, unit ) X.state) Core_kernel.Or_error.t
val put : ( 'a, unit ) X.state -> ( unit, 'a, unit ) X.t
val error_if : bool -> message:string -> value:'a -> ( 'a, _, unit ) X.t