Hi Jan,
Hi,
I want to define a function which is generic for all unary type constructors using the regular package. More precisely, I want to define a function like the following, which replaces every polymorphic component by the position of the component in the generic representation.
shape :: (Regular f, Shape (PF f)) => f a -> f [Bool]
Is it correct that it is not possible to implement a function like this using regular? Or do I miss something?
I have implemented the function by using different representation types K, I and so forth that take an additional argument. Furthermore I have added an additional type to mark the polymorphic component.
Thanks, Jan
_______________________________________________
Generics mailing list
Generics@haskell.org
http://www.haskell.org/mailman/listinfo/generics