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: respect explicitly inaccessible pattern variables #6558

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cppio
Copy link
Contributor

@cppio cppio commented Jan 7, 2025

This PR changes the matcher elaboration to keep explicit inaccessible pattern variables inaccessible.

Closes #6557

@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 7, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 7, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 7, 2025
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Jan 7, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 7, 2025

Mathlib CI status (docs):

@kim-em
Copy link
Collaborator

kim-em commented Jan 8, 2025

@cppio, you can write a comment like changelog-language to set the changelog labels, thereby satisfying the CI failure.

kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2025
@kim-em
Copy link
Collaborator

kim-em commented Jan 8, 2025

I pushed the required Mathlib fixes to the lean-pr-testing-6558 branch of Mathlib, and hopefully we'll now get a builds-mathlib label.

It's great when PR authors can do this step themselves too (ask me on zulip if you need write access to Mathlib branches), but also don't hesitate to ask me for help when breaks-mathlib labels appear.

@cppio cppio marked this pull request as draft January 8, 2025 03:12
@cppio
Copy link
Contributor Author

cppio commented Jan 8, 2025

changelog-language

@github-actions github-actions bot added the changelog-language Language features, tactics, and metaprograms label Jan 8, 2025
@cppio cppio marked this pull request as ready for review January 8, 2025 04:10
@cppio
Copy link
Contributor Author

cppio commented Jan 8, 2025

The mathlib test failure occurs due to it relying on #6570. The following change fixes the test, but I lack the access to push it.

 def walk.map (f : α → β) (w : walk α x y) : walk β (f x) (f y) :=
-  match x, y, w with
-  | _, _, .nil n => .nil (f n)
+  match w with
+  | nil x => nil (f x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan changelog-language Language features, tactics, 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.

pattern matching ignores inaccessibility annotation
3 participants