Re: [Haskell-cafe] Client-extensible heterogeneous types

From: Jacek Generowicz
So my question is, what would be the Haskell approach to combining heterogeneity (as provided by variant (algebraic) types) with type-extensibility (as provided by type classes), without losing the benefits of Haskell's type system?
I haven't looked into Template Haskell, but i guess that it is likely to provide a solution. But is there a solution in plain Haskell?
It's not plain Haskell, but I'm surprised nobody mentioned the ExistentialQuantification extension, which unless I'm missing something provides exactly what you want. John

On 2010 Oct 12, at 15:44, John Lato wrote:
It's not plain Haskell, but I'm surprised nobody mentioned the ExistentialQuantification extension, which unless I'm missing something provides exactly what you want.
Yes, it does appear to be *exactly* what I want. Thanks. (Now, how about those HLists?)
participants (2)
-
Jacek Generowicz
-
John Lato