[Haskell-cafe] understanding generics
Anatoly Yakovenko
aeyakovenko at gmail.com
Sat Apr 11 14:44:10 EDT 2009
i am trying to understand how data.data works. How would i traverse
the subterms of one type and build another type out of them.
something like this:
> gmapQ (\a -> Right a) (Just "hello")
<interactive>:1:0:
Inferred type is less polymorphic than expected
Quantified type variable `d' escapes
In the first argument of `gmapQ', namely `(\ a -> Right a)'
In the expression: gmapQ (\ a -> Right a) (Just "hello")
In the definition of `it':
it = gmapQ (\ a -> Right a) (Just "hello")
Thanks,
Anatoly
More information about the Haskell-Cafe
mailing list