Two kinds of assertion:
- Compile-time assertion (during fold) - this should be pure
- Runtime assertion
Maybe add a new statement for this in the debug dialect to represent compile-time assertions that are ignored during runtime.
Motivation: Assertions inside functions involved in functional control flow prevent fold from happening (assert is not pure). This significantly affects the performance of the compiler.
Co-written with @weinbe58.