Module Internal_pervasives.Asynchronous_result

A wrapper around ('ok, 'a Error.t) result Lwt.t.

type ('ok, 'error) t = ('ok, 'error) Attached_result.t Lwt.t
val yield : unit -> unit Lwt.t
val fail : ?attach:(string * Attached_result.content) list -> 'a -> ('b, 'c) t
val bind_on_error : ('a, 'b) t -> f: (result:('c, 'b) Attached_result.t -> 'b -> ('a, 'd) Attached_result.t Lwt.t) -> ('a, 'd) t
val transform_error : ('a, 'b) Attached_result.t Lwt.t -> f:('c -> 'd) -> ('e, 'f) Attached_result.t Lwt.t
val enrich : attach:(unit -> ((string * Attached_result.content) list, 'c) t) -> ('b, 'c) t -> ('b, 'c) t
val bind_all : ('ok, 'error) t -> f:(('ok, 'error) Attached_result.t -> ('ok2, 'error2) t) -> ('ok2, 'error2) t
val bind_on_result : ('ok, 'error) t -> f:(('ok, 'error) Result.t -> ('ok2, 'error2) t) -> ('ok2, 'error2) t
module M : sig ... end

The module opened everywhere.

module Std : sig ... end
include module type of struct include M end

The module opened everywhere.

val (>>=) : ('a, 'e) t -> ('a0 -> ('b, 'e0) t) -> ('b0, 'e1) t
val (>>|) : ('a, 'e) t -> ('a0 -> 'b) -> ('b0, 'e0) t
module Let_syntax = M.Let_syntax
module Monad_infix = M.Monad_infix
val bind : ('a, 'e) t -> f:('a0 -> ('b, 'e0) t) -> ('b0, 'e1) t
val return : 'a -> ('a0, 'b) t
val map : ('a, 'e) t -> f:('a0 -> 'b) -> ('b0, 'e0) t
val join : (('a, 'e) t, 'e0) t -> ('a0, 'e1) t
val ignore_m : ('a, 'e) t -> (unit, 'e0) t
val all : ('a, 'e) t list -> ('a0 list, 'e0) t
val all_unit : (unit, 'e) t list -> (unit, 'e0) t
val run : (unit -> ('a, 'b) result Lwt.t) -> ('c -> 'd) -> 'e
val die : 'a -> ('b, [> `Die of 'a ]) t
module List_sequential : sig ... end
val map_option : 'a option -> f:('b -> ('c, 'd) t) -> ('e option, 'f) t
module Loop : sig ... end
module Stream : sig ... end
val run_application : ?lwt_run: ((unit, [< `Die of int ] as 'a) Attached_result.t Lwt.t -> (unit, 'a) Attached_result.t) -> (unit -> (unit, 'b) t) -> unit