-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
feb0195
commit 81a57a0
Showing
2 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,21 @@ | ||
import Lean | ||
|
||
open Lean BitVec | ||
|
||
open Meta in | ||
def test [ToExpr α] (a : α) : MetaM Unit := do | ||
let e := toExpr a | ||
let type ← inferType e | ||
check e | ||
logInfo m!"{e} : {type}" | ||
|
||
run_meta test (2 : Fin 4) | ||
run_meta test (8 : Fin 5) | ||
run_meta test (300#8) | ||
run_meta test (300#32) | ||
run_meta test (58#8) | ||
run_meta test (20 : UInt8) | ||
run_meta test (30 : UInt16) | ||
run_meta test (40 : UInt32) | ||
run_meta test (50 : UInt64) | ||
run_meta test (60 : USize) |
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,10 @@ | ||
2 : Fin 4 | ||
3 : Fin 5 | ||
44#8 : BitVec 8 | ||
300#32 : BitVec 32 | ||
58#8 : BitVec 8 | ||
20 : UInt8 | ||
30 : UInt16 | ||
40 : UInt32 | ||
50 : UInt64 | ||
60 : USize |