aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-10-28 17:37:01 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-10-28 17:37:01 +0000
commitd5b03d4b052023012b859071e2bd6ff754256cab (patch)
tree93c9fcdc40c5beaf8f5d6b5c95f620d4cdc1e280 /interp
parent1fe6b08c2cc56d3d5e7b5e07f570851c03791499 (diff)
Fixed a bug when reporting unexisting reference to an inductive
(introduced in r12323). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12438 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r--interp/smartlocate.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/interp/smartlocate.ml b/interp/smartlocate.ml
index f16f5363c..9b4ff860c 100644
--- a/interp/smartlocate.ml
+++ b/interp/smartlocate.ml
@@ -37,11 +37,13 @@ let locate_global_with_alias (loc,qid) =
str " is bound to a notation that does not denote a reference")
let global_inductive_with_alias r =
- match locate_global_with_alias (qualid_of_reference r) with
+ let (loc,qid as lqid) = qualid_of_reference r in
+ try match locate_global_with_alias lqid with
| IndRef ind -> ind
| ref ->
user_err_loc (loc_of_reference r,"global_inductive",
pr_reference r ++ spc () ++ str "is not an inductive type")
+ with Not_found -> Nametab.error_global_not_found_loc loc qid
let global_with_alias r =
let (loc,qid as lqid) = qualid_of_reference r in