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

Adapt to Coq PR #18445, that fixes an issue with multiple signatures of implicit arguments for notations #137

Conversation

herbelin
Copy link
Contributor

@herbelin herbelin commented Jan 4, 2024

PR coq/coq#18445 implements the (originally intended) behaviour for selecting maximal implicit arguments of a notation for an applied constant in the presence of multiple signatures of implicit arguments. Such notation now behaves like ordinary constants or abbreviations for non applied constants, that is, they complete the application with as much implicit arguments as possible.

This impacts the notation "naturality[ x ] := (@naturality _ _ _ _ x)" which comes with 3 different signatures of implicit arguments. It is now resolved by default with 3 trailing implicit arguments, making tactics such as a srewrite (naturality[unit]) later failing with unresolved arguments (e.g. in Adjunction/Hom.v).

It happens that the naturality constant is mostly used in practice with only one signature of implicit arguments. So, the proposed adaptation is to restrict naturality to only this signature.

This is of course not the only way to adapt to coq/coq#18445. Another approach would be e.g. to use e-tactics so that srewrite accepts to leave unresolved the added implicit arguments.

In any cases, the PR is backwards-compatible and can be merged as soon as now.

…s for notations.

The new (originally intended) behaviour for selecting maximal implicit
arguments of a notation for an applied constant in the presence of
multiple signatures of implicit arguments. Such notations now behave
like ordinary constants or abbreviations for non applied constants,
that is, they complete the application with as much implicit arguments
as possible.

This impacts the notation "naturality[ x ] := (@Naturality _ _ _ _ x)"
which is now resolved with 3 trailing implicit arguments, making
tactics such as a "srewrite (naturality[foo])" failing with unresolved
arguments.

It happens that the "naturality" constant mostly uses one signature of
implicit arguments. So, the adaptation is to restrict "naturality" to
only this signature.
@proux01
Copy link
Contributor

proux01 commented Jan 9, 2024

@jwiegley could this be merged please? We need it in order to merge coq/coq#18445 in Coq.

@jwiegley jwiegley merged commit e50af05 into jwiegley:master Jan 9, 2024
6 checks passed
@jwiegley
Copy link
Owner

jwiegley commented Jan 9, 2024

@proux01 Thank you for the ping, I somehow missed this notification e-mail last week.

@proux01
Copy link
Contributor

proux01 commented Jan 10, 2024

No worries, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants