-
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.
more type inference. Works for basic usage, not for implicit casts (q…
…uite yet)
- Loading branch information
Charles Sherk
committed
Aug 4, 2021
1 parent
9a5f533
commit 80730aa
Showing
70 changed files
with
1,525 additions
and
640 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,19 @@ | ||
# Type inference | ||
|
||
This document describes what you can and can't expect from the type inference | ||
engine. | ||
|
||
# Implicit casting | ||
Implicit casting could be confusing to the programmer, so it is disabled by | ||
default. The "autocast" commandline option enables it, in which cast casts | ||
to higher bitwidths will be automatically inserted | ||
|
||
# Constants | ||
|
||
Integer constant types have two components: the bit width and the | ||
signedness. You can specify the signedness with a `u` in front of the constant, | ||
and the width is specified with angle brackets after. So if you want to write | ||
the number four as an unsigned, 16 bit number, it would be `u4<16>` | ||
|
||
You do not have to specify these types, as they can be inferred. However, if you | ||
have a multiplication of constants, one of them will need to be annotated |
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
Oops, something went wrong.