aboutsummaryrefslogtreecommitdiff
path: root/kernel/declareops.ml
diff options
context:
space:
mode:
authorMatthieu Sozeau2014-10-11 12:11:07 +0200
committerMatthieu Sozeau2014-10-11 12:15:49 +0200
commitd4b3de96f524887013c0955bd5b90f0311f086e6 (patch)
treeea87e31c9c4681911c9dede29de2d1b51a86deec /kernel/declareops.ml
parentd65496f09c4b68fa318783e53f9cd6d5c18e1eb7 (diff)
Revert d0cd27e209be08ee51a2d609157367f053438a10: giving a different name
for the record binder of classes. This name is no longer generated in the kernel but part of the declaration. Also cleanup the interface to recognize primitive records based on an option type instead of a dynamic check of the length of an array.
Diffstat (limited to 'kernel/declareops.ml')
-rw-r--r--kernel/declareops.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/declareops.ml b/kernel/declareops.ml
index 5b937207fd..51e435d796 100644
--- a/kernel/declareops.ml
+++ b/kernel/declareops.ml
@@ -237,14 +237,14 @@ 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 (ps, pb as r) =
+let subst_mind_record sub (id, ps, pb as r) =
let ps' = Array.smartmap (subst_constant sub) ps in
let pb' = Array.smartmap (subst_const_proj sub) pb in
if ps' == ps && pb' == pb then r
- else (ps', pb')
+ else (id, ps', pb')
let subst_mind_body sub mib =
- { mind_record = Option.smartmap (subst_mind_record sub) mib.mind_record ;
+ { mind_record = Option.smartmap (Option.smartmap (subst_mind_record sub)) mib.mind_record ;
mind_finite = mib.mind_finite ;
mind_ntypes = mib.mind_ntypes ;
mind_hyps = (match mib.mind_hyps with [] -> [] | _ -> assert false);