diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2001-02-16 15:58:48 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2001-02-16 15:58:48 +0000 |
commit | 3c248785237d8dea037da274f4acc0229894de93 (patch) | |
tree | 4501aca5e725d5f62ffd9f959a8956f30bf432eb /contrib | |
parent | 649e7e98e0067a7ae2a3990b9629dcec66b47497 (diff) |
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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/omega/coq_omega.ml | 12 | ||||
-rw-r--r-- | contrib/ring/quote.ml | 5 | ||||
-rw-r--r-- | contrib/ring/ring.ml | 5 | ||||
-rw-r--r-- | contrib/xml/xmlcommand.ml | 3 |
4 files changed, 14 insertions, 11 deletions
diff --git a/contrib/omega/coq_omega.ml b/contrib/omega/coq_omega.ml index fec7fb701..00ce6d207 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 44cbd7868..efc8d78d8 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 b3421c969..7b3b8f6f6 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 a3c1af98d..4d4b05d78 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 () ; |