aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--library/libnames.ml8
-rw-r--r--library/libnames.mli2
2 files changed, 10 insertions, 0 deletions
diff --git a/library/libnames.ml b/library/libnames.ml
index 79acb7231..dae3f1140 100644
--- a/library/libnames.ml
+++ b/library/libnames.ml
@@ -45,6 +45,14 @@ let constr_of_reference = function
| ConstructRef sp -> mkConstruct sp
| IndRef sp -> mkInd sp
+module RefOrdered =
+ struct
+ type t = global_reference
+ let compare = Pervasives.compare
+ end
+
+module Refmap = Map.Make(RefOrdered)
+
(**********************************************)
let pr_dirpath sl = (str (string_of_dirpath sl))
diff --git a/library/libnames.mli b/library/libnames.mli
index e8dd2a5ff..6ecc498fc 100644
--- a/library/libnames.mli
+++ b/library/libnames.mli
@@ -31,6 +31,8 @@ val constr_of_reference : global_reference -> constr
raise [Not_found] if not a global *)
val reference_of_constr : constr -> global_reference
+module Refmap : Map.S with type key = global_reference
+
(*s Dirpaths *)
val pr_dirpath : dir_path -> Pp.std_ppcmds