Closed 11Kilobytes closed 10 years ago
There are two things to do here: weak type aliases and proper user-defined types. Aliases are relatively simple but I have two competing ideas for user-defined types: unified ADTs or separate struct
(labelled product) and union
(sum) types. Either way, this depends on #33.
Monomorphic user-defined types are in:
data These:
case This int;
case That [char];
case These int [char];
match (1 "foo" These):
case This: sayInt
case That: say
case These -> x y:
x sayInt
y say
Their polymorphic cousins are on the way.
The title is self explanatory.