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

Adding a delimiter for opening a scope only temporarily #14928

Merged
merged 6 commits into from Nov 10, 2023

Conversation

herbelin
Copy link
Member

@herbelin herbelin commented Sep 24, 2021

Kind: feature

Fixes #11486
Fixes #12157
Fixes #14305

Reopening of #9123.

This adds a syntax term%_scope to tell to activate scope scope only for the immediate subterm. This allows for instance to define notations which activate type_scope only temporarily as in:

Notation "{ x  |  P }" := (sig (fun x => P%_type)) : type_scope.
Check fun P Q => { x : nat & P x * Q x }.

Note: We may want this to apply also to Arguments. Unfortunately, in Arguments, % has already the meaning of this new %_ so we add %_ as a synonym of % there and deprecate %. In a few versions we will make % in Arguments error and in the following version give it the same semantics as in terms.

  • Added / updated test-suite
  • Corresponding documentation was added / updated (including any warning and error messages added / removed / modified).
  • Entry added in CHANGES.md.
  • updated make doc_gram_rsts

Overlays to be merged before the PR

Overlays to be merged in sync with the PR

@herbelin herbelin added kind: feature New user-facing feature request or implementation. part: notations The notation system. labels Sep 24, 2021
@herbelin herbelin added this to the 8.15+rc1 milestone Sep 24, 2021
@proux01
Copy link
Contributor

proux01 commented Sep 24, 2021

@herbelin is the above text of the PR still current? it doesn't seem to reflect the state of the discussion in #9123

@proux01
Copy link
Contributor

proux01 commented Sep 24, 2021

@ejgallego do you still want to assign this one? Otherwise, I'll assign to myself.

@herbelin herbelin changed the title Master+tmp scope delimiter Adding a delimiter for opening a scope only temporarily + applications to notations for ex/sig/sigT Sep 24, 2021
@herbelin
Copy link
Member Author

@proux01 : title was wrong. I fixed it. The PR needs maturation. Without time to work currently on it, I moved it to draft.

@coqbot-app
Copy link
Contributor

coqbot-app bot commented Sep 24, 2021

The job library:ci-fiat_crypto_legacy has failed in allow failure mode
ping @JasonGross

@github-actions github-actions bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Oct 9, 2021
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Nov 8, 2021

The "needs: rebase" label was set more than 30 days ago. If the PR is not rebased in 30 days, it will be automatically closed.

@coqbot-app coqbot-app bot added the stale This PR will be closed unless it is rebased. label Nov 8, 2021
@coqbot-app coqbot-app bot removed needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. stale This PR will be closed unless it is rebased. labels Nov 8, 2021
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Nov 8, 2021

The job library:ci-fiat_crypto_legacy has failed in allow failure mode
ping @JasonGross

@SkySkimmer SkySkimmer added the needs: fixing The proposed code change is broken. label Nov 8, 2021
@SkySkimmer SkySkimmer removed this from the 8.15+rc1 milestone Nov 8, 2021
@github-actions github-actions bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Nov 11, 2021
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Dec 14, 2021

The "needs: rebase" label was set more than 30 days ago. If the PR is not rebased in 30 days, it will be automatically closed.

@coqbot-app coqbot-app bot added the stale This PR will be closed unless it is rebased. label Dec 14, 2021
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Jan 13, 2022

This PR was not rebased after 30 days despite the warning, it is now closed.

@coqbot-app coqbot-app bot closed this Jan 13, 2022
@proux01 proux01 reopened this Oct 5, 2023
@coqbot-app coqbot-app bot added needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. and removed needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. stale This PR will be closed unless it is rebased. labels Oct 5, 2023
@proux01 proux01 added the needs: changelog entry This should be documented in doc/changelog. label Oct 6, 2023
@proux01
Copy link
Contributor

proux01 commented Nov 3, 2023

@Blaisorblade is it ok to merge this as it is or do you want it to be further discussed?

@Blaisorblade
Copy link
Contributor

Thanks for clarifying, I understand the concern.

@proux01
Copy link
Contributor

proux01 commented Nov 4, 2023

Thanks, I'll merge next week if there are no other comments.

@github-actions github-actions bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Nov 6, 2023
liyishuai pushed a commit to proux01/QuickChick that referenced this pull request Nov 9, 2023
proux01 added a commit to proux01/perennial that referenced this pull request Nov 9, 2023
RalfJung pushed a commit to mit-pdos/perennial that referenced this pull request Nov 9, 2023
@proux01 proux01 added the request: full CI Use this label when you want your next push to trigger a full CI. label Nov 9, 2023
@coqbot-app coqbot-app bot removed request: full CI Use this label when you want your next push to trigger a full CI. needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. labels Nov 9, 2023
proux01 and others added 6 commits November 9, 2023 13:39
In order to avoid ambiguities between the `%<scope>` and the
`%_<scope>` notations.
The notation is "term%_scope" (instead of "term%scope" for opening a
scope applying to all iterated subterms).
Currently % in Arguments yield a deprecation warning.
In a few version, we'll make it an error and in next version give it
the same semantics as in terms (i.e., deep scope opening for all
subterms rather than just temporary opening).
@proux01 proux01 added the request: full CI Use this label when you want your next push to trigger a full CI. label Nov 9, 2023
@coqbot-app coqbot-app bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Nov 9, 2023
@proux01
Copy link
Contributor

proux01 commented Nov 10, 2023

@coqbot merge now

@coqbot-app coqbot-app bot merged commit 04162a1 into coq:master Nov 10, 2023
8 checks passed
Copy link
Contributor

coqbot-app bot commented Nov 10, 2023

@proux01: Please take care of the following overlays:

  • 14928-herbelin-tmp-scope-delimiter.sh

LasseBlaauwbroek added a commit to coq-tactician/coq-tactician that referenced this pull request Nov 10, 2023
ppedrot added a commit to coq-community/vscoq that referenced this pull request Nov 10, 2023
ppedrot added a commit to ejgallego/coq-serapi that referenced this pull request Nov 10, 2023
liyishuai added a commit to QuickChick/QuickChick that referenced this pull request Nov 10, 2023
Co-authored-by: Yishuai Li <liyishuai.lys@alibaba-inc.com>
@proux01
Copy link
Contributor

proux01 commented Nov 10, 2023

And another almost five years old PR merged

zeldovich pushed a commit to mit-pdos/perennial that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New user-facing feature request or implementation. part: notations The notation system.
Projects
None yet
4 participants