
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. Regards, Thomas
On 12/04/2008, Thomas van Noort
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))