-
Notifications
You must be signed in to change notification settings - Fork 631
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
[declare] Consolidate Proof Using
handling.
#18890
Conversation
Both the design choice of rejecting (as in the PR once the corresponding XXX are filled) or accepting (as in #13903) are ok to me. If it is e.g. easier for UI to reject, let's go this way. |
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.
Good to me. There is the pending design decision of rejecting or accepting using
on non-interative declarations.
0ffc353
to
36a9cd3
Compare
Hi @herbelin , I tried to fix all the problems, this should be good to go now, modulo CI / unintended bugs. [I was careful to review all the places that matter, and to preserve the behavior, but still there is margin for errors] |
@herbelin actually there are some tests that fail now due to this: Section T.
Variables (T : Type) (x : T).
#[using="x"] Definition test : unit := tt.
End test.
Check test : forall T, T -> unit. So indeed maybe we want to restore the use of the attribute in this case, right? That would be easy to do, I guess we could also warn when the attribute is passed but no sections are opened. |
36a9cd3
to
1b0b4c5
Compare
I don't have a strong opinion, but this kinds of feature for immediate definitions is not a problem for UIs, I would preserve the ability to do it. |
1b0b4c5
to
a8cf45b
Compare
Hi @herbelin , sorry for the wait, I rebased this PR, and I hope I can do the remaining changes before the weekend. |
a8cf45b
to
4ea72ac
Compare
This is an old to-do from the times of `declare.ml` refactoring; thanks to Hugo Herbelin for trying first with coq#18742 , which this PR could replace. We adopt the following convention: - we remove the per-constant `using` field from `CInfo.t` (as in coq#18742) - interactive commands pass their using attribute down to the proof initialization, where the parameter is interpreted properly in declare.ml - for now we choose to warn on places where using attributes are not used (transparent definition not inside a section) We add tests from coq#18742, written by Hugo. Co-authored-by: Hugo Herbelin <Hugo.Herbelin@inria.fr>
@herbelin this should be ready, a few comments:
|
OK to me. (I just added a comment about So, I'm assigning and, unless told differently, I'm going to merge this awaited old to-do when the CI is checked. |
Thanks a lot @herbelin ; I think indeed we need to handle what is going on there, but I suggest I do so in a different PR as to allow depending PRs to move independently. |
@coqbot merge now |
@herbelin: Please take care of the following overlays:
|
[coq] Adapt to coq/coq#18890
[coq] Adapt to coq/coq#18890
Follow-up to coq#18890 Not sure what the effect on this will be, doing as suggested by the PR discussion.
This is an old to-do from the times of
declare.ml
refactoring;thanks to Hugo Herbelin for trying first with #18742 , which this PR
could replace.
We adopt the following convention:
we remove the per-constant
using
field fromCInfo.t
(as in [Subsumed] Towards a single code path for the "using" clause + small improvement of "using Type" for co/fixpoints #18742)interactive commands pass their using attribute down to the proof
initialization, where the parameter is interpreted properly in declare.ml
̶f̶o̶r̶ ̶n̶o̶w̶ ̶w̶e̶ ̶c̶h̶o̶o̶s̶e̶ ̶t̶o̶ ̶w̶a̶r̶n̶ ̶o̶n̶ ̶p̶l̶a̶c̶e̶s̶ ̶w̶h̶e̶r̶e̶ ̶u̶s̶i̶n̶g̶ ̶a̶t̶t̶r̶i̶b̶u̶t̶e̶s̶ ̶a̶r̶e̶ ̶n̶o̶t̶
̶ ̶ ̶u̶s̶e̶d̶ ̶(̶t̶r̶a̶n̶s̶p̶a̶r̶e̶n̶t̶ ̶d̶e̶f̶i̶n̶i̶t̶i̶o̶n̶ ̶n̶o̶t̶ ̶i̶n̶s̶i̶d̶e̶ ̶a̶ ̶s̶e̶c̶t̶i̶o̶n̶)̶
We add tests from #18742, written by Hugo.
cc: @herbelin
Overlays: