aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Path.ml
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-08-22 17:55:26 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-08-23 03:06:58 +0000
commitdb968eccee931abc8ad00d74d152625a2ab3174e (patch)
tree3d5018dd9e298cfc1fb14bf404cde3fce5953fca /lib/concepts/Path.ml
parentb242516fc820a0a1ab00e24151a5b978f9a6f4a3 (diff)
downloadRNT-db968eccee931abc8ad00d74d152625a2ab3174e.tar.gz
RNT-db968eccee931abc8ad00d74d152625a2ab3174e.zip
Tidy up
Diffstat (limited to '')
-rw-r--r--lib/concepts/Path.ml16
-rw-r--r--lib/concepts/Path.mli8
2 files changed, 0 insertions, 24 deletions
diff --git a/lib/concepts/Path.ml b/lib/concepts/Path.ml
deleted file mode 100644
index c751301..0000000
--- a/lib/concepts/Path.ml
+++ /dev/null
@@ -1,16 +0,0 @@
-type t = string BatFingerTree.t
-
-let empty : t = BatFingerTree.empty
-let of_list (components : string list) : t = BatFingerTree.of_list components
-let to_list (path : t) : string list = BatFingerTree.to_list path
-let snoc (path : t) (component : string) : t = BatFingerTree.snoc path component
-let to_string (path : t) : string = String.concat "/" (to_list path)
-
-let is_prefix ~(prefix : t) (path : t) : bool =
- let rec walk prefix path =
- match prefix, path with
- | [], _ -> true
- | p :: prefix, x :: path -> p = x && walk prefix path
- | _ :: _, [] -> false
- in
- walk (to_list prefix) (to_list path)
diff --git a/lib/concepts/Path.mli b/lib/concepts/Path.mli
deleted file mode 100644
index bec4221..0000000
--- a/lib/concepts/Path.mli
+++ /dev/null
@@ -1,8 +0,0 @@
-type t = string BatFingerTree.t
-
-val empty : t
-val of_list : string list -> t
-val to_list : t -> string list
-val snoc : t -> string -> t
-val to_string : t -> string
-val is_prefix : prefix:t -> t -> bool