chore(library/tactic/change_tactic): use type_context instead of metavar_context
This commit is contained in:
parent
6bf20a980d
commit
ec141d1671
1 changed files with 3 additions and 3 deletions
|
|
@ -18,9 +18,8 @@ vm_obj change_core(expr const & e, bool check, tactic_state const & s) {
|
|||
if (e == g->get_type()) return tactic::mk_success(s);
|
||||
type_context ctx = mk_type_context_for(s);
|
||||
if (!check || ctx.is_def_eq(e, g->get_type())) {
|
||||
auto mctx = ctx.mctx();
|
||||
expr new_e = mctx.instantiate_mvars(e);
|
||||
expr new_M = mctx.mk_metavar_decl(g->get_context(), new_e);
|
||||
expr new_e = ctx.instantiate_mvars(e);
|
||||
expr new_M = ctx.mk_metavar_decl(g->get_context(), new_e);
|
||||
/*
|
||||
We use the proof term
|
||||
|
||||
|
|
@ -29,6 +28,7 @@ vm_obj change_core(expr const & e, bool check, tactic_state const & s) {
|
|||
to create a "checkpoint". See discussion at issue #1260
|
||||
*/
|
||||
expr pr = mk_id(ctx, g->get_type(), new_M);
|
||||
auto mctx = ctx.mctx();
|
||||
mctx.assign(head(s.goals()), pr);
|
||||
list<expr> new_gs(new_M, tail(s.goals()));
|
||||
return tactic::mk_success(set_mctx_goals(s, mctx, new_gs));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue