Add Path.Table module
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
ec6ca4be67
commit
3ad4c06f4a
|
@ -489,6 +489,8 @@ module T : sig
|
||||||
| In_build_dir of Local.t
|
| In_build_dir of Local.t
|
||||||
|
|
||||||
val compare : t -> t -> Ordering.t
|
val compare : t -> t -> Ordering.t
|
||||||
|
val equal : t -> t -> bool
|
||||||
|
val hash : t -> int
|
||||||
|
|
||||||
val in_build_dir : Local.t -> t
|
val in_build_dir : Local.t -> t
|
||||||
val in_source_tree : Local.t -> t
|
val in_source_tree : Local.t -> t
|
||||||
|
@ -509,6 +511,9 @@ end = struct
|
||||||
| _ , In_source_tree _ -> Gt
|
| _ , In_source_tree _ -> Gt
|
||||||
| In_build_dir x , In_build_dir y -> Local.compare x y
|
| In_build_dir x , In_build_dir y -> Local.compare x y
|
||||||
|
|
||||||
|
let equal x y = compare x y = Ordering.Eq
|
||||||
|
let hash = Hashtbl.hash
|
||||||
|
|
||||||
let in_build_dir s = In_build_dir s
|
let in_build_dir s = In_build_dir s
|
||||||
let in_source_tree s = In_source_tree s
|
let in_source_tree s = In_source_tree s
|
||||||
let external_ e = External e
|
let external_ e = External e
|
||||||
|
@ -904,3 +909,5 @@ module Set = struct
|
||||||
end
|
end
|
||||||
|
|
||||||
let in_source s = in_source_tree (Local.of_string s)
|
let in_source s = in_source_tree (Local.of_string s)
|
||||||
|
|
||||||
|
module Table = Hashtbl.Make(T)
|
||||||
|
|
|
@ -37,6 +37,7 @@ module Set : sig
|
||||||
end
|
end
|
||||||
|
|
||||||
module Map : Map.S with type key = t
|
module Map : Map.S with type key = t
|
||||||
|
module Table : Hashtbl.S with type key = t
|
||||||
|
|
||||||
val of_string : ?error_loc:Usexp.Loc.t -> string -> t
|
val of_string : ?error_loc:Usexp.Loc.t -> string -> t
|
||||||
val to_string : t -> string
|
val to_string : t -> string
|
||||||
|
|
Loading…
Reference in New Issue