blob: 588084e817aecc92b2602c95b0bfa8f27238924d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
open StdLabels
module Path = Script_path
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)
|