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

fix: check is valid structure projection when pretty printing #4982

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Aug 11, 2024

For structure projections, the pretty printer assumed that the expression was type correct. Now it checks that the object being projected is of the correct type. Such terms appear in type mismatch errors.

Also, fixes and improves #print for structures. The types of projections now use MessageData (so are now hoverable), and the type of self is now the correct type.

Closes #4670

kmill added 2 commits August 11, 2024 09:03
For structure projections, the pretty printer assumed that the expression was type correct. Now it checks that the object being projected is of the correct type. Such terms appear in type mismatch errors.

Also, fixes and improves `#print` for structures. The types of projections now use MessageData (so are now hoverable), and the type of `self` is now the correct type.

Closes leanprover#4670
@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 Aug 11, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 4236d8a85b17fe1928613a1c300f89ace40a81f5 --onto 5f31e938c1bf5bb2d6d2d29b26ea932ade115357. (2024-08-11 16:24:25)

@kmill kmill added this pull request to the merge queue Aug 12, 2024
Merged via the queue into leanprover:master with commit 7cd406f Aug 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

[minor] incorrectly printed terms with type mismatch
2 participants