include Bare_sigs.Monad.S
val (>>=) : 'a Lwt.t -> ('a -> 'b Lwt.t) -> 'b Lwt.tval (>|=) : 'a Lwt.t -> ('a -> 'b) -> 'b Lwt.tresult monad
val ok : 'a -> ('a, 'trace) Stdlib.resultval error : 'error -> ('a, 'error) Stdlib.resultval (>>?) :
('a, 'trace) Stdlib.result ->
('a -> ('b, 'trace) Stdlib.result) ->
('b, 'trace) Stdlib.resultval (>|?) :
('a, 'trace) Stdlib.result ->
('a -> 'b) ->
('b, 'trace) Stdlib.resultlwt-result combined monad
val ok_s : 'a -> ('a, 'trace) Stdlib.result Lwt.tval return : 'a -> ('a, 'trace) Stdlib.result Lwt.tval error_s : 'error -> ('a, 'error) Stdlib.result Lwt.tval fail : 'error -> ('a, 'error) Stdlib.result Lwt.tval (>>=?) :
('a, 'trace) Stdlib.result Lwt.t ->
('a -> ('b, 'trace) Stdlib.result Lwt.t) ->
('b, 'trace) Stdlib.result Lwt.tval (>|=?) :
('a, 'trace) Stdlib.result Lwt.t ->
('a -> 'b) ->
('b, 'trace) Stdlib.result Lwt.tMixing operators
All operators follow this naming convention:
- the first character is
> - the second character is
> for bind and | for map - the next character is
= for Lwt or ? for Error - the next character (if present) is
= for Lwt or ? for Error, it is only used for operator that are within both monads.
val (>>?=) :
('a, 'trace) Stdlib.result ->
('a -> ('b, 'trace) Stdlib.result Lwt.t) ->
('b, 'trace) Stdlib.result Lwt.tval (>|?=) :
('a, 'trace) Stdlib.result ->
('a -> 'b Lwt.t) ->
('b, 'trace) Stdlib.result Lwt.tpreallocated in-monad values
val unit_e : (unit, 'trace) Stdlib.resultval unit_es : (unit, 'trace) Stdlib.result Lwt.tval none_s : 'a option Lwt.tval none_e : ('a option, 'trace) Stdlib.resultval none_es : ('a option, 'trace) Stdlib.result Lwt.tval some_s : 'a -> 'a option Lwt.tval some_e : 'a -> ('a option, 'trace) Stdlib.resultval some_es : 'a -> ('a option, 'trace) Stdlib.result Lwt.tval nil_s : 'a list Lwt.tval nil_e : ('a list, 'trace) Stdlib.resultval nil_es : ('a list, 'trace) Stdlib.result Lwt.tval true_e : (bool, 'trace) Stdlib.resultval true_es : (bool, 'trace) Stdlib.result Lwt.tval false_e : (bool, 'trace) Stdlib.resultval false_es : (bool, 'trace) Stdlib.result Lwt.tadditional preallocated in-monad values
this is for backwards compatibility and for similarity with Lwt
val ok_unit : (unit, 'error) Stdlib.resultval return_unit : (unit, 'error) Stdlib.result Lwt.tjoins
val join_p : unit Lwt.t list -> unit Lwt.tval all_p : 'a Lwt.t list -> 'a list Lwt.tval both_p : 'a Lwt.t -> 'b Lwt.t -> ('a * 'b) Lwt.t