[Haskell-cafe] Client-extensible heterogeneous types
jwlato at gmail.com
Tue Oct 12 09:44:04 EDT 2010
> From: Jacek Generowicz <jacek.generowicz at cern.ch>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe