FPH: First-class polymorphism for Haskell

D Vytiniotis, S Weirich, S Peyton Jones - ACM Sigplan Notices, 2008 - dl.acm.org
ACM Sigplan Notices, 2008dl.acm.org
Languages supporting polymorphism typically have ad-hoc restrictions on where
polymorphic types may occur. Supporting" firstclass" polymorphism, by lifting those
restrictions, is obviously desirable, but it is hard to achieve this without sacrificing type
inference. We present a new type system for higher-rank and impredicative polymorphism
that improves on earlier proposals: it is an extension of Damas-Milner; it relies only on
System F types; it has a simple, declarative specification; it is robust to program …
Languages supporting polymorphism typically have ad-hoc restrictions on where polymorphic types may occur. Supporting "firstclass" polymorphism, by lifting those restrictions, is obviously desirable, but it is hard to achieve this without sacrificing type inference. We present a new type system for higher-rank and impredicative polymorphism that improves on earlier proposals: it is an extension of Damas-Milner; it relies only on System F types; it has a simple, declarative specification; it is robust to program transformations; and it enjoys a complete and decidable type inference algorithm.
ACM Digital Library