sig
type 'a t = 'a Ivar.Deferred.t
val create : ('a Ivar.t -> unit) -> 'a Deferred.t
val upon : 'a Deferred.t -> ('a -> unit) -> unit
val peek : 'a Deferred.t -> 'a option
val is_determined : 'a Deferred.t -> bool
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
module Monad_infix :
sig
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
end
val bind : 'a t -> ('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore : 'a t -> unit t
val all_ignore : unit t list -> unit t
module Infix :
sig
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
val ( >>> ) : 'a Deferred.t -> ('a -> unit) -> unit
end
val unit : unit Deferred.t
val never : unit -> 'a Deferred.t
val both : 'a Deferred.t -> 'b Deferred.t -> ('a * 'b) Deferred.t
val all : 'a Deferred.t list -> 'a list Deferred.t
val all_unit : unit Deferred.t list -> unit Deferred.t
val any : 'a Deferred.t list -> 'a Deferred.t
val any_unit : 'a Deferred.t list -> unit Deferred.t
module type Monad_sequence =
sig
type 'a t
val foldi : 'a t -> init:'b -> f:(int -> 'b -> 'a -> 'b t) -> 'b t
val fold : 'a t -> init:'b -> f:('b -> 'a -> 'b t) -> 'b t
val init : ?how:Deferred_intf.how -> int -> f:(int -> 'a t) -> 'a t t
val iter : ?how:Deferred_intf.how -> 'a t -> f:('a -> unit t) -> unit t
val iteri :
?how:Deferred_intf.how -> 'a t -> f:(int -> 'a -> unit t) -> unit t
val map : ?how:Deferred_intf.how -> 'a t -> f:('a -> 'b t) -> 'b t t
val filter :
?how:Deferred_intf.how -> 'a t -> f:('a -> bool t) -> 'a t t
val filter_map :
?how:Deferred_intf.how -> 'a t -> f:('a -> 'b option t) -> 'b t t
val all : 'a t t -> 'a t t
val all_unit : unit t t -> unit t
end
module Array :
sig
type 'a t = 'a array
val foldi : 'a t -> init:'b -> f:(int -> 'b -> 'a -> 'b t) -> 'b t
val fold : 'a t -> init:'b -> f:('b -> 'a -> 'b t) -> 'b t
val init : ?how:Deferred_intf.how -> int -> f:(int -> 'a t) -> 'a t t
val iter : ?how:Deferred_intf.how -> 'a t -> f:('a -> unit t) -> unit t
val iteri :
?how:Deferred_intf.how -> 'a t -> f:(int -> 'a -> unit t) -> unit t
val map : ?how:Deferred_intf.how -> 'a t -> f:('a -> 'b t) -> 'b t t
val filter :
?how:Deferred_intf.how -> 'a t -> f:('a -> bool t) -> 'a t t
val filter_map :
?how:Deferred_intf.how -> 'a t -> f:('a -> 'b option t) -> 'b t t
val all : 'a t t -> 'a t t
val all_unit : unit t t -> unit t
end
module List :
sig
type 'a t = 'a list
val foldi : 'a t -> init:'b -> f:(int -> 'b -> 'a -> 'b t) -> 'b t
val fold : 'a t -> init:'b -> f:('b -> 'a -> 'b t) -> 'b t
val init : ?how:Deferred_intf.how -> int -> f:(int -> 'a t) -> 'a t t
val iter : ?how:Deferred_intf.how -> 'a t -> f:('a -> unit t) -> unit t
val iteri :
?how:Deferred_intf.how -> 'a t -> f:(int -> 'a -> unit t) -> unit t
val map : ?how:Deferred_intf.how -> 'a t -> f:('a -> 'b t) -> 'b t t
val filter :
?how:Deferred_intf.how -> 'a t -> f:('a -> bool t) -> 'a t t
val filter_map :
?how:Deferred_intf.how -> 'a t -> f:('a -> 'b option t) -> 'b t t
val all : 'a t t -> 'a t t
val all_unit : unit t t -> unit t
end
module Queue :
sig
type 'a t = 'a Core.Std.Queue.t
val foldi : 'a t -> init:'b -> f:(int -> 'b -> 'a -> 'b t) -> 'b t
val fold : 'a t -> init:'b -> f:('b -> 'a -> 'b t) -> 'b t
val init : ?how:Deferred_intf.how -> int -> f:(int -> 'a t) -> 'a t t
val iter : ?how:Deferred_intf.how -> 'a t -> f:('a -> unit t) -> unit t
val iteri :
?how:Deferred_intf.how -> 'a t -> f:(int -> 'a -> unit t) -> unit t
val map : ?how:Deferred_intf.how -> 'a t -> f:('a -> 'b t) -> 'b t t
val filter :
?how:Deferred_intf.how -> 'a t -> f:('a -> bool t) -> 'a t t
val filter_map :
?how:Deferred_intf.how -> 'a t -> f:('a -> 'b option t) -> 'b t t
val all : 'a t t -> 'a t t
val all_unit : unit t t -> unit t
end
module Map : Deferred_intf.Deferred_map
module Result :
sig
type ('a, 'b) t = ('a, 'b) Core.Std.Result.t t
val ( >>= ) : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val ( >>| ) : ('a, 'd) t -> ('a -> 'b) -> ('b, 'd) t
module Monad_infix :
sig
val ( >>= ) : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val ( >>| ) : ('a, 'd) t -> ('a -> 'b) -> ('b, 'd) t
end
val bind : ('a, 'd) t -> ('a -> ('b, 'd) t) -> ('b, 'd) t
val return : 'a -> ('a, 'b) t
val map : ('a, 'd) t -> f:('a -> 'b) -> ('b, 'd) t
val join : (('a, 'd) t, 'd) t -> ('a, 'd) t
val ignore : ('a, 'd) t -> (unit, 'd) t
val all : ('a, 'd) t List.t -> ('a List.t, 'd) t
val all_ignore : (unit, 'd) t List.t -> (unit, 'd) t
end
module Option :
sig
type 'a t = 'a option t
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
module Monad_infix :
sig
val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t
val ( >>| ) : 'a t -> ('a -> 'b) -> 'b t
end
val bind : 'a t -> ('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore : 'a t -> unit t
val all : 'a t List.t -> 'a List.t t
val all_ignore : unit t List.t -> unit t
end
val don't_wait_for : unit Deferred.t -> unit
type 'a choice
val choice : 'a Deferred.t -> ('a -> 'b) -> 'b Deferred.choice
val enabled : 'b Deferred.choice list -> (unit -> 'b list) Deferred.t
val choose : 'b Deferred.choice list -> 'b Deferred.t
val repeat_until_finished :
'state ->
('state -> [ `Finished of 'result | `Repeat of 'state ] Deferred.t) ->
'result Deferred.t
val forever : 'state -> ('state -> 'state Deferred.t) -> unit
val debug_space_leaks : int option Pervasives.ref
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a Deferred.t -> Sexplib.Sexp.t
end