[Haskell-cafe] Client-extensible heterogeneous types

John Lato 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.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101012/d079c210/attachment.html


More information about the Haskell-Cafe mailing list