Andrew Coppin wrote:
Finally, that seems to make actual sense. I have one final question though:
forall x, y. x -> y -> Z
forall x. x -> (forall y. y -> Z)
Are these two types the same or different? [Ignoring for a moment the
obvious fact that you'll have one hell of a job writing a total function
with such a type!]
they're the same type: foralls in function *results* can be moved to the
outside with no change in meaning. They don't make it a higher rank
type. (though some definitions in typically-uncurried languages like to
call it higher rank, that's not relevant to us). (modulo GHC issues
with impredicative polymorphism, which ideally shouldn't even come into
the picture here, because you're only using/exploring RankNTypes)
-Isaac
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe