Is your feature request related to a problem? Please describe.
Currently, it is not possible to use comparison primitives easily. This issue is to discuss ways in which it would be nicer to use, implement, etc.
Describe the solution you'd like
In order to use comparison primitives, this language needs at least one of the following.
- Primitive pattern matches
- Integer2Boolean conversion
- Primitive if
primIf (which uses an integer as its condition)
For each of these, implementation of higher level if (n <? 3) then t else f changes a lot.
- Primitive pattern matches
The expression would be match n < 3 with 1 -> t; 0 -> f;.
- Integer2Boolean conversion
It would be match integer2Boolean (n < 3) with C{1;0} -> t; C{2;0} -> f;
- Primitive if
primIf
It would be primIf (n < 3) t f
Is your feature request related to a problem? Please describe.
Currently, it is not possible to use comparison primitives easily. This issue is to discuss ways in which it would be nicer to use, implement, etc.
Describe the solution you'd like
In order to use comparison primitives, this language needs at least one of the following.
primIf(which uses an integer as its condition)For each of these, implementation of higher level
if (n <? 3) then t else fchanges a lot.The expression would be
match n < 3 with 1 -> t; 0 -> f;.It would be
match integer2Boolean (n < 3) with C{1;0} -> t; C{2;0} -> f;primIfIt would be
primIf (n < 3) t f