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

Provide an explicit primitive to raise non-zero Ltac failures. #15327

Merged
merged 2 commits into from
Dec 11, 2021

Conversation

ppedrot
Copy link
Member

@ppedrot ppedrot commented Dec 10, 2021

The rationale is that non-zero level failing is an Ltac-specific feature. We have a few tacticals around that try to catch this level and reraise it with a lower level, but this hardly makes sense for ML tactics. Only Ltac programs should ever observe the level, and even there this feature is often used to work around deficiencies of the expressivity of Ltac.

As a matter of fact, most ML callers of the tclFAIL primitive call it with a level set to 0, which clearly indicates an API issue.

This PR removes the tclFAIL level argument, and provides a tclFAILn function to pass an arbitrary number when needed.

Overlays:

@ppedrot ppedrot added the kind: cleanup Code removal, deprecation, refactorings, etc. label Dec 10, 2021
@ppedrot ppedrot added this to the 8.16+rc1 milestone Dec 10, 2021
@ppedrot ppedrot requested review from a team as code owners December 10, 2021 15:12
ppedrot added a commit to ppedrot/aac-tactics that referenced this pull request Dec 10, 2021
ppedrot added a commit to ppedrot/coq-elpi that referenced this pull request Dec 10, 2021
ppedrot added a commit to ppedrot/Coq-Equations that referenced this pull request Dec 10, 2021
ppedrot added a commit to ppedrot/unicoq that referenced this pull request Dec 10, 2021
ppedrot added a commit to ppedrot/relation-algebra that referenced this pull request Dec 10, 2021
ppedrot added a commit to ppedrot/fiat that referenced this pull request Dec 10, 2021
ppedrot added a commit to ppedrot/coqhammer that referenced this pull request Dec 10, 2021
@ppedrot ppedrot force-pushed the split-tclfail-level branch 2 times, most recently from ad6f94b to 6009ad5 Compare December 10, 2021 18:47
The rationale is that non-zero level failing is an Ltac-specific feature.
We have a few tacticals around that try to catch this level and reraise it
with a lower level, but this hardly makes sense for ML tactics. Only Ltac
programs should ever observe the level, and even there this feature is often
used to work around deficiencies of the expressivity of Ltac.

As a matter of fact, most ML callers of the tclFAIL primitive call it with a
level set to 0, which clearly indicates an API issue.

This PR removes the tclFAIL level argument, and provides a tclFAILn function
to pass an arbitrary number when needed.
@SkySkimmer SkySkimmer self-assigned this Dec 11, 2021
@SkySkimmer
Copy link
Contributor

@coqbot merge now

@coqbot-app coqbot-app bot merged commit 05e22ae into coq:master Dec 11, 2021
@coqbot-app
Copy link
Contributor

coqbot-app bot commented Dec 11, 2021

@SkySkimmer: Please take care of the following overlays:

  • 15327-ppedrot-split-tclfail-level.sh

SkySkimmer added a commit to coq-community/aac-tactics that referenced this pull request Dec 11, 2021
gares added a commit to LPCIC/coq-elpi that referenced this pull request Dec 11, 2021
damien-pous pushed a commit to damien-pous/relation-algebra that referenced this pull request Dec 11, 2021
Janno added a commit to unicoq/unicoq that referenced this pull request Dec 11, 2021
@ppedrot ppedrot deleted the split-tclfail-level branch December 11, 2021 11:16
ppedrot added a commit to mattam82/Coq-Equations that referenced this pull request Dec 11, 2021
JasonGross pushed a commit to mit-plv/fiat that referenced this pull request Dec 12, 2021
lukaszcz pushed a commit to lukaszcz/coqhammer that referenced this pull request Dec 12, 2021
proux01 pushed a commit to proux01/itauto that referenced this pull request Mar 1, 2022
ppedrot added a commit to ppedrot/relation-algebra that referenced this pull request Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: cleanup Code removal, deprecation, refactorings, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants