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

Fixes #18163: respect "Set Printing implicit" in patterns #18176

Merged
merged 4 commits into from Oct 18, 2023

Conversation

herbelin
Copy link
Member

@herbelin herbelin commented Oct 18, 2023

Set Printing implicit/Set Printing All in patterns was actually not supported.

Fixes / closes #18163

  • Added / updated test-suite.
  • Added changelog.

@herbelin herbelin added kind: fix This fixes a bug or incorrect documentation. part: printer The printing mechanism of Coq. part: implicit arguments The implicit arguments mechanism, generalizable variables, etc. labels Oct 18, 2023
@herbelin herbelin added this to the 8.19+rc1 milestone Oct 18, 2023
@herbelin herbelin requested a review from a team as a code owner October 18, 2023 09:04
@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Oct 18, 2023
eq_sym =
fun (A : Type) (x y : A) (H : x = y) =>
match H in (_ = a) return (a = x) with
| @eq_refl _ _ => @eq_refl A x
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct with asymmetric patterns?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was surprised but apparently yes. This was a change between Coq 8.4 to 8.5 (at the time of the asymmetric change).

8.4:

  • Check fun l:list nat => match l with nil => nil | @cons _ _ _ => @nil nat end. fails
  • Check fun l:list nat => match l with nil => nil | @cons _ _ => @nil nat end. works

8.5:

  • Check fun l:list nat => match l with nil => nil | @cons _ _ _ => @nil nat end. works
  • Check fun l:list nat => match l with nil => nil | @cons _ _ => @nil nat end. fails

@herbelin herbelin added the request: full CI Use this label when you want your next push to trigger a full CI. label Oct 18, 2023
@herbelin herbelin force-pushed the master+fix18163-implicit-in-patterns branch from e24d8f7 to 02386ba Compare October 18, 2023 09:09
@coqbot-app coqbot-app bot removed request: full CI Use this label when you want your next push to trigger a full CI. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. labels Oct 18, 2023
@SkySkimmer SkySkimmer self-assigned this Oct 18, 2023
@SkySkimmer
Copy link
Contributor

@coqbot merge now

@coqbot-app coqbot-app bot merged commit 9051894 into coq:master Oct 18, 2023
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: fix This fixes a bug or incorrect documentation. part: implicit arguments The implicit arguments mechanism, generalizable variables, etc. part: printer The printing mechanism of Coq.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implicit arguments are not printed in match ... in
2 participants