
5 Dec
2009
5 Dec
'09
8:56 a.m.
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 HTH, Stefan