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 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 bind_all :
('ok, 'error) t ->
f:(('ok, 'error) Attached_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.
module Let_syntax = M.Let_syntax
module Monad_infix = M.Monad_infix
val return : 'a -> ('a0, 'b) 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
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