Skip to content
New issue

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

Add builtin booleans #167

Open
j-hui opened this issue May 19, 2023 · 1 comment
Open

Add builtin booleans #167

j-hui opened this issue May 19, 2023 · 1 comment

Comments

@j-hui
Copy link
Contributor

j-hui commented May 19, 2023

Right now, conditional statements use I32 conditions, and boolean operators like == and <= return I32 results, just like their C counterparts. We should really commit to some kind of builtin Boolean type that avoids this hack.

@j-hui
Copy link
Contributor Author

j-hui commented May 19, 2023

Ideally we don't just hard-code Booleans, but support arbitrary algebraic data types (kind of like what Coq does). This should be very doable, but may require additional primitives in IR and desugaring after type-checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant