module Or_error: Async_or_errortype'at ='a Core.Std.Or_error.t Deferred.t
include Monad.S
val return : 'ok -> 'ok tval fail : Core.Std.Error.t -> 'a tval of_exn : exn -> 'a tval failwith : string -> 'a tval ok_unit : unit tval never : unit -> 'a tval try_with : ?name:string -> f:('arg -> 'a Deferred.t) -> 'arg -> 'a tunit -> 'a Deferred.t. Various use cases:
Or_error.try_with ~f:fct arg
Or_error.try_with () ~f:(fun () -> ...)
let f_or_exn = Or_error.try_with ~f
The label is essentially there to inverse the order with unit if the body
of the function is big.
val try_with_join : ?name:string ->
f:('arg -> 'a t) -> 'arg -> 'a tmodule List:Deferred_intf.Monad_sequencewith type 'a monad := 'a twith type 'a t := 'a list