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: remove unused try catch #3794

Merged
merged 1 commit into from
Mar 28, 2024
Merged
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
26 changes: 10 additions & 16 deletions src/Lean/Meta/Tactic/Rewrites.lean
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,16 @@ private def addImport (name : Name) (constInfo : ConstantInfo) :
match name with
| .str _ n => if n.endsWith "_inj" ∨ n.endsWith "_inj'" then return #[]
| _ => pure ()
try
withNewMCtxDepth do withReducible do
forallTelescopeReducing constInfo.type fun _ type => do
match type.getAppFnArgs with
| (``Eq, #[_, lhs, rhs])
| (``Iff, #[lhs, rhs]) => do
let a := Array.mkEmpty 2
let a := a.push (← InitEntry.fromExpr lhs (name, RwDirection.forward))
let a := a.push (← InitEntry.fromExpr rhs (name, RwDirection.backward))
pure a
| _ => return #[]
catch _e =>
throwError "Jhx. Timeout initializing entries"
-- if e.isMaxHeartbeat then
-- else
-- throw e
withNewMCtxDepth do withReducible do
forallTelescopeReducing constInfo.type fun _ type => do
match type.getAppFnArgs with
| (``Eq, #[_, lhs, rhs])
| (``Iff, #[lhs, rhs]) => do
let a := Array.mkEmpty 2
let a := a.push (← InitEntry.fromExpr lhs (name, RwDirection.forward))
let a := a.push (← InitEntry.fromExpr rhs (name, RwDirection.backward))
pure a
| _ => return #[]

/-- Configuration for `DiscrTree`. -/
def discrTreeConfig : WhnfCoreConfig := {}
Expand Down
Loading