From 301a70e45eac43f034077c95bce04edbcf2ab4ad Mon Sep 17 00:00:00 2001 From: herbelin Date: Thu, 11 Oct 2001 17:27:20 +0000 Subject: Suppression option immediate_discharge; nettoyage de Declare et conséquences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2109 85f007b7-540e-0410-9357-904b9bb8a0f7 --- library/nametab.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'library/nametab.ml') diff --git a/library/nametab.ml b/library/nametab.ml index 6cd43c392..643c4ff16 100755 --- a/library/nametab.ml +++ b/library/nametab.ml @@ -240,6 +240,16 @@ let absolute_reference sp = let locate_in_absolute_module dir id = absolute_reference (make_path dir id CCI) +let global loc qid = + try match extended_locate qid with + | TrueGlobal ref -> ref + | SyntacticDef _ -> + error + ("Unexpected reference to a syntactic definition: " + ^(string_of_qualid qid)) + with Not_found -> + error_global_not_found_loc loc qid + let exists_cci sp = try let _ = locate_cci (qualid_of_sp sp) in true with Not_found -> false -- cgit v1.2.3