package plebeia

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

3 Tools

Segment based diffs

3 Tools

type t =
  1. | Add of Node_type.node * Segment.Segs.t
  2. | Del of Segment.Segs.t
  3. | CleanBud of Segment.Segs.t
  4. | ModLeaf of Node_type.node * Value.t * Segment.Segs.t

Segment fbased diff

val pp : Stdlib.Format.formatter -> t -> unit

Pretty printing

val reset_for_another_context : Context.t -> t -> t

Load all the node in the diff and foget Index information so tht the diff can be directly applicable to tree of the another context.

val reset_for_another_context' : src:Context.t -> dst:Context.t -> t -> t
val diff : Context.t -> Node_type.node -> Node_type.node -> t list

diff src dst gets the segment based diff between 2 nodes

val apply : Cursor.t -> t -> (Cursor.t, Error.t) Stdlib.result

Add (n,segs) just insert n to the cursor. If Cursor.t uses a different context from the one of diffs, indices in the n must be reset to Not_Indexed.

val apply_and_check : Context.t -> Node_type.node -> Node_type.node -> t list -> unit

Check the diff correctness

OCaml

Innovation. Community. Security.