rank-n polymorphism

Mark B Shields mbs@cse.ogi.edu
Thu, 7 Mar 2002 17:26:39 +0000

> > GHC 5.0.3 supports  rank-n polymorphism.
> > Could anyone please point me to a paper that describes type inference
> > algorithm used.

> Rank-n polymorphism can only happen via explicit type signatures.

SPJ and I are working on a formal description of how all of this 
works, and should have a manuscript ready in few weeks. Yes: the inference
is based on Odersky & Laufer, and yes: the trick is to exploit type 
annotations. The full system, however, has required quite a few innovations
beyond this.

Our manuscript also describes how to extend Haskell with first-class
existentials, in the style described in our FOOL 9 paper "First-class
modules for Haskell." Fun for all the family.