
21 Jun
2011
21 Jun
'11
11:48 p.m.
On Tue, Jun 21, 2011 at 2:24 PM, pipoca
On Jun 21, 4:57 pm, Alexey Khudyakov
wrote: 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 sort of union would not be parametric, and would play havoc with generic programming. E.g. consider taking a list [(t,Int)] and [(t,a)] and generating a list of [(t,Int :+: a)], then processing this with a function of the form Int -> Bool.