diff options
| author | herbelin | 2011-04-08 14:08:47 +0000 |
|---|---|---|
| committer | herbelin | 2011-04-08 14:08:47 +0000 |
| commit | 7cc81d4bebb993ea6f71290a808a74439465cdde (patch) | |
| tree | c4aadf8c7116bb7f8c1b6b640771d800923dd10f /kernel/typeops.ml | |
| parent | e1c1d2f9de349abbcd69fe050caad674c561e91a (diff) | |
Replaced printing number of ill-typed branch by printing name of constructor
when a "match" is kernel-ill-typed (probably rarely visible from end
user anyway but useful for debugging) + dead code.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13969 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/typeops.ml')
| -rw-r--r-- | kernel/typeops.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/typeops.ml b/kernel/typeops.ml index 3568118cf1..85e8e6c885 100644 --- a/kernel/typeops.ml +++ b/kernel/typeops.ml @@ -313,11 +313,11 @@ let judge_of_constructor env c = (* Case. *) -let check_branch_types env cj (lfj,explft) = +let check_branch_types env ind cj (lfj,explft) = try conv_leq_vecti env (Array.map j_type lfj) explft with NotConvertibleVect i -> - error_ill_formed_branch env cj.uj_val i lfj.(i).uj_type explft.(i) + error_ill_formed_branch env cj.uj_val (ind,i+1) lfj.(i).uj_type explft.(i) | Invalid_argument _ -> error_number_branches env cj (Array.length explft) @@ -328,7 +328,7 @@ let judge_of_case env ci pj cj lfj = let _ = check_case_info env (fst indspec) ci in let (bty,rslty,univ) = type_case_branches env indspec pj cj.uj_val in - let univ' = check_branch_types env cj (lfj,bty) in + let univ' = check_branch_types env (fst indspec) cj (lfj,bty) in ({ uj_val = mkCase (ci, (*nf_betaiota*) pj.uj_val, cj.uj_val, Array.map j_val lfj); uj_type = rslty }, |
