Skip to content

Commit 1314af5

Browse files
committed
perf: optimize monadLift
1 parent 2fd99ce commit 1314af5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Lean/Elab/Command.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ instance : MonadLift CoreM CommandElabM where
131131
monadLift x := private do
132132
let ds ← getThe DerivedState
133133
let (a, coreS) ← x.run ds.coreCtx ds.coreState
134-
modify fun s => s.updateCore coreS
134+
set { ds with toState := ds.toState.updateCore coreS, coreState := coreS }
135135
return a
136136

137137
protected nonrec def CommandElabM.run (ctx : Context) (s : State) (x : CommandElabM α) : EIO Exception (α × State) := do

0 commit comments

Comments
 (0)