-
Notifications
You must be signed in to change notification settings - Fork 640
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
Move the static check of evaluability in unfold tactic to runtime. #12256
Conversation
424d10f
to
3e7ee00
Compare
Unfortunately, it seems that many developments in the CI rely on the design pattern of |
Let's see how it fares now. |
This seems much better, now the CI passes fully, much to my surprise... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's indeed concise.
I think it's probably better w.r.t. backwards-compatibility that as a special case, interp_global_reference extracts the head of an applied constant when the argument is a syntactic notation.
OK
I would also suggest to add also the example from #11727.
The refman would have to be changed, but that can be continued in #11840.
@@ -0,0 +1,6 @@ | |||
Axiom a: bool. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ltac unfold_ x := unfold x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this go into another, different test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it can.
|
||
Goal a = true. | ||
Proof. | ||
try unfold a. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try unfold a. | |
try unfold a. | |
try unfold_ a. |
It looks like both the refman and the test-suite are broken. |
Test-suite failure seems due to the |
Indeed, there's probably some "this thing should work but it fails" line in one of the with_strategy tests that this PR makes work, and the solution should just be to remove the relevant |
Indeed there were tests and documentation introduced by @JasonGross precisely about the limitations of unfold internalization. I've tweaked the former and removed the latter. |
The offending developments have passed, this seems ready. |
Just relaunched VST just in case. |
a0350d3
to
ee9dcff
Compare
@JasonGross done. |
See coq#11840 for a motivation. I had to fix Floats.FloatLemmas because it uses the same name for a notation and a term, and the fact this unfold was working on this was clearly a bug. I hope nobody relies on this kind of stuff in the wild. Fixes coq#5764: "Cannot coerce ..." should be a runtime error. Fixes coq#5159: "Cannot coerce ..." should not be an error. Fixes coq#4925: unfold gives error on Admitted.
…heir head. This seems to be a pattern used quite a bit in the wild, it does not hurt to be a bit more lenient to tolerate this kind of use. Interestingly the API was already offering a similar generalization in some unrelated places. We also backtrack on the change in Floats.FloatLemmas since it is an instance of this phenomenon.
@herbelin I've added a changelog, this is ready. |
OK, will merge tonight. |
See #11840 for a motivation. I had to fix Floats.FloatLemmas because it uses the same name for a notation and a term, and the fact this unfold was working on this was clearly a bug. I hope nobody relies on this kind of stuff in the wild.
Depends on #12254.
Fixes #5764: "Cannot coerce ..." should be a runtime error.
Fixes #5159: "Cannot coerce ..." should not be an error.
Fixes #4925: unfold gives error on Admitted.
Fixes #11727: documentation lies about example tactic notation taking a reference.