package patoline

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

The main datatype is a zipper over a document tree. It consists in a couple whose first component is a tree. The second component represents the context identifying a position in the tree.

The tree represented by the zipper (t, [(p1,t1), ... , (pn,tn)]) is built by:

  1. appending the tree t at position p1 in t1,
  2. appending the resulting tree at position p2 in t2,
  3. ...
  4. appending the resulting tree at position pn in tn.
type nonrec node = node
type nonrec tree = tree
val tree_of_node : node -> tree
val node_of_tree : tree -> node
val get_child : node -> Patutil.Extra.IntMap.key -> tree
val set_child : node -> Patutil.Extra.IntMap.key -> tree -> node
val remove_child : node -> Patutil.Extra.IntMap.key -> node
val has_child : node -> Patutil.Extra.IntMap.key -> bool
val min_index : node -> Patutil.Extra.IntMap.key
val max_index : node -> Patutil.Extra.IntMap.key