[Haskell-cafe] Lists of Existential DT
limestrael at gmail.com
Sun Feb 28 13:49:10 EST 2010
> 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<,>)
I like this solution, but it's a pity I think that Haskell doesn't provide a
way to use types like [forall a. (Drawable a) => a], which obligates you to
declare an extra datatype...
Live long and prosper
View this message in context: http://old.nabble.com/Lists-of-Existential-DT-tp27735354p27737144.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe