Hello Andrew, Sunday, July 8, 2007, 4:31:32 PM, you wrote: > Oh, I don't mind not knowing how rank-2 types are *implemented*. ;-) But > it would be nice to know what they *are*... :-S
concrete types are rank-0: sin :: Double->Double polymorphic types are rank-1: length :: forall a . [a] -> Int functions which arguments are rank-1 types are rank-2: f :: (forall a . [a] -> Int) -> Int and so on. rank-2 and rank-N considered separately because it's easier to implement only rank-2 polymorphism and some compilers stops here (and rank-2 polymorphism used in ST monad which is pretty standard feature, while higher-rank functions are rarely required) -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe