[Haskell-cafe] What is the rank of a polymorphic type?
Stefan Holdermans
stefan at cs.uu.nl
Sat Dec 5 16:57:01 EST 2009
Eugene,
> 1) Does there exist an authoritative source saying the same? Not that
> I'm doubting, just supposing that the source would have other
> interesting information, too :)
You may want to have a look at the already mentioned JFP-article by
Peyton Jones et al. and perhaps the work of Kfoury and Wells.
> 2) Is it true that rank (forall a . a, forall a . a) == 0 ?
No, for pairs one takes the maximum of the constituent types. So, here
you'd get rank 1.
Note that this is an impredicative type, which is yet another
extension of the standard Hindley-Milner typing discipline.
Cheers,
Stefan
>
>>
More information about the Haskell-Cafe
mailing list