From 32c83676c96ae4a218de0bec75d2f3353381dfb3 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 28 Aug 2014 19:49:16 +0200 Subject: Change the way primitive projections are declared to the kernel. Now kernel/indtypes builds the corresponding terms (has to be trusted) while translate_constant just binds a constant name to the already entered projection body, avoiding the dubious "check" of user given terms. "case" Pattern-matching on primitive records is now disallowed, and the default scheme is implemented using projections and eta (all elimination tactics now use projections as well). Elaborate "let (x, y) := p in t" using let bindings for the projections of p too. --- kernel/declareops.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel/declareops.ml') diff --git a/kernel/declareops.ml b/kernel/declareops.ml index f583bff64d..5b937207fd 100644 --- a/kernel/declareops.ml +++ b/kernel/declareops.ml @@ -237,11 +237,11 @@ let subst_mind_packet sub mbp = mind_nb_args = mbp.mind_nb_args; mind_reloc_tbl = mbp.mind_reloc_tbl } -let subst_mind_record sub (c, ps as r) = - let c' = subst_mps sub c in +let subst_mind_record sub (ps, pb as r) = let ps' = Array.smartmap (subst_constant sub) ps in - if c' == c && ps' == ps then r - else (c', ps') + let pb' = Array.smartmap (subst_const_proj sub) pb in + if ps' == ps && pb' == pb then r + else (ps', pb') let subst_mind_body sub mib = { mind_record = Option.smartmap (subst_mind_record sub) mib.mind_record ; -- cgit v1.2.3