[Haskell-cafe] What is the rank of a polymorphic type?

Eugene Kirpichov ekirpichov at gmail.com
Sun Dec 6 01:42:34 EST 2009


2009/12/6 Stefan Holdermans <stefan at cs.uu.nl>:
> 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.

OK, thanks.
However, isn't the type (forall a . a) -> String impredicative because
it instantiates a type variable of the type constructor (->) p q with
p = forall a . a?

>
> Cheers,
>
>  Stefan
>>
>>>
>



-- 
Eugene Kirpichov
Web IR developer, market.yandex.ru


More information about the Haskell-Cafe mailing list