Open j-hui opened 1 year ago
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.
Right now, conditional statements use
I32
conditions, and boolean operators like==
and<=
returnI32
results, just like their C counterparts. We should really commit to some kind of builtin Boolean type that avoids this hack.