Module Async_kernel.Use_eager_deferred

Intended usage is to open Use_eager_deferred to shadow operations from the non-eager world and rebind them to their eager counterparts.

module Deferred : sig ... end
include Core_kernel.Monad.Infix with type t := a Async_kernel__.Deferred1.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)).

include Eager_deferred.Let_syntax

These are convenient to have in scope when programming with a monad:

val return : 'a ‑> 'a Eager_deferred.t
include Base__.Monad_intf.Infix with type t := a Eager_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)).

val upon : 'a Async_kernel__.Deferred1.t ‑> ('a ‑> unit) ‑> unit
val (>>>) : 'a Async_kernel__.Deferred1.t ‑> ('a ‑> unit) ‑> unit