diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-09-06 13:23:28 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-09-06 13:23:28 +0200 |
commit | d8b245d688ff64d17acd9e7591daf6d63b4e54f7 (patch) | |
tree | 0e202d1f39e97844d94a873b30e4fb14fb481f84 /kernel/indtypes.ml | |
parent | c53f2f75375dfffd2f258c76f5b722d37ab0daf9 (diff) | |
parent | 5080991902a05ee720ab1d6fa1c9d592d3ffd36c (diff) |
Merge branch 'v8.5'
Diffstat (limited to 'kernel/indtypes.ml')
-rw-r--r-- | kernel/indtypes.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/indtypes.ml b/kernel/indtypes.ml index 3c137ee92..e3457006d 100644 --- a/kernel/indtypes.ml +++ b/kernel/indtypes.ml @@ -344,7 +344,7 @@ type ill_formed_ind = | LocalNonPos of int | LocalNotEnoughArgs of int | LocalNotConstructor - | LocalNonPar of int * int + | LocalNonPar of int * int * int exception IllFormedInd of ill_formed_ind @@ -365,9 +365,9 @@ let explain_ind_err id ntyp env nbpar c nargs err = | LocalNotConstructor -> raise (InductiveError (NotConstructor (env,id,c',mkRel (ntyp+nbpar),nbpar,nargs))) - | LocalNonPar (n,l) -> + | LocalNonPar (n,i,l) -> raise (InductiveError - (NonPar (env,c',n,mkRel (nbpar-n+1), mkRel (l+nbpar)))) + (NonPar (env,c',n,mkRel i, mkRel (l+nbpar)))) let failwith_non_pos n ntypes c = for k = n to n + ntypes - 1 do @@ -396,7 +396,7 @@ let check_correct_par (env,n,ntypes,_) hyps l largs = | _::hyps -> match kind_of_term (whd_betadeltaiota env lpar.(k)) with | Rel w when Int.equal w index -> check (k-1) (index+1) hyps - | _ -> raise (IllFormedInd (LocalNonPar (k+1,l))) + | _ -> raise (IllFormedInd (LocalNonPar (k+1, index, l))) in check (nparams-1) (n-nhyps) hyps; if not (Array.for_all (noccur_between n ntypes) largs') then failwith_non_pos_vect n ntypes largs' |