Up

Module Import

Signature

include Async_kernel.Std
val catch : ((unit -> unit) -> exn Monitor.Deferred.t) Monitor.with_optional_monitor_name
val choice : 'a Deferred.t -> ('a -> 'b) -> 'b Deferred.choice
val choose : 'a Deferred.choice list -> 'a Deferred.t
val don't_wait_for : unit Deferred.t -> unit
val every : ?start:unit Async_kernel.Deferred.t -> ?stop:unit Async_kernel.Deferred.t -> ?continue_on_error:bool -> Async_kernel.Import.Time_ns.Span.t -> (unit -> unit) -> unit
val never : unit -> 'a Deferred.t
val return : 'a -> 'a Deferred.t
val schedule : ((unit -> unit) -> unit) Async_kernel.Scheduler.with_options
val try_with : (?extract_exn:bool -> ?run:[
| `Now
| `Schedule
] -> ?rest:[
| `Log
| `Raise
] -> (unit -> 'a Monitor.Deferred.t) -> ('a, exn) Core_kernel.Std.Result.t Monitor.Deferred.t) Monitor.with_optional_monitor_name
val upon : 'a Deferred.t -> ('a -> unit) -> unit
val with_timeout : Async_kernel.Import.Time_ns.Span.t -> 'a Async_kernel.Deferred.t -> [
| `Result of 'a
| `Timeout
] Async_kernel.Deferred.t
val within : ((unit -> unit) -> unit) Async_kernel.Scheduler.with_options
val (>>>) : 'a Deferred.t -> ('a -> unit) -> unit
val (>>=?) : ('a, 'b) Deferred.Result.t -> ('a -> ('c, 'b) Deferred.Result.t) -> ('c, 'b) Deferred.Result.t
val (>>|?) : ('a, 'b) Deferred.Result.t -> ('a -> 'c) -> ('c, 'b) Deferred.Result.t
include Core_kernel.Std.Monad.Infix with type 'a t := 'a Deferred.t
type 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

t >>= f returns a computation that sequences the computations represented by two monad elements. The resulting computation first does t to yield a value v, and then runs the computation returned by f v.

val (>>|) : 'a t -> ('a -> 'b) -> 'b t

t >>| f is t >>= (fun a -> return (f a)).