aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-05-17 18:55:42 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-05-17 18:55:42 +0000
commitc35f5d4f93e4eca1b704722bd3c207783e97649a (patch)
treec94d333d81435e5a96d0931dc90938ed7337c4fc /pretyping
parentb5a8c6345e562ba8904d4704d36778826429e6e2 (diff)
Nettoyage et standardisation des messages d'erreurs.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9831 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/indrec.ml8
-rw-r--r--pretyping/indrec.mli2
2 files changed, 5 insertions, 5 deletions
diff --git a/pretyping/indrec.ml b/pretyping/indrec.ml
index 7fd65050c..84f35241a 100644
--- a/pretyping/indrec.ml
+++ b/pretyping/indrec.ml
@@ -31,7 +31,7 @@ open Sign
type recursion_scheme_error =
| NotAllowedCaseAnalysis of bool * sorts * inductive
| BadInduction of bool * identifier * sorts
- | NotMutualInScheme
+ | NotMutualInScheme of inductive * inductive
exception RecursionSchemeError of recursion_scheme_error
@@ -501,13 +501,13 @@ let instantiate_type_indrec_scheme sort npars term =
let check_arities listdepkind =
let _ = List.fold_left
- (fun ln ((_,ni),mibi,mipi,dep,kind) ->
+ (fun ln ((_,ni as mind),mibi,mipi,dep,kind) ->
let id = mipi.mind_typename in
let kelim = elim_sorts (mibi,mipi) in
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
- (RecursionSchemeError NotMutualInScheme)
+ (RecursionSchemeError (NotMutualInScheme (mind,mind)))
else ni::ln)
[] listdepkind
in true
@@ -524,7 +524,7 @@ let build_mutual_indrec env sigma = function
let (mibi',mipi') = lookup_mind_specif env mind' in
(mind',mibi',mipi',dep',s')
else
- raise (RecursionSchemeError NotMutualInScheme))
+ raise (RecursionSchemeError (NotMutualInScheme (mind,mind'))))
lrecspec)
in
let _ = check_arities listdepkind in
diff --git a/pretyping/indrec.mli b/pretyping/indrec.mli
index f0f7747cb..b172935f5 100644
--- a/pretyping/indrec.mli
+++ b/pretyping/indrec.mli
@@ -22,7 +22,7 @@ open Evd
type recursion_scheme_error =
| NotAllowedCaseAnalysis of bool * sorts * inductive
| BadInduction of bool * identifier * sorts
- | NotMutualInScheme
+ | NotMutualInScheme of inductive * inductive
exception RecursionSchemeError of recursion_scheme_error