summaryrefslogtreecommitdiff
path: root/src/config_diff.mli
diff options
context:
space:
mode:
Diffstat (limited to 'src/config_diff.mli')
-rw-r--r--src/config_diff.mli44
1 files changed, 29 insertions, 15 deletions
diff --git a/src/config_diff.mli b/src/config_diff.mli
index 0f4ebf0..c995ba3 100644
--- a/src/config_diff.mli
+++ b/src/config_diff.mli
@@ -1,25 +1,39 @@
-type change = Unchanged | Added | Subtracted | Updated of string list
-type diff_func = ?recurse:bool -> string list -> change -> unit
+module Diff_tree : sig
+ type t = { left: Config_tree.t;
+ right: Config_tree.t;
+ add: Config_tree.t;
+ sub: Config_tree.t;
+ del: Config_tree.t;
+ inter: Config_tree.t;
+ }
+end
-type diff_trees = {
- left: Config_tree.t;
- right: Config_tree.t;
- add: Config_tree.t ref;
- sub: Config_tree.t ref;
- inter: Config_tree.t ref;
-}
+module Diff_string : sig
+ type t = { left: Config_tree.t;
+ right : Config_tree.t;
+ skel: Config_tree.t;
+ ppath: string list;
+ udiff: string;
+ }
+end
+
+module Diff_cstore : sig
+ type t = { left: Config_tree.t;
+ right: Config_tree.t;
+ handle: int;
+ }
+end
+
+type _ result =
+ | Diff_tree : Diff_tree.t -> Diff_tree.t result
+ | Diff_string : Diff_string.t -> Diff_string.t result
+ | Diff_cstore : Diff_cstore.t -> Diff_cstore.t result
exception Incommensurable
exception Empty_comparison
exception Nonexistent_child
-val make_diff_trees : Config_tree.t -> Config_tree.t -> diff_trees
-val clone : ?recurse:bool -> ?set_values:(string list) option -> Config_tree.t -> Config_tree.t -> string list -> Config_tree.t
-val decorate_trees : diff_trees -> ?recurse:bool -> string list -> change -> unit
-val trim_trees : diff_trees -> ?recurse:bool -> string list -> change -> unit
-val compare : string list -> Config_tree.t -> Config_tree.t -> diff_trees
val diff_tree : string list -> Config_tree.t -> Config_tree.t -> Config_tree.t
-val trim_tree : Config_tree.t -> Config_tree.t -> Config_tree.t
val show_diff : ?cmds:bool -> string list -> Config_tree.t -> Config_tree.t -> string
val tree_union : Config_tree.t -> Config_tree.t -> Config_tree.t