[Haskell] Re: [Haskell-cafe] ANNOUNCE: Generic Haskell 1.80 (Emerald)

Thomas van Noort thomas at cs.ru.nl
Sat Apr 12 11:12:21 EDT 2008

That's a good question. Unfortunately, only Haskell98 types are currently
supported by the Generic Haskell compiler.

But at first sight, implementing support for parametric types with class
constraints is not too hard. Class constraints of a parametric type need
to be propagated to its generated structure type.


> On 12/04/2008, Thomas van Noort <thomas at cs.ru.nl> wrote:
>>  Generic Haskell includes the following features:
>>  * type-indexed values -- generic functions that can be
>>    instantiated on all Haskell data types.
>                                ^^^
> I have perused the manual and wonder if parametric types with class
> constraints are now supported or are not considered Haskell types. I'm
> thinking of types such as
> data Ord a => BinTree a = Leaf | Node a (BinTree a) (BinTree a)
> data Functor f => GRose f a = GLeaf | GNode a (f(GTree f a))

More information about the Haskell mailing list