aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-04-06 14:06:52 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-04-06 14:06:52 +0000
commit41d6548d171317a54ee220afa67a5b0b13f7e00b (patch)
tree21c658ded99aaace74717eb1af1d3608821edbbb
parent2874c296bc0433ea0c1666b0a50231264b8489f6 (diff)
Bug sur commit 1.44 dans find_constructor (Not_Found pas rattrape)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5640 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--interp/constrintern.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index c46cad89b..a3448d74f 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -510,12 +510,17 @@ let maybe_constructor ref =
str " is understood as a pattern variable");
VarPat (find_pattern_variable ref)
+let mustbe_constructor loc ref =
+ try find_constructor ref
+ with (Environ.NotEvaluableConst _ | Not_found) ->
+ raise (InternalisationError (loc,NotAConstructor ref))
+
let rec intern_cases_pattern scopes aliases tmp_scope = function
| CPatAlias (loc, p, id) ->
let aliases' = merge_aliases aliases id in
intern_cases_pattern scopes aliases' tmp_scope p
| CPatCstr (loc, head, pl) ->
- let c,pl0 = find_constructor head in
+ let c,pl0 = mustbe_constructor loc head in
let argscs =
simple_adjust_scopes (find_arguments_scope (ConstructRef c), pl) in
let (idsl,pl') =