Skip to content

feat: add internal skip do-element parser#13413

Merged
sgraf812 merged 1 commit into
masterfrom
sg/do-skip-parser
Apr 15, 2026
Merged

feat: add internal skip do-element parser#13413
sgraf812 merged 1 commit into
masterfrom
sg/do-skip-parser

Conversation

@sgraf812
Copy link
Copy Markdown
Contributor

This PR adds an internal skip syntax for do blocks, intended for use by the if and unless elaborators to replace pure PUnit.unit in implicit else branches. This gives the elaborator a dedicated syntax node to attach better error messages and location info to, rather than synthesizing pure PUnit.unit which leaks internal details into user-facing errors.

Includes a stage0 trigger comment so that the new parser is available during bootstrapping.

@sgraf812 sgraf812 added the changelog-language Language features and metaprograms label Apr 15, 2026
This PR adds an internal `skip` syntax for do blocks, intended for use by the `if` and `unless` elaborators to replace `pure PUnit.unit` in implicit else branches. This gives the elaborator a dedicated syntax node to attach better error messages and location info to, rather than synthesizing `pure PUnit.unit` which leaks internal details into user-facing errors.

Co-Authored-By: Rob23oba <robin.arnez@web.de>
@sgraf812 sgraf812 force-pushed the sg/do-skip-parser branch from c822f53 to af390f8 Compare April 15, 2026 09:30
@sgraf812 sgraf812 enabled auto-merge April 15, 2026 09:30
@sgraf812 sgraf812 added this pull request to the merge queue Apr 15, 2026
Merged via the queue into master with commit 748783a Apr 15, 2026
17 checks passed
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Apr 15, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase df23b79c9014259602832fd2a5acba357e713f9c --onto d76e5a1886956bb38dc6bd2868260550dc66c309. You can force Mathlib CI using the force-mathlib-ci label. (2026-04-15 10:57:53)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase df23b79c9014259602832fd2a5acba357e713f9c --onto 861bc19e0c1c45b5766cc5c9ef0488568368b236. You can force reference manual CI using the force-manual-ci label. (2026-04-15 10:57:55)

@sgraf812 sgraf812 deleted the sg/do-skip-parser branch April 15, 2026 10:58
volodeyka pushed a commit that referenced this pull request Apr 16, 2026
This PR adds an internal `skip` syntax for do blocks, intended for use
by the `if` and `unless` elaborators to replace `pure PUnit.unit` in
implicit else branches. This gives the elaborator a dedicated syntax
node to attach better error messages and location info to, rather than
synthesizing `pure PUnit.unit` which leaks internal details into
user-facing errors.

Includes a stage0 trigger comment so that the new parser is available
during bootstrapping.

Co-authored-by: Rob23oba <robin.arnez@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-language Language features and metaprograms toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants