fix: we should not crash when `simp` loops see #3267
diff --git a/src/Lean/Meta/Tactic/Simp/Main.lean b/src/Lean/Meta/Tactic/Simp/Main.lean index 96481c1..87a52a1 100644 --- a/src/Lean/Meta/Tactic/Simp/Main.lean +++ b/src/Lean/Meta/Tactic/Simp/Main.lean
@@ -556,11 +556,12 @@ modify fun s => { s with cache := s.cache.insert e { r with dischargeDepth } } return r -partial def simpLoop (e : Expr) : SimpM Result := do +partial def simpLoop (e : Expr) : SimpM Result := withIncRecDepth do let cfg ← getConfig if (← get).numSteps > cfg.maxSteps then throwError "simp failed, maximum number of steps exceeded" else + checkSystem "simp" modify fun s => { s with numSteps := s.numSteps + 1 } match (← pre e) with | .done r => cacheResult e cfg r