We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0
1
Bit
It would be nice if we could write 0 and 1 as literals of type Bit, instead of having to write False and True.
False
True
It seems like it would be pretty easy to implement this; we would just add the instance rules Literal 0 Bit and Literal 1 Bit to the type checker.
Literal 0 Bit
Literal 1 Bit
The text was updated successfully, but these errors were encountered:
Seems reasonable to me.
Sorry, something went wrong.
Support literals 0 and 1 at type Bit (#913).
2550a57
This adds the instance rule `(1 >= n) => Literal n Bit` to the type checker.
Add regression test for #913.
fbb711b
Thanks to @fandersengalois for suggesting this feature!
Successfully merging a pull request may close this issue.
It would be nice if we could write
0
and1
as literals of typeBit
, instead of having to writeFalse
andTrue
.It seems like it would be pretty easy to implement this; we would just add the instance rules
Literal 0 Bit
andLiteral 1 Bit
to the type checker.The text was updated successfully, but these errors were encountered: