Add Path.Table module

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-06 13:28:14 +07:00
parent ec6ca4be67
commit 3ad4c06f4a
2 changed files with 8 additions and 0 deletions

View File

@ -489,6 +489,8 @@ module T : sig
| In_build_dir of Local.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_source_tree : Local.t -> t
@ -509,6 +511,9 @@ end = struct
| _ , In_source_tree _ -> Gt
| 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_source_tree s = In_source_tree s
let external_ e = External e
@ -904,3 +909,5 @@ module Set = struct
end
let in_source s = in_source_tree (Local.of_string s)
module Table = Hashtbl.Make(T)

View File

@ -37,6 +37,7 @@ module Set : sig
end
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 to_string : t -> string