summaryrefslogtreecommitdiff
path: root/src/Identifiers.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Identifiers.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Identifiers.ml b/src/Identifiers.ml
index cab1bafa..f01d4f47 100644
--- a/src/Identifiers.ml
+++ b/src/Identifiers.ml
@@ -40,6 +40,8 @@ module type Id = sig
val set_to_string : Set.t -> string
+ module Map : Map.S with type key = id
+
val id_of_json : Yojson.Basic.t -> (id, string) result
val vector_of_json :
@@ -98,6 +100,12 @@ module IdGen () : Id = struct
let compare = compare
end)
+ module Map = Map.Make (struct
+ type t = id
+
+ let compare = compare
+ end)
+
let set_to_string ids =
let ids = Set.fold (fun id ids -> to_string id :: ids) ids [] in
"{" ^ String.concat ", " (List.rev ids) ^ "}"