Skip to content

feat: pp.mdata#12606

Merged
kmill merged 1 commit intoleanprover:masterfrom
kmill:kmill_pp_mdata
Feb 24, 2026
Merged

feat: pp.mdata#12606
kmill merged 1 commit intoleanprover:masterfrom
kmill:kmill_pp_mdata

Conversation

@kmill
Copy link
Copy Markdown
Collaborator

@kmill kmill commented Feb 20, 2026

This PR adds the pretty printer option pp.mdata, which causes the pretty printer to annotate terms with any metadata that is present. For example,

set_option pp.mdata true
/-- info: [mdata noindex:true] 2 : Nat -/
#guard_msgs in #check no_index 2

The [mdata ...] e syntax is only for pretty printing.

Thanks to @Rob23oba for an initial version.

Closes #10929

This PR adds the pretty printer option `pp.mdata`, which causes the pretty printer to annotate terms with any metadata that is present. For example,
```lean
/-- info: [mdata noindex:true] 2 : Nat -/
#guard_msgs in #check no_index 2
```
The `[mdata ...] e` syntax is only for pretty printing.
@kmill kmill added the changelog-pp Pretty printing label Feb 20, 2026
@kmill kmill requested a review from nomeata February 20, 2026 10:28
@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 Feb 20, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-02-19 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-02-20 11:35:21)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 20, 2026
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Feb 20, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 20, 2026
Copy link
Copy Markdown
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.

Not an expert on delaboration, but first glance looks good, especially form a user POV.

@mathlib-lean-pr-testing mathlib-lean-pr-testing bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Feb 20, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

@kmill kmill added this pull request to the merge queue Feb 24, 2026
Merged via the queue into leanprover:master with commit cd7f55b Feb 24, 2026
32 checks passed
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-pp Pretty printing mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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.

RFC: pp.mdata

3 participants