aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorMatthieu Sozeau2014-06-26 13:25:18 +0200
committerMatthieu Sozeau2014-06-26 13:25:18 +0200
commitb443e5ce3ea09d82574b0a3196041737f0a5dcc7 (patch)
tree0569f118991da38c6b9cbc45612415068e33ed0b /tactics
parent34570d23cf6ae7f6246b38e5094454b0eeea3e75 (diff)
Properly refresh the local hintdb database in case an external tactic changed
the hypotheses in eauto.
Diffstat (limited to 'tactics')
-rw-r--r--tactics/eauto.ml416
1 files changed, 12 insertions, 4 deletions
diff --git a/tactics/eauto.ml4 b/tactics/eauto.ml4
index 98e7d3ff5f..0e9d3dcdc8 100644
--- a/tactics/eauto.ml4
+++ b/tactics/eauto.ml4
@@ -282,10 +282,18 @@ module SearchProblem = struct
{ depth = s.depth; tacres = res; last_tactic = pp; prev = ps;
dblist = s.dblist; localdb = List.tl s.localdb }
else
- { depth = pred s.depth; tacres = res;
- dblist = s.dblist; last_tactic = pp; prev = ps;
- localdb =
- List.addn (nbgl'-nbgl) (List.hd s.localdb) s.localdb })
+ let newlocal =
+ let hyps = pf_hyps g in
+ List.map (fun gl ->
+ let gls = {Evd.it = gl; sigma = lgls.Evd.sigma } in
+ let hyps' = pf_hyps gls in
+ if hyps' == hyps then List.hd s.localdb
+ else make_local_hint_db ~ts:full_transparent_state true [] gls)
+ (List.firstn ((nbgl'-nbgl) + 1) (sig_it lgls))
+ in
+ { depth = pred s.depth; tacres = res;
+ dblist = s.dblist; last_tactic = pp; prev = ps;
+ localdb = newlocal @ List.tl s.localdb })
l
in
List.sort compare (assumption_tacs @ intro_tac @ rec_tacs)