You can actually write that type with impredicative polymorphism, but it doesn't do what you seem to want: it makes a list of polymorphic values (i.e., universally quantified ones, not existentially).
I like this solution, but it's a pity I think that Haskell doesn't provide a
jkff wrote:
>
> Or like this, with the benefit of using lists.
> data DrawableObj a = forall a.Drawable a => DrawableObj a
> a <,> b = DrawableObj a : b
> drawMany (a<,>b<,>c<,>[])
>
way to use types like [forall a. (Drawable a) => a], which obligates you to
declare an extra datatype...
View this message in context: http://old.nabble.com/Lists-of-Existential-DT-tp27735354p27737144.html
-----
Yves Parès
Live long and prosper
--
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe