On Tue, Jun 21, 2011 at 2:24 PM, pipoca <eliyahu.ben.mi...@gmail.com> wrote:

> On Jun 21, 4:57 pm, Alexey Khudyakov <alexey.sklad...@gmail.com>
> 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.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to