
5 Dec
2009
5 Dec
'09
4 p.m.
2009/12/5 Stefan Holdermans
Eugene,
Consider the type: (forall a . a) -> String.
It's of rank 2.
What is the definition of rank of a polymorphic type?
The minimal rank of a type is given by
rank (forall a. t) = 1 `max` rank t rank (t -> u) = (if rank t == 0 then 0 else rank t + 1) `max` rank u rank _ = 0
Thanks! 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 :) 2) Is it true that rank (forall a . a, forall a . a) == 0 ?
HTH,
Stefan
-- Eugene Kirpichov Web IR developer, market.yandex.ru