From 3c248785237d8dea037da274f4acc0229894de93 Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 16 Feb 2001 15:58:48 +0000 Subject: ident au lieu de string pour le nom de base de qualid git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1395 85f007b7-540e-0410-9357-904b9bb8a0f7 --- contrib/omega/coq_omega.ml | 12 +++++++----- contrib/ring/quote.ml | 5 +++-- contrib/ring/ring.ml | 5 +++-- contrib/xml/xmlcommand.ml | 3 +-- 4 files changed, 14 insertions(+), 11 deletions(-) (limited to 'contrib') diff --git a/contrib/omega/coq_omega.ml b/contrib/omega/coq_omega.ml index fec7fb7018..00ce6d2078 100644 --- a/contrib/omega/coq_omega.ml +++ b/contrib/omega/coq_omega.ml @@ -213,10 +213,11 @@ let recognize_number t = let constant dir s = let dir = "Coq"::dir in + let id = id_of_string s in try - Declare.global_reference_in_absolute_module dir (id_of_string s) + Declare.global_reference_in_absolute_module dir id with Not_found -> - anomaly ("Coq_omega: cannot find "^(string_of_qualid (make_qualid dir s))) + anomaly ("Coq_omega: cannot find "^(string_of_qualid (make_qualid dir id))) let zarith_constant dir = constant ("Zarith"::dir) @@ -368,15 +369,16 @@ let build_coq_eq = build_coq_eq_data.eq open Closure let make_coq_path dir s = let dir = "Coq"::dir in + let id = id_of_string s in let ref = - try Nametab.locate_in_absolute_module dir (id_of_string s) + try Nametab.locate_in_absolute_module dir id with Not_found -> - anomaly("Coq_omega: cannot find "^(string_of_qualid (make_qualid dir s))) + anomaly("Coq_omega: cannot find "^(string_of_qualid(make_qualid dir id))) in match ref with | ConstRef sp -> EvalConstRef sp | _ -> anomaly ("Coq_omega: "^ - (string_of_qualid (make_qualid dir s))^ + (string_of_qualid (make_qualid dir id))^ " is not a constant") let sp_Zs = lazy (make_coq_path ["Zarith";"zarith_aux"] "Zs") diff --git a/contrib/ring/quote.ml b/contrib/ring/quote.ml index 44cbd7868b..efc8d78d85 100644 --- a/contrib/ring/quote.ml +++ b/contrib/ring/quote.ml @@ -114,10 +114,11 @@ open Proof_type let constant dir s = let dir = "Coq"::"ring"::dir in + let id = id_of_string s in try - Declare.global_reference_in_absolute_module dir (id_of_string s) + Declare.global_reference_in_absolute_module dir id with Not_found -> - anomaly ("Quote: cannot find "^(string_of_qualid (make_qualid dir s))) + anomaly ("Quote: cannot find "^(string_of_qualid (make_qualid dir id))) let coq_Empty_vm = lazy (constant ["Quote"] "Empty_vm") let coq_Node_vm = lazy (constant ["Quote"] "Node_vm") diff --git a/contrib/ring/ring.ml b/contrib/ring/ring.ml index b3421c9693..7b3b8f6f63 100644 --- a/contrib/ring/ring.ml +++ b/contrib/ring/ring.ml @@ -27,10 +27,11 @@ let constr_of com = Astterm.interp_constr mt_evd (Global.env()) com let constant dir s = let dir = "Coq"::"ring"::dir in + let id = id_of_string s in try - Declare.global_reference_in_absolute_module dir (id_of_string s) + Declare.global_reference_in_absolute_module dir id with Not_found -> - anomaly ("Ring: cannot find "^(string_of_qualid (make_qualid dir s))) + anomaly ("Ring: cannot find "^(string_of_qualid (make_qualid dir id))) (* Ring_theory *) diff --git a/contrib/xml/xmlcommand.ml b/contrib/xml/xmlcommand.ml index a3c1af98db..4d4b05d784 100644 --- a/contrib/xml/xmlcommand.ml +++ b/contrib/xml/xmlcommand.ml @@ -699,8 +699,7 @@ let print sp fn = let module N = Names in let module T = Term in let module X = Xml in - let (_,str) = N.repr_qualid sp in - let id = Names.id_of_string str in + let (_,id) = N.repr_qualid sp in let glob_ref = Nametab.locate sp in let env = (Safe_typing.env_of_safe_env (G.safe_env ())) in reset_ids () ; -- cgit v1.2.3