Skip to content

Commit

Permalink
perf: inline checkInterrupted
Browse files Browse the repository at this point in the history
Amazingly, the extra result allocation seems to have triggered a mathlib
heartbeat timeout
  • Loading branch information
Kha committed Oct 26, 2023
1 parent d3bc2ac commit 9874848
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lean/CoreM.lean
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ instance [MetaEval α] : MetaEval (CoreM α) where
protected def withIncRecDepth [Monad m] [MonadControlT CoreM m] (x : m α) : m α :=
controlAt CoreM fun runInBase => withIncRecDepth (runInBase x)

def checkInterrupted : CoreM Unit := do
@[inline] def checkInterrupted : CoreM Unit := do
if (← IO.checkCanceled) then
-- should never be visible to users!
throw <| Exception.error .missing "elaboration interrupted"
Expand Down

0 comments on commit 9874848

Please sign in to comment.