Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve printing of reverse coercions
When a a term [x] is elaborated into [x'] through a reverse coercion, return the term [rev_coerce x' x] that is convertible to [x'] but printed [x], thanks to the coercion [rev_coerce]. Previously, the returned term was directly [x'].
- Loading branch information
Showing
6 changed files
with
49 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
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