aboutsummaryrefslogtreecommitdiff
path: root/plugins/funind/gen_principle.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-02-07 15:21:32 +0100
committerGaëtan Gilbert2020-02-07 15:21:32 +0100
commitaaea20533a92787a4b445fca01d0d90a2b59cce1 (patch)
treea5987b56a9488413f66d7fd38cb5902ea0b0f11f /plugins/funind/gen_principle.ml
parent51c0b1414be9a46e221b13f652474db0194093fc (diff)
various unsafe_type_of -> type_of_variable in funind
This is the easy part of removing unsafe_type_of, as type_of_variable doesn't return (or even take as argument) an evar map.
Diffstat (limited to 'plugins/funind/gen_principle.ml')
-rw-r--r--plugins/funind/gen_principle.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/funind/gen_principle.ml b/plugins/funind/gen_principle.ml
index 58efee1518..8def5c60ba 100644
--- a/plugins/funind/gen_principle.ml
+++ b/plugins/funind/gen_principle.ml
@@ -617,7 +617,7 @@ let prove_fun_correct evd funs_constr graphs_constr schemes lemmas_types_infos i
let constructor_args g =
List.fold_right
(fun hid acc ->
- let type_of_hid = pf_unsafe_type_of g (mkVar hid) in
+ let type_of_hid = pf_get_hyp_typ g hid in
let sigma = project g in
match EConstr.kind sigma type_of_hid with
| Prod(_,_,t') ->
@@ -953,7 +953,7 @@ let rec reflexivity_with_destruct_cases g =
match sc with
None -> tclIDTAC g
| Some id ->
- match EConstr.kind (project g) (pf_unsafe_type_of g (mkVar id)) with
+ match EConstr.kind (project g) (pf_get_hyp_typ g id) with
| App(eq,[|_;t1;t2|]) when EConstr.eq_constr (project g) eq eq_ind ->
if Equality.discriminable (pf_env g) (project g) t1 t2
then Proofview.V82.of_tactic (Equality.discrHyp id) g