We may use the following type definition:
type
bool
= True of unit ∣ False of unit and see the expression if
a
then
a
1
else
a
2
as syntactic sugar for match
bool
a
with True
x
⇒
a
1
∣ False
x
⇒
a
2
.