Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #17484: Improve printing of reverse coercions
Reviewed-by: tabareau Ack-by: SkySkimmer Co-authored-by: tabareau <tabareau@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- **Added:** | ||
Improve printing of reverse coercions. When a term :g:`x` | ||
is elaborated to :g:`x'` through a reverse coercion, | ||
return the term :g:`reverse_coercion x' x` that is convertible | ||
to :g:`x'` but displayed :g:`x` thanks to the coercion | ||
:g:`reverse_coercion` | ||
(`#17484 <https://github.com/coq/coq/pull/17484>`_, | ||
by Pierre Roux). |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
nat : S | ||
: S | ||
reverse_coercion S_nat nat : S | ||
: S | ||
@reverse_coercion S Set S_nat nat : S | ||
: S |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Structure S := { | ||
ssort :> Type; | ||
sstuff : ssort; | ||
}. | ||
|
||
Canonical Structure S_nat := {| ssort := nat; sstuff := 0; |}. | ||
|
||
Check nat : S. | ||
|
||
Set Printing Coercions. | ||
|
||
Check nat : S. | ||
|
||
Set Printing All. | ||
|
||
Check nat : S. |
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