@@ -758,10 +758,9 @@ and translate_fix order evd env t =
758
758
let (ind, u), ind_args = Inductiveops. find_inductive env ! evd typ in
759
759
let nparams = Inductiveops. inductive_nparams env ind in
760
760
let _, realargs = List. chop nparams ind_args in
761
- let erealargs = List. map of_constr realargs in
762
761
List. iteri (fun i x ->
763
- debug [`Fix ] (Printf. sprintf " realargs.(%d) = " i) env ! evd x) erealargs ;
764
- List. for_all (fun x -> List. mem x args) erealargs
762
+ debug [`Fix ] (Printf. sprintf " realargs.(%d) = " i) env ! evd x) realargs ;
763
+ List. for_all (fun x -> List. mem x args) realargs
765
764
766
765
and process_case env depth (fun_args : constr list ) case =
767
766
@@ -781,16 +780,15 @@ and translate_fix order evd env t =
781
780
in
782
781
let i_params, i_realargs = List. chop i_nparams params_args in
783
782
debug_string [`Fix ] " make inductive family ..." ;
784
- let ind_fam = Inductiveops. make_ind_family ((ind, EInstance. kind ! evd u), i_params) in
783
+ let ind_fam = Inductiveops. make_ind_family ((ind, u), i_params) in
785
784
debug_string [`Fix ] " get_constructors" ;
786
785
let constructors = Inductiveops. get_constructors env ind_fam in
787
786
debug_string [`Fix ] " done" ;
788
787
789
788
assert (List. length i_realargs = i_nargs);
790
- let ei_realargs = List. map of_constr i_realargs in
791
789
let fun_args_i =
792
790
List. map (fun x -> if x = c then mkRel 1
793
- else if List. mem x ei_realargs then mkRel (2 + i_nargs - (List. index (= ) x ei_realargs ))
791
+ else if List. mem x i_realargs then mkRel (2 + i_nargs - (List. index (= ) x i_realargs ))
794
792
else lift (i_nargs + 1 ) x) fun_args
795
793
in
796
794
let theta = inst_args (depth + i_nargs + 1 ) fun_args_i in
@@ -815,11 +813,10 @@ and translate_fix order evd env t =
815
813
else begin
816
814
Array. mapi (fun i b ->
817
815
let (cstr, u) as cstru = constructors.(i).Inductiveops. cs_cstr in
818
- let pcstr = mkConstructU (cstr, EInstance. make u) in
816
+ let pcstr = mkConstructU (cstr, u) in
819
817
let nrealdecls = Inductiveops. constructor_nrealdecls env cstr in
820
818
let realdecls, b = decompose_lambda_n_decls ! evd nrealdecls b in
821
- let ei_params = List. map of_constr i_params in
822
- let lifted_i_params = List. map (lift nrealdecls) ei_params in
819
+ let lifted_i_params = List. map (lift nrealdecls) i_params in
823
820
let instr_cstr =
824
821
mkApp (pcstr,
825
822
Array. of_list
@@ -830,11 +827,11 @@ and translate_fix order evd env t =
830
827
assert (Array. length concls = i_nargs);
831
828
let fun_args =
832
829
List. map (fun x -> if x = c then instr_cstr
833
- else if List. mem x ei_realargs then (of_constr @@ concls.(i_nargs - (List. index (= ) x ei_realargs) ))
830
+ else if List. mem x i_realargs then concls.(i_nargs - (List. index (= ) x i_realargs ))
834
831
else lift nrealdecls x) fun_args
835
832
in
836
833
let realdecls_R = translate_rel_context order evd env realdecls in
837
- let sub = instr_cstr::(List. map of_constr @@ List. rev (Array. to_list concls)) in
834
+ let sub = instr_cstr::(List. rev (Array. to_list concls)) in
838
835
let typ = substl sub typ in
839
836
(* FIXME : translate twice here :*)
840
837
let typ_R = relation order evd env_lams typ in
0 commit comments