summaryrefslogtreecommitdiff
path: root/src/diff.mli
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2026-08-14 15:18:46 +0100
committerGitHub <noreply@github.com>2026-08-14 15:18:46 +0100
commit07636e49b3a04fdc76ac42bd65df88736c3945f1 (patch)
treec06d8aaa1da05b5ec4247ea33ab350eddf21b1f2 /src/diff.mli
parentbcdc6701a4224225b7acde15a9c143c2b44f837d (diff)
parent842cf404d22f2d11ad03b769d040298471f98630 (diff)
downloadvyos1x-config-07636e49b3a04fdc76ac42bd65df88736c3945f1.tar.gz
vyos1x-config-07636e49b3a04fdc76ac42bd65df88736c3945f1.zip
Merge pull request #90 from jestabro/diff-functor
T9169: Refactor vyos1x-config diff functions in functorial style
Diffstat (limited to 'src/diff.mli')
-rw-r--r--src/diff.mli14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/diff.mli b/src/diff.mli
new file mode 100644
index 0000000..41ae523
--- /dev/null
+++ b/src/diff.mli
@@ -0,0 +1,14 @@
+type change = Unchanged | Added | Subtracted | Updated of string list
+
+exception Incommensurable
+exception Empty_comparison
+
+module type Place = sig
+ type t
+ val diff_func : ?recurse:bool -> string list -> t -> change -> t
+end
+
+module Diff : functor (P: Place) -> sig
+ val diff_calc : string list -> P.t -> Config_tree.t option * Config_tree.t option -> P.t
+ val diff : P.t -> Config_tree.t -> Config_tree.t -> P.t
+end