aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/closure.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2016-03-10 19:02:16 +0100
committerGravatar Matthieu Sozeau <mattam@mattam.org>2016-03-10 19:39:25 +0100
commit4341f37cf3c51ed82c23f05846c8e6e8823d3cd6 (patch)
tree668c44dae870e87d21c0abf3b0aac5e8980a784a /kernel/closure.ml
parentf1a8b27ffe0df4f207b0cfaac067c8201d07ae16 (diff)
Primitive projections: protect kernel from erroneous definitions.
E.g., Inductive foo := mkFoo { bla : foo } allowed to define recursive records with eta for which conversion is incomplete. - Eta-conversion only applies to BiFinite inductives - Finiteness information is now checked by the kernel (the constructor types must be strictly non recursive for BiFinite declarations).
Diffstat (limited to 'kernel/closure.ml')
-rw-r--r--kernel/closure.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/closure.ml b/kernel/closure.ml
index 2ba80d836..93e63d0fb 100644
--- a/kernel/closure.ml
+++ b/kernel/closure.ml
@@ -784,7 +784,7 @@ let eta_expand_ind_stack env ind m s (f, s') =
let mib = lookup_mind (fst ind) env in
match mib.Declarations.mind_record with
| Some (Some (_,projs,pbs)) when
- mib.Declarations.mind_finite <> Decl_kinds.CoFinite ->
+ mib.Declarations.mind_finite == Decl_kinds.BiFinite ->
(* (Construct, pars1 .. parsm :: arg1...argn :: []) ~= (f, s') ->
arg1..argn ~= (proj1 t...projn t) where t = zip (f,s') *)
let pars = mib.Declarations.mind_nparams in