Printing for if <term> is <pattern> then _ else _ syntax#22124
Draft
proux01 wants to merge 4 commits into
Draft
Conversation
According to rocq-prover#21425 (comment)
SkySkimmer
reviewed
Jun 12, 2026
| Use the :cmd:`Add` and :cmd:`Remove` commands to update this set. | ||
|
|
||
|
|
||
| Printing matching on booleans |
Contributor
There was a problem hiding this comment.
shouldn't it use the new printing instead?
Contributor
Author
There was a problem hiding this comment.
It seems pretty useless now. But if you think it's still worth having (using the new syntax), I'm fine keeping it.
Contributor
|
Would be nice to have some tests |
Contributor
|
in particular a test where the case info tag is IfStyle but can't be printed as if (because both branches use constructor arguments) Lemma test : sumbool True True -> True.
Proof.
refine (fun x : sumbool True True => if x then _ else _);assumption.
Defined.
Print test. |
SkySkimmer
reviewed
Jun 12, 2026
This was referenced Jun 16, 2026
jdchristensen
pushed a commit
to HoTT/Coq-HoTT
that referenced
this pull request
Jun 16, 2026
jdchristensen
added a commit
to HoTT/Coq-HoTT
that referenced
this pull request
Jun 16, 2026
This file contains hidden or 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
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.
Add printing for the syntax introduced (only parsing) in #21609 .
All
if _ then _ else _andif _ is _ then _ else _are printed asif _ is _ then _ else _except for boolean guards which remain printed asif _ then _ else _.Depends on: #21609
Documented any new / changed user messages.Updated documented syntax by runningmake doc_gram_rsts.Overlays (to be merged before the current PR)