package irmin

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Graph specifies the signature for node graphs. A node graph is a deterministic DAG, labeled by steps.

Node Graphs

type t

The type for store handles.

type metadata

The type for node metadata.

type contents

The type of user-defined contents.

type node

The type for node values.

type step

The type of steps. A step is used to pass from one node to another.

type path

The type of store paths. A path is composed of steps.

type value = [
  1. | `Node of node
  2. | `Contents of contents * metadata
]

The type for store values.

val empty : t -> node Lwt.t

The empty node.

val v : t -> (step * value) list -> node Lwt.t

v t n is a new node containing n.

val list : t -> node -> (step * value) list Lwt.t

list t n is the contents of the node n.

val find : t -> node -> path -> value option Lwt.t

find t n p is the contents of the path p starting form n.

val update : t -> node -> path -> value -> node Lwt.t

update t n p v is the node x such that find t x p is Some v and it behaves the same n for other operations.

val remove : t -> node -> path -> node Lwt.t

remove t n path is the node x such that find t x is None and it behhaves then same as n for other operations.

val closure : t -> min:node list -> max:node list -> node list Lwt.t

closure t ~min ~max is the transitive closure c of t's nodes such that:

  • There is a path in t from any nodes in min to nodes in c. If min is empty, that condition is always true.
  • There is a path in t from any nodes in c to nodes in max. If max is empty, that condition is always false.

B Note: Both min and max are subsets of c.

Value Types

val metadata_t : metadata Type.t

metadat_t is the value type for metadata.

val contents_t : contents Type.t

contents_t is the value type for contents.

val node_t : node Type.t

node_t is the value type for node.

val step_t : step Type.t

step_t is the value type for step.

val path_t : path Type.t

path_t is the value type for path.

val value_t : value Type.t

value_t is the value type for value.