Conversation
|
I think this looks good @ppedrot , however I wonder what level of "promise" should be made on this extension. IMVHO it is still not clear what the story with scoping may be, so we may want to label this option as "Use at your own risk". Maybe the "Coq 9" project would be a good moment to unify the handling of scoped semantics. |
My plan is to integrate the infrastructure PR ASAP. Then, chapters will be merged one by one and removed from the manual. So it is probably best to wait. What chapter would this doc go in? |
|
@ejgallego I don't know if this should be flagged as experimental. I definitely dislike the syntax inflation that is used to work around the scoping mess, but I'm fundamentally convinced this is the correct semantics for module-bound options. If anything, the syntax should be marked experimental, not what it does. |
|
@maximedenes I guess in the description of variants of |
|
Yup I suggest we add a small warning so at least users are aware syntax [and maybe semantics even if I agree with you] may be still in flux, so those wanting to write "super-stable" Coq can avoid this. |
What should the warning recommend them to use instead, if they want to be stable? |
You just don't use it. I mean a sentence in the documentation by the way, not an actual warning in the code. |
If you mean use |
I'm afraid I cannot follow. When we do the cleanup many things will break almost for sure, but if you keep the status-quo nothing should become worse. |
What I'm trying to say is that using the |
|
Hard to say, we will see. It will be quite confusing as for example So I'm fine with rushed hacks as long as they are documented as such. |
|
If we are pretty confident that the semantics is the right one, then we can use this new syntax to unify the rest around this. And thus, keep the new syntax (and probably completely deprecate |
|
@ppedrot can you assign a reviewer? |
|
I'm not quite sure about the proper person to review that patch. Any volunteers? |
| @@ -150,11 +152,11 @@ val get_ref_table : | |||
|
|
|||
| (** The first argument is a locality flag. | |||
| [Some true] = "Local", [Some false]="Global". *) | |||
There was a problem hiding this comment.
This comment is outdated and should be fixed.
| | VernacSetAppendOption (key,v) -> vernac_set_append_option ~atts key v | ||
| | VernacUnsetOption key -> vernac_unset_option ~atts key | ||
| | VernacSetOption (export, key,v) -> vernac_set_option ~atts export key v | ||
| | VernacSetAppendOption (key,v) -> vernac_set_append_option ~atts false key v |
There was a problem hiding this comment.
This is dead code. The constructor VernacSetAppendOption should be removed from the vernac_expr data type.
| val set_string_option_value_gen : bool option -> option_name -> string -> unit | ||
| val set_string_option_append_value_gen : bool option -> option_name -> string -> unit | ||
| val unset_option_value_gen : bool option -> option_name -> unit | ||
| val set_int_option_value_gen : ?locality:option_locality -> option_name -> int option -> unit |
There was a problem hiding this comment.
Why not keep it as a required argument?
There was a problem hiding this comment.
Well, there is a default value in the type, so it's just a matter of taste.
|
@ppedrot ping |
|
@maximedenes Changes addressed. |
|
@vbgl do you approve now? |
vbgl
left a comment
There was a problem hiding this comment.
I did not test, but the diff looks good.
|
@ppedrot Doesn't this break equations and ltac2? |
|
What's an overlay...? |
This PR breaks ltac2 and equations, and no fixes where pushed there AFAICT. An overlay is what makes CI picks up those fixes when testing external devs. |
|
I'm on it. |
This prevents relying on an underspecified bool option argument.
This feature has been asked many times by different people, and allows to have options in a module that are performed when this module is imported. This supersedes the well-numbered cursed PR rocq-prover#313.
|
@RalfJung FYI you should read https://github.com/coq/coq/blob/master/dev/ci/README.md#information-for-developers (even if partially outdated) and check this https://github.com/coq/coq/tree/master/dev/ci/user-overlays (linked from the previous file. BTW the first file was linked from the contributing guide but I suppose you have already read this one. |
|
Success here: https://travis-ci.org/ppedrot/coq/builds/351302366 |
|
@ppedrot you forgot to open PRs... |
|
I did it for you... |
|
An issue should be open not to forget to document this before 8.8.0. |
This PR implements the Export Set/Unset feature as discussed in the last WG.
This feature has been asked many times by different people, and allows to have options in a module that are performed when this module is imported.
This supersedes the well-numbered cursed PR #313.
I did not document it in the refman yet, as I don't know what's the protocol regarding the sphinx port of the documentation. What is recommended?