15 Dec
2010
15 Dec
'10
4:26 a.m.
Isn't "Either" the same thing as AorB in data AorB = Aconstructor Int | Bconstructor Int I want two separate types A and B along with a third type which is their Union. Is that not possible? In my actual case, I have more than two types. So I would like a way to take the union of an arbitrarily number of types. data Union = A1 | A2 | ... where each of A1, A2, ... has its own data declaration. * -- Russ * On Tue, Dec 14, 2010 at 12:14 PM, Tobias Brandt <tob.brandt@googlemail.com>wrote:
data AorB = Aconstructor Int | Bconstructor Int