summaryrefslogtreecommitdiff
path: root/src/Identifiers.ml
diff options
context:
space:
mode:
authorSon Ho2021-11-23 14:02:14 +0100
committerSon Ho2021-11-23 14:02:14 +0100
commitb96bd19fe1ff22c2f1e03332468d4e6abb8a947e (patch)
tree00c889edf8bc828ef3c984c2fb2945239a5594b9 /src/Identifiers.ml
parentfcc3a467886e5c95b065b1fc4c27301fd62d7c21 (diff)
Implement formatting for eval_ctx
Diffstat (limited to 'src/Identifiers.ml')
-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) ^ "}"