Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add checkSystem and withIncRecDepth to withAutoBoundImplicit #4128

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Lean/Elab/Term.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,8 @@ partial def withAutoBoundImplicit (k : TermElabM α) : TermElabM α := do
let flag := autoImplicit.get (← getOptions)
if flag then
withReader (fun ctx => { ctx with autoBoundImplicit := flag, autoBoundImplicits := {} }) do
let rec loop (s : SavedState) : TermElabM α := do
let rec loop (s : SavedState) : TermElabM α := withIncRecDepth do
checkSystem "auto-implicit"
try
k
catch
Expand Down
1 change: 1 addition & 0 deletions tests/lean/4117.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
structure D:=(t:A)(c N:={s with} 0
1 change: 1 addition & 0 deletions tests/lean/4117.lean.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4117.lean:2:0: error: unexpected end of input; expected ')'
4 changes: 2 additions & 2 deletions tests/lean/run/simpDiag.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ info: [simp] used theorems (max: 1201, num: 3):
Nat.reduceAdd (builtin simproc) ↦ 771
ack.eq_1 ↦ 768[simp] tried theorems (max: 1974, num: 2):
ack.eq_3 ↦ 1974, succeeded: 1201
ack.eq_1 ↦ 768[simp] tried theorems (max: 1973, num: 2):
ack.eq_3 ↦ 1973, succeeded: 1201
ack.eq_1 ↦ 768, succeeded: 768use `set_option diagnostics.threshold <num>` to control threshold for reporting counters
---
Expand Down
Loading