Up

module Ir_node

: sig

Nodes represent structured values serialized in the block store.

#
module type S = sig
include Tc.S0
#
type contents
#
type node
#
type step
#
val create : (step * [
| `Contents of contents
| `Node of node
]) list -> t
#
val alist : t -> (step * [
| `Contents of contents
| `Node of node
]) list
#
val empty : t
#
val is_empty : t -> bool
#
val contents : t -> step -> contents option
#
val iter_contents : t -> (step -> contents -> unit) -> unit
#
val with_contents : t -> step -> contents option -> t
#
val succ : t -> step -> node option
#
val iter_succ : t -> (step -> node -> unit) -> unit
#
val with_succ : t -> step -> node option -> t
end
#
module Make : functor (C : Tc.S0) -> functor (N : Tc.S0) -> functor (P : Ir_path.S) -> S with type contents = C.t and type node = N.t and type step = P.step
#
module type STORE = sig
include Ir_ao.STORE
#
module Path : Ir_path.S
#
module Key : Ir_hash.S with type t = key
#
module Val : S with type t = value and type node = key and type step = Path.step
end
#
module type GRAPH = sig
#
type t
#
type contents
#
type node
#
type step
#
val empty : t -> node Lwt.t
#
val create : t -> (step * [
| `Contents of contents
| `Node of node
]) list -> node Lwt.t
#
val contents : t -> node -> step -> contents option Lwt.t
#
val succ : t -> node -> step -> node option Lwt.t
#
val steps : t -> node -> step list Lwt.t
#
val iter_contents : t -> node -> (step -> contents -> unit) -> unit Lwt.t
#
val iter_succ : t -> node -> (step -> node -> unit) -> unit Lwt.t
#
val mem_contents : t -> node -> step list -> bool Lwt.t
#
val read_contents : t -> node -> step list -> contents option Lwt.t
#
val read_contents_exn : t -> node -> step list -> contents Lwt.t
#
val add_contents : t -> node -> step list -> contents -> node Lwt.t
#
val remove_contents : t -> node -> step list -> node Lwt.t
#
val mem_node : t -> node -> step list -> bool Lwt.t
#
val read_node : t -> node -> step list -> node option Lwt.t
#
val read_node_exn : t -> node -> step list -> node Lwt.t
#
val add_node : t -> node -> step list -> node -> node Lwt.t
#
val remove_node : t -> node -> step list -> node Lwt.t
#
val merge : t -> node Ir_merge.t
#
val closure : t -> min:node list -> max:node list -> node list Lwt.t
#
module Store : Ir_contents.STORE with type t = t and type key = node
end
#
module Graph : functor (C : Ir_contents.STORE) -> functor (S : STORE with type Val.contents = C.key) -> GRAPH with type t = C.t * S.t and type contents = C.key and type node = S.key and type step = S.Val.step
end