Module Incremental_kernel__Node.Packed

For performance reasons, we do not use an OCaml existential type for Node.Packed.t:

      type t = T : _ Node.t -> t

The extra indirection when following pointers to packed nodes would be too slow.

Consequently, there is a possible bug in which we mix the 'a from two packed nodes with different types. We reduce the chance of this bug by minimizing the scopes in which we deal with packed nodes.

type t = Incremental_kernel__.Types.Packed_node.t
include sig ... end
val sexp_of_t : t ‑> Base.Sexp.t
include Core_kernel.Invariant.S with type t := t
type t
module As_list : functor (M : sig ... end) -> sig ... end

As_list allows one to view a node as a list w.r.t. a particular next pointer contained within it. The recompute heap uses this with next_in_recompute_heap, and the adjust-heights heap uses this with next_in_adjust_heights_heap.

val iter_descendants : t list ‑> f:(t ‑> unit) ‑> unit

iter_descendants ts ~f calls f on every node in ts and all of their descendants exactly once per node.

val save_dot : string ‑> t list ‑> unit