refactor: do not save/restore cache at withNewMCtxDepth
This commit is contained in:
parent
770649ce1d
commit
798001af75
1 changed files with 1 additions and 2 deletions
|
|
@ -709,10 +709,9 @@ do fvarId ← mkFreshId;
|
|||
and restore saved data. -/
|
||||
@[inline] def withNewMCtxDepth {α} (x : MetaM α) : MetaM α :=
|
||||
do s ← get;
|
||||
let savedCache := s.cache;
|
||||
let savedMCtx := s.mctx;
|
||||
modify $ fun s => { mctx := s.mctx.incDepth, .. s };
|
||||
finally x (modify $ fun s => { cache := savedCache, mctx := savedMCtx, .. s })
|
||||
finally x (modify $ fun s => { mctx := savedMCtx, .. s })
|
||||
|
||||
/--
|
||||
Execute `x` using the given metavariable `LocalContext` and `LocalInstances`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue