aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/nametab.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-11-14 18:37:54 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-11-14 18:37:54 +0000
commite88e0b2140bdd2d194a52bc09f8338b5667d0f92 (patch)
tree67ca22f77ddb98725456e5f9a0b5ad613ae28da5 /library/nametab.ml
parente4efb857fa9053c41e4c030256bd17de7e24542f (diff)
Réforme de l'interprétation des termes :
- Le parsing se fait maintenant via "constr_expr" au lieu de "Coqast.t" - "Coqast.t" reste pour l'instant pour le pretty-printing. Un deuxième pretty-printer dans ppconstr.ml est basé sur "constr_expr". - Nouveau répertoire "interp" qui hérite de la partie interprétation qui se trouvait avant dans "parsing" (constrintern.ml remplace astterm.ml; constrextern.ml est l'équivalent de termast.ml pour le nouveau printer; topconstr.ml; contient la définition de "constr_expr"; modintern.ml remplace astmod.ml) - Libnames.reference tend à remplacer Libnames.qualid git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3235 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/nametab.ml')
-rwxr-xr-xlibrary/nametab.ml15
1 files changed, 6 insertions, 9 deletions
diff --git a/library/nametab.ml b/library/nametab.ml
index e50a0e6b9..d4707ecbc 100755
--- a/library/nametab.ml
+++ b/library/nametab.ml
@@ -387,7 +387,8 @@ let absolute_reference sp =
let locate_in_absolute_module dir id =
absolute_reference (make_path dir id)
-let global (loc,qid) =
+let global r =
+ let (loc,qid) = qualid_of_reference r in
try match extended_locate qid with
| TrueGlobal ref -> ref
| SyntacticDef _ ->
@@ -397,9 +398,6 @@ let global (loc,qid) =
with Not_found ->
error_global_not_found_loc loc qid
-
-
-
(* Exists functions ********************************************************)
let exists_cci sp = SpTab.exists sp !the_ccitab
@@ -452,12 +450,12 @@ let pr_global_env env ref =
let s = string_of_qualid (shortest_qualid_of_global env ref) in
(str s)
-let global_inductive (loc,qid as locqid) =
- match global locqid with
+let global_inductive r =
+ match global r with
| IndRef ind -> ind
| ref ->
- user_err_loc (loc,"global_inductive",
- pr_qualid qid ++ spc () ++ str "is not an inductive type")
+ user_err_loc (loc_of_reference r,"global_inductive",
+ pr_reference r ++ spc () ++ str "is not an inductive type")
(********************************************************************)
@@ -500,4 +498,3 @@ let _ =
Summary.unfreeze_function = unfreeze;
Summary.init_function = init;
Summary.survive_section = false }
-