@@ -3896,24 +3896,24 @@ fold_left over the terms, letin body comes before the type).
38963896 (fun proof _ shelved ~depth proof_context constraints state ->
38973897 let env = proof_context .env in
38983898 let sigma = get_sigma state in
3899- let evars_of_term evd c =
3900- let rec evrec (acc_set ,acc_rev_l as acc ) c =
3901- let c = EConstr. whd_evar evd c in
3899+ let evars_of_term c =
3900+ let rec evrec env (acc_set ,acc_rev_l as acc ) c =
39023901 match EConstr. kind sigma c with
39033902 | Constr. Evar (n , l ) ->
3904- if Evar.Set. mem n acc_set then acc
3903+ if Evar.Set. mem n acc_set then
3904+ acc
39053905 else
39063906 let acc = Evar.Set. add n acc_set , n :: acc_rev_l in
3907- SList.Skip. fold evrec acc l
3907+ SList.Skip. fold ( evrec env ) acc l
39083908 | Constr. Proj (_ , _ , c ) ->
39093909 let t = Retyping. get_type_of env sigma c in
3910- let acc = evrec acc t in
3911- evrec acc c
3912- | _ -> EConstr. fold sigma evrec acc c
3910+ let acc = evrec env acc t in
3911+ evrec env acc c
3912+ | _ -> Termops. fold_constr_with_full_binders env sigma EConstr. push_rel evrec env acc c
39133913 in
3914- let _ , rev_l = evrec (Evar.Set. empty , [] ) c in
3914+ let _ , rev_l = evrec env (Evar.Set. empty , [] ) c in
39153915 List. rev rev_l in
3916- let subgoals = evars_of_term sigma proof in
3916+ let subgoals = evars_of_term proof in
39173917 let free_evars =
39183918 let cache = Evarutil. create_undefined_evars_cache () in
39193919 let map ev =
0 commit comments