
26 May
2008
26 May
'08
5:22 p.m.
andrewcoppin:
Today I was reading a potentially interesting paper, and I stumbled across something referred to as a "rank-2 type". Specifically,
class Typable x => Term x where gmapT :: (forall y. Term y => y -> y) -> x -> x
At this point, I am at a complete loss as to how this is any different from
gmapT :: Term y => (y -> y) -> x -> x
Can anybody enlighten me?
If in doubt, consult the fine user's guide: Section 8.7.4. Arbitrary-rank polymorphism http://www.haskell.org/ghc/docs/latest/html/users_guide/other-type-extension... -- Don