2022-04-22 15:49:28 +00:00
|
|
|
MyType: Type
|
|
|
|
MyType = type
|
|
|
|
Variant1
|
|
|
|
| Variant2 (int 0..usize)
|
|
|
|
| Variant3 str (int 0..21)
|
2022-04-06 13:23:46 +00:00
|
|
|
|
|
|
|
myFunc: str, int -> MyType
|
|
|
|
myFunc strval intval =
|
|
|
|
if intval < 21 && intval > 0
|
|
|
|
then Variant3 strval intval
|
|
|
|
else Variant1
|
|
|
|
|
2022-04-22 15:49:28 +00:00
|
|
|
ComplexType: Type
|
|
|
|
ComplexType = type
|
|
|
|
ComplexVariant (str, int -> MyType) str
|
2022-04-06 13:23:46 +00:00
|
|
|
|
|
|
|
myVal : ComplexType
|
|
|
|
myVal = ComplexVariant myFunc "uwu~"
|