Module Incremental_kernel__.Expert

A module internal to Incremental. Users should see Incremental_intf.

An Expert.t is the only kind of node that can update its value and set of children incrementally. The operations to change the set of children and to react to various events (new value in a child etc) are exposed to the user.

include module type of sig ... end
type 'a edge = 'a Incremental_kernel__Types.Expert.edge = {
child : 'a Incremental_kernel__Types.Node.t;
on_change : 'a ‑> unit;
mutable index : int Incremental_kernel__.Uopt.t;
}
type 'a t = 'a Incremental_kernel__Types.Expert.t = {
f : unit ‑> 'a;
on_observability_change : is_now_observable:bool ‑> unit;
mutable children : packed_edge Incremental_kernel__.Uopt.t Incremental_kernel__.Import.Array.t;
mutable num_children : int;
mutable force_stale : bool;
mutable num_invalid_children : int;
mutable will_fire_all_callbacks : bool;
}
include Core_kernel.Invariant.S1 with type t := a t
type 'a t
include Incremental_kernel__.Sexp_of.S1 with type t := a t
type 'a t
include sig ... end
val sexp_of_t : ('a ‑> Base.Sexp.t) ‑> 'a t ‑> Base.Sexp.t
val sexp_of_edge : ('a ‑> Core_kernel.Sexp.t) ‑> 'a edge ‑> Core_kernel.Sexp.t
val invariant_about_num_invalid_children : _ t ‑> is_necessary:bool ‑> unit
val create : f:(unit ‑> 'a) ‑> on_observability_change:(is_now_observable:bool ‑> unit) ‑> 'a t
val make_stale : _ t ‑> [ `Already_stale | `Ok ]
val incr_invalid_children : _ t ‑> unit
val decr_invalid_children : _ t ‑> unit
val add_child_edge : _ t ‑> packed_edge ‑> int

Returns the index of this new edge.

val swap_children : _ t ‑> child_index1:int ‑> child_index2:int ‑> unit
val last_child_edge_exn : _ t ‑> packed_edge
val remove_last_child_edge_exn : _ t ‑> unit
val before_main_computation : _ t ‑> [ `Invalid | `Ok ]
val observability_change : _ t ‑> is_now_observable:bool ‑> unit
val run_edge_callback : _ t ‑> child_index:int ‑> unit