@@ -1057,41 +1057,6 @@ let rec translate_mind_body name order evdr env kn b inst =
10571057 debug_string [`Inductive ] " computing envs ..." ;
10581058 debug_env [`Inductive ] " translate_mind, env = \n " env ! evdr;
10591059 debug_evar_map [`Inductive ] " translate_mind, evd = \n " env ! evdr;
1060- let univs_ctx, b =
1061- let ctx = match b.mind_universes, b.mind_record with
1062- | Monomorphic (ctx , _ ), NotRecord -> ctx
1063- | _ -> Univ.LSet. empty in
1064- let ctx, subst, _ = Univ.LSet. fold (fun u ((s , c ), m , i ) ->
1065- debug_string [`Inductive ] (" u = " ^ Univ.Level. to_string u);
1066- let u' = UnivGen. fresh_level () in
1067- debug_string [`Inductive ] (" u' = " ^ Univ.Level. to_string u');
1068- (Univ.LSet. add u' s, Univ.Constraint. add (u', Le , u) c),
1069- Univ.LMap. add u u' m, i + 1 )
1070- ctx
1071- Univ. ((LSet. empty, Constraint. empty), LMap. empty, 0 ) in
1072- let packets =
1073- Array. map (fun p ->
1074- let arity = match p.mind_arity with
1075- | RegularArity a ->
1076- let ar = of_constr a.mind_user_arity in
1077- let ar = to_constr ! evdr (subst_univs_level_constr subst ar) in
1078- let so = EConstr. mkSort a.mind_sort in
1079- debug Debug. all " sort = " env ! evdr so;
1080- let so = to_constr ! evdr (subst_univs_level_constr subst so) in
1081- let so = Constr. destSort so in
1082- RegularArity { mind_user_arity = ar; mind_sort = so }
1083- | TemplateArity a ->
1084- let u = Univ. subst_univs_level_universe subst a.template_level in
1085- TemplateArity { template_level = u } in
1086- { p with mind_arity = arity })
1087- b.mind_packets in
1088- let params =
1089- List. map (fun c ->
1090- let x, def, typ = fromDecl c in
1091- let typ = subst_univs_level_constr subst (of_constr typ) in
1092- toCDecl (x, def, to_constr ! evdr typ))
1093- b.mind_params_ctxt in
1094- ctx, { b with mind_packets = packets ; mind_params_ctxt = params } in
10951060 let envs =
10961061 let params = subst_instance_context inst b.mind_params_ctxt in
10971062 let env_params = push_rel_context (List. map of_rel_decl params) env in
@@ -1123,7 +1088,7 @@ let rec translate_mind_body name order evdr env kn b inst =
11231088 in
11241089 debug_evar_map [`Inductive ] " translate_mind, evd = \n " env ! evdr;
11251090 let univs = match b.mind_universes with
1126- | Monomorphic _ -> Monomorphic_entry univs_ctx
1091+ | Monomorphic ctx -> Monomorphic_entry ctx
11271092 | Polymorphic _ -> Evd. univ_entry ~poly: true ! evdr in
11281093 let res = {
11291094 mind_entry_record = None ;
0 commit comments