@@ -3418,12 +3418,19 @@ let drop_nparams_from_ctx n ctx =
34183418let ideclc = E.Constants. declare_global_symbol " indt-decl"
34193419let uideclc = E.Constants. declare_global_symbol " upoly-indt-decl"
34203420
3421+
3422+ [%% if coq = " 8.20" || coq = " 9.0" || coq = " 9.1" ]
3423+ let mind_record (mib ,_ ) = mib.Declarations. mind_record
3424+ [%% else ]
3425+ let mind_record (_ ,mip ) = mip.Declarations. mind_record
3426+ [%% endif]
3427+
34213428let inductive_decl2lp ~depth coq_ctx constraints state (mutind ,uinst ,(mind ,ind ),(i_impls ,k_impls )) =
34223429 let { Declarations. mind_params_ctxt;
34233430 mind_finite = kind;
34243431 mind_nparams = allparamsno;
34253432 mind_nparams_rec = paramsno;
3426- mind_record } = mind in
3433+ } = mind in
34273434 let ntyps = Array. length mind.mind_packets in
34283435 let mind_params_ctxt = Vars. subst_instance_context uinst mind_params_ctxt in
34293436 let allparams = List. map EConstr. of_rel_decl mind_params_ctxt in
@@ -3432,7 +3439,9 @@ let inductive_decl2lp ~depth coq_ctx constraints state (mutind,uinst,(mind,ind),
34323439 let nuparams, params = CList. chop nuparamsno allparams in
34333440 let { Declarations. mind_consnames = constructor_names;
34343441 mind_typename = id;
3435- mind_nf_lc = constructor_types } = ind in
3442+ mind_nf_lc = constructor_types;
3443+ } = ind in
3444+ let mind_record = mind_record (mind,ind) in
34363445 let constructor_types = constructor_types |> Array. map (fun (ctx ,ty ) -> Vars. subst_instance_context uinst ctx, Vars. subst_instance_constr uinst ty) in
34373446 let arity_w_params = Inductive. type_of_inductive ((mind,ind),uinst) in
34383447 let sigma = get_sigma state in
0 commit comments