aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-11-24 22:22:59 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-11-24 22:22:59 +0000
commite3038e0822548b90792903ccb460a0e61f1cadaf (patch)
tree30e5ebed674e6e0e985295f0bd887d88aed65f34
parent38c3baf926ce1248be7aca5288810e8c000bb55c (diff)
Ajout Refmap
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3266 85f007b7-540e-0410-9357-904b9bb8a0f7
-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