aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorVincent Laporte2020-08-11 10:05:11 +0200
committerVincent Laporte2020-08-11 10:05:11 +0200
commit83ca3cb2e715b66e04987048ed6e4af1f7400d89 (patch)
treed72605fc24eb7ba1287f11d7123fe8e3fe5bd6c6 /plugins
parentd5a8bdc8f67b691dd39a27a9fe07a026d998fda3 (diff)
parent4da8f114155d2abb31ce8a45a2f17f21f7d97a0e (diff)
Merge PR #12814: [zify] fix for bug#12791
Reviewed-by: vbgl
Diffstat (limited to 'plugins')
-rw-r--r--plugins/micromega/zify.ml11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/micromega/zify.ml b/plugins/micromega/zify.ml
index 4e1f9a66ac..fa29e6080e 100644
--- a/plugins/micromega/zify.ml
+++ b/plugins/micromega/zify.ml
@@ -1324,9 +1324,14 @@ let do_let tac (h : Constr.named_declaration) =
let env = Tacmach.New.pf_env gl in
let evd = Tacmach.New.project gl in
try
- ignore (get_injection env evd (EConstr.of_constr ty));
- tac id.Context.binder_name (EConstr.of_constr t)
- (EConstr.of_constr ty)
+ let x = id.Context.binder_name in
+ ignore
+ (let eq = Lazy.force eq in
+ find_option
+ (match_operator env evd eq
+ [|EConstr.of_constr ty; EConstr.mkVar x; EConstr.of_constr t|])
+ (HConstr.find_all eq !table_cache));
+ tac x (EConstr.of_constr t) (EConstr.of_constr ty)
with Not_found -> Tacticals.New.tclIDTAC)
let iter_let_aux tac =