Skip to content

Conversation

@jrr6
Copy link
Contributor

@jrr6 jrr6 commented Jun 6, 2025

This PR adds the pre-stage0-update infrastructure for named error messages. It adds macro syntax for registering and throwing named errors (without elaborators), mechanisms for displaying error names in the Infoview and at the command line, and the ability to link to error explanations in the manual (once they are added).

@jrr6 jrr6 added the changelog-no Do not include this PR in the release changelog label Jun 6, 2025
@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 Jun 6, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jun 6, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jun 6, 2025
@jrr6 jrr6 requested a review from nomeata June 6, 2025 02:49
@jrr6 jrr6 marked this pull request as ready for review June 6, 2025 02:49
@jrr6 jrr6 requested review from Vtec234 and digama0 as code owners June 6, 2025 02:49
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jun 6, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jun 6, 2025

Mathlib CI status (docs):

Copy link
Collaborator

@nomeata nomeata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need logNamedWarnig?

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jun 6, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jun 6, 2025
@jrr6 jrr6 added this pull request to the merge queue Jun 11, 2025
Merged via the queue into leanprover:master with commit 0002ea8 Jun 11, 2025
15 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Jun 18, 2025
This PR adds support for throwing named errors with associated error
explanations. In particular, it adds elaborators for the syntax defined
in #8649, which use the error-explanation infrastructure added in #8651.
This includes completions, hovers, and jump-to-definition for error
names.

Note that another stage0 rebuild will be required to define explanations
using `register_error_explanation`.

---------

Co-authored-by: Joachim Breitner <[email protected]>
Co-authored-by: Marc Huisinga <[email protected]>
algebraic-dev pushed a commit to algebraic-dev/lean4 that referenced this pull request Jun 18, 2025
This PR adds the pre-stage0-update infrastructure for named error
messages. It adds macro syntax for registering and throwing named errors
(without elaborators), mechanisms for displaying error names in the
Infoview and at the command line, and the ability to link to error
explanations in the manual (once they are added).
algebraic-dev pushed a commit to algebraic-dev/lean4 that referenced this pull request Jun 18, 2025
…prover#8730)

This PR adds support for throwing named errors with associated error
explanations. In particular, it adds elaborators for the syntax defined
in leanprover#8649, which use the error-explanation infrastructure added in leanprover#8651.
This includes completions, hovers, and jump-to-definition for error
names.

Note that another stage0 rebuild will be required to define explanations
using `register_error_explanation`.

---------

Co-authored-by: Joachim Breitner <[email protected]>
Co-authored-by: Marc Huisinga <[email protected]>
wkrozowski pushed a commit to wkrozowski/lean4 that referenced this pull request Jun 24, 2025
This PR adds the pre-stage0-update infrastructure for named error
messages. It adds macro syntax for registering and throwing named errors
(without elaborators), mechanisms for displaying error names in the
Infoview and at the command line, and the ability to link to error
explanations in the manual (once they are added).
wkrozowski pushed a commit to wkrozowski/lean4 that referenced this pull request Jun 24, 2025
…prover#8730)

This PR adds support for throwing named errors with associated error
explanations. In particular, it adds elaborators for the syntax defined
in leanprover#8649, which use the error-explanation infrastructure added in leanprover#8651.
This includes completions, hovers, and jump-to-definition for error
names.

Note that another stage0 rebuild will be required to define explanations
using `register_error_explanation`.

---------

Co-authored-by: Joachim Breitner <[email protected]>
Co-authored-by: Marc Huisinga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-no Do not include this PR in the release changelog 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.

3 participants