
21 Jun
2011
21 Jun
'11
9:24 p.m.
On Jun 21, 4:57 pm, Alexey Khudyakov
Types may be same.
oops :: Int :+: Int -> Int oops <Int i> = mmm which one?
If you were to have your anonymous sum types be a union instead of the disjoint union, then you could say that A :+: A has no meaning. That's what I was originally thinking of when I suggested that syntax. However, as was pointed out to me by David Sankel, disjoint unions are more powerful than regular unions. Since that's the case, Matthew Steele's suggested syntax makes more sense. It means that you need to remember the order of your arguments, but you need to do that with tuples, anyway.