forked from coq/coq
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR coq#19197: Ltac2: add a few APIs about uint63
Reviewed-by: ppedrot Co-authored-by: ppedrot <[email protected]>
- Loading branch information
Showing
4 changed files
with
31 additions
and
0 deletions.
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,4 @@ | ||
- **Added:** | ||
APIs `compare` `of_int` and `print` in `Ltac2.Uint63` | ||
(`#19197 <https://github.com/coq/coq/pull/19197>`_, | ||
by Gaëtan Gilbert). |
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,12 @@ | ||
Require Import Ltac2.Ltac2. | ||
Require Import Ltac2.Uint63. | ||
|
||
Ltac2 Eval Control.assert_true (equal (of_int 0) (of_int 0)). | ||
|
||
Ltac2 Eval Control.assert_false (equal (of_int 0) (of_int 1)). | ||
|
||
Ltac2 Eval Control.assert_true (Int.equal (compare (of_int 0) (of_int 42)) -1). | ||
Ltac2 Eval Control.assert_true (Int.equal (compare (of_int 41) (of_int 41)) 0). | ||
Ltac2 Eval Control.assert_true (Int.equal (compare (of_int 67) (of_int 43)) 1). | ||
|
||
Ltac2 Eval Control.assert_true (String.equal (Message.to_string (print (of_int 567))) "567"). |
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