aboutsummaryrefslogtreecommitdiff
path: root/script.it/outline/outline.ml
diff options
context:
space:
mode:
Diffstat (limited to 'script.it/outline/outline.ml')
-rwxr-xr-xscript.it/outline/outline.ml21
1 files changed, 21 insertions, 0 deletions
diff --git a/script.it/outline/outline.ml b/script.it/outline/outline.ml
new file mode 100755
index 0000000..1df7588
--- /dev/null
+++ b/script.it/outline/outline.ml
@@ -0,0 +1,21 @@
+open StdLabels
+
+let internal_path_id = ref 0
+
+type t =
+ { id : int
+ ; path: Path.Fixed.t
+ ; back: Path.Fixed.t
+ }
+
+let get_id () =
+ let id = !internal_path_id in
+ incr internal_path_id;
+ id
+
+let find
+ : t list -> int -> t option
+ = fun ts id ->
+ List.find_opt
+ ts
+ ~f:(fun p -> p.id = id)