aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorherbelin2005-12-17 22:03:35 +0000
committerherbelin2005-12-17 22:03:35 +0000
commit1bec6b33c62e6b465753ebc17630ea3db433feb1 (patch)
tree2167c489fd0d9e27e37ef33d8f4d7a3fe0366a76 /pretyping
parentae6c95a3755fc3a9434bcc9fdd81b7c69baa8280 (diff)
Création d'un type d'erreur RecursionSchemeError distinct de InductiveError (suite)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7662 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/indrec.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml
index b0dcdde0d7..ef6fccfc40 100644
--- a/pretyping/indrec.ml
+++ b/pretyping/indrec.ml
@@ -56,7 +56,7 @@ let mis_make_case_com depopt env sigma (ind,mib,mip) kind =
in
if not (List.exists ((=) kind) mip.mind_kelim) then
raise
- (InductiveError
+ (RecursionSchemeError
(NotAllowedCaseAnalysis
(dep,(new_sort_in_family kind),ind)));
@@ -505,11 +505,10 @@ let check_arities listdepkind =
(fun ln ((_,ni),mibi,mipi,dep,kind) ->
let id = mipi.mind_typename in
let kelim = mipi.mind_kelim in
- if not (List.exists ((=) kind) kelim) then
- raise
- (InductiveError (BadInduction (dep, id, new_sort_in_family kind)))
+ if not (List.exists ((=) kind) kelim) then raise
+ (RecursionSchemeError (BadInduction (dep,id,new_sort_in_family kind)))
else if List.mem ni ln then raise
- (InductiveError NotMutualInScheme)
+ (RecursionSchemeError NotMutualInScheme)
else ni::ln)
[] listdepkind
in true
@@ -526,7 +525,7 @@ let build_mutual_indrec env sigma = function
let (mibi',mipi') = lookup_mind_specif env mind' in
(mind',mibi',mipi',dep',s')
else
- raise (InductiveError NotMutualInScheme))
+ raise (RecursionSchemeError NotMutualInScheme))
lrecspec)
in
let _ = check_arities listdepkind in