forked from coq/coq
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
Printing precedence bug leading to wrong parentheses in custom entries #7
Closed
herbelin
wants to merge
9
commits into
master+support-arg-free-abbrev-in-custom-entries-with-global
from
master+printing-precedence-bug-custom-entry
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…and constr). There was a collision at the time of interpreting subentries (in metasyntax.ml) but also at the time of "optimizing" the entries (in egramcoq.ml).
Insertion of coercion to manage precedence of custom entries are treated in constrextern.ml, while ppconstr.ml is only about the management of precedences for constr.
The "Any" case was not reached formerly for ETPattern and ETConstr as far as I can see. So there should be no change of semantics.
Also renamed it to relative_entry_level. Correspondence between old and new representation is: (n,L) -> LevelLt n (n,E), (n,Prec n) -> LevelLe n (n,Any) -> LevelSome Should not change global semantics (except error message in pr_arg).
…n with typing coercions. No change of semantics.
…in this entry. Parsing was automatically supporting this. This commit adds support for printing. Note: More delicate would be to recognize that some given entry support applicative nodes hence abbreviations with arguments.
This is to emphasize that this is more general than just a level. Should not change semantics.
Don't mix less-than precedences (as in "expr + expr" with an associativity) with equal precedences (this impacts Notation.availability_of_entry_coercion). We introduce for that purpose a variant of "notation_entry_level" called "notation_entry_relative_level".
2 tasks
herbelin
force-pushed
the
master+support-arg-free-abbrev-in-custom-entries-with-global
branch
5 times, most recently
from
March 3, 2020 21:14
ffc7f2c
to
5c1fb33
Compare
herbelin
force-pushed
the
master+support-arg-free-abbrev-in-custom-entries-with-global
branch
from
April 11, 2020 08:41
a744436
to
33aaa5d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
was wrongly written
[1+1+(1+1)]
even though parentheses were not declared in the customexpr
.