Skip to content

chore: adaptations for lean4#12459#129

Closed
sgraf812 wants to merge 1 commit intoleanprover-community:masterfrom
sgraf812:lean-pr-testing-12459
Closed

chore: adaptations for lean4#12459#129
sgraf812 wants to merge 1 commit intoleanprover-community:masterfrom
sgraf812:lean-pr-testing-12459

Conversation

@sgraf812
Copy link

@sgraf812 sgraf812 commented Feb 21, 2026

Summary

  • Updates lean-toolchain for testing lean4#12459 (new do elaborator)
  • Adapts Qq/Match.lean for the new doLetElse syntax which now includes an optional body as part of its syntax
  • Fixes a bug where the do elaborator's expansion of doLetElse would default the body to pure PUnit.unit when none was provided, causing type mismatches in mixed Qq patterns (e.g., (2, ~q(1)), ⟨~q(Nat), ~q($n)⟩)
  • The fix builds nested doLetElse structures (from inside out) so that every let pat := rhs | alt always has an explicit body

Test plan

  • lake build passes (all modules including QqTest.matching)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kim-em
Copy link
Collaborator

kim-em commented Feb 22, 2026

Merged into nightly-testing. Thanks!

@kim-em kim-em closed this Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants