ssm-lang / sslang

A language built atop the Sparse Synchronous Model
BSD 3-Clause "New" or "Revised" License
18 stars 0 forks source link

Add builtin booleans #167

Open j-hui opened 1 year ago

j-hui commented 1 year ago

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 commented 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.