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

feat: recommended_spelling command #6869

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

TwoFX
Copy link
Member

@TwoFX TwoFX commented Jan 30, 2025

This PR adds a recommended_spelling command, which can be used for recording the recommended spelling of a notation (for example, that the recommended spelling of in identifiers is and). This information is then appended to the relevant docstrings for easy lookup.

The function Lean.Elab.Term.Doc.allRecommendedSpellings may be used to obtain a list of all recommended spellings, for example to create a table that is part of a style guide. In the future, it might be desirable to be able to partition such a table into smaller tables by category. This can be added in a future PR.

The implementation is heavily inspired by #4490.

@TwoFX TwoFX added changelog-language Language features, tactics, and metaprograms needs-update-stage0 stage 0 should be updated after merging this PR labels Jan 30, 2025
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 30, 2025 15:37 Inactive
@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 Jan 30, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 30, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 30, 2025
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jan 30, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 30, 2025

Mathlib CI status (docs):

@TwoFX TwoFX added the will-merge-soon …unless someone speaks up label Jan 31, 2025
src/Lean/Parser/Term/Doc.lean Outdated Show resolved Hide resolved
src/Lean/Parser/Command.lean Outdated Show resolved Hide resolved
src/Lean/Parser/Command.lean Outdated Show resolved Hide resolved
src/Lean/Parser/Command.lean Show resolved Hide resolved
src/Lean/Parser/Command.lean Show resolved Hide resolved
src/Lean/Parser/Command.lean Show resolved Hide resolved
src/Lean/Parser/Command.lean Outdated Show resolved Hide resolved
tests/lean/run/recommendedSpelling.lean Outdated Show resolved Hide resolved
src/Lean/Parser/Term/Doc.lean Outdated Show resolved Hide resolved
@david-christiansen
Copy link
Contributor

I look forward to mining this table for the reference manual! It'll be very useful.

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 31, 2025 14:30 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 31, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 31, 2025
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc February 1, 2025 07:31 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Feb 1, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Feb 1, 2025
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-language Language features, tactics, and metaprograms needs-update-stage0 stage 0 should be updated after merging this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN will-merge-soon …unless someone speaks up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants