]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_tactics/zipTree.mli
more functions
[helm.git] / helm / software / components / ng_tactics / zipTree.mli
index 04e9a7b7c8313fc9ece05b71e37d25a32801c86a..a74206cc3b4256833e3fec2a9b6f97f1f6da82b3 100644 (file)
 
 (* $Id: nCic.ml 9058 2008-10-13 17:42:30Z tassi $ *)
 
+val repeat : ('a -> 'a option) -> 'a -> 'a
+
+module type Elem = sig type t val pp : t -> string end ;;
+
+module type ZipTree = sig
+  type t
+  type tree = Node of (t * tree) list
+  type position
+
+  val start : tree -> position
+
+  val up    : position -> position option
+  val down  : position -> position option
+  val left  : position -> position option
+  val right : position -> position option
+
+  val root: position -> tree
+  val previsit: ('a -> t -> 'a) -> 'a -> position -> 'a
+
+  val get: position -> t
+  val set: t -> position -> position
+
+  val inject: tree -> position -> position
+  val eject: position -> tree
+
+end
+
+module Make(T : Elem) : ZipTree with type t = T.t