ABSTRACT
We present HML, a type inference system that supports full first-class polymorphism where few annotations are needed: only function parameters with a polymorphic type need to be annotated. HML is a simplification of MLF where only flexibly quantified types are used. This makes the types easier to work with from a programmers perspective, and simplifies the implementation of the type inference algorithm. Still, HML retains much of the expressiveness of MLF, it is robust with respect to small program transformations, and has a simple specification of the type rules with an effective type inference algorithm that infers principal types. A small reference implementation with many examples is available at: http://research.microsoft.com/users/daan/pubs.html.
- H. Curry and R. Feys. Combinatory Logic, volume 1. North-Holland, 1958.Google Scholar
- Luis Damas. Type Assignment in Programming Languages. PhD thesis, University of Edinburgh, April 1985. Technical report CST-33-85.Google Scholar
- Luis Damas and Robin Milner. Principal type-schemes for functional programs. In 9th ACM symp. on Principles of Programming Languages (POPL'82), pages 207--212, 1982. Google Scholar
Digital Library
- Atze Dijkstra. Stepping through Haskell. PhD thesis, Universiteit Utrecht, Nov. 2005.Google Scholar
- Jacques Garrigue and Didier R´emy. Semi-explicit first-class polymorphism for ML. Journal of Information and Computation, 155:134--169, 1999. Google Scholar
Digital Library
- J.R. Hindley. The principal type scheme of an object in combinatory logic. Transactions of the American Mathematical Society, 146:29--60, Dec. 1969.Google Scholar
- Mark P. Jones. First-class polymorphism with type inference. In 24th ACM Symposium on Principles of Programming Languages (POPL'97), January 1997. Google Scholar
Digital Library
- George Kuan and David MacQueen. Efficient ML type inference using ranked type variables. In The 2007 ACM SIGPLAN Workshop on ML (ML 2007), Freiburg, Germany, October 2007. Google Scholar
Digital Library
- Didier Le Botlan. MLF: Une extension de ML avec polymorphisme de second ordre et instanciation implicite. PhD thesis, INRIA Rocquencourt, May 2004. Also in English.Google Scholar
- Didier Le Botlan and Didier R´emy. MLF: Raising ML to the power of System-F. In The International Conference on Functional Programming (ICFP'03), pages 27--38, aug 2003. Google Scholar
Digital Library
- Didier Le Botlan and Didier R´emy. Recasting MLF. Research Report 6228, INRIA, Rocquencourt, BP 105, 78 153 Le Chesnay Cedex, France, June 2007.Google Scholar
- Daan Leijen. HMF: Simple type inference for first-class polymorphism. In 13th ACM symp. of the International Conference on Functional Programming (ICFP'08), September 2008a. Extended version available as a technical report: MSR-TR-2007-118, Sep 2007, Microsoft Research. Google Scholar
Digital Library
- Daan Leijen. A reference implementation of HML. Available at http://research.microsoft.com/users/daan/pubs. html, April 2008b.Google Scholar
- Daan Leijen. A type directed translation from MLF to System F. In The International Conference on Functional Programming (ICFP'07), Oct. 2007. Google Scholar
Digital Library
- Daan Leijen and Andres Löh. Qualified types for MLF. In The International Conference on Functional Programming (ICFP'05). ACM Press, Sep. 2005. Google Scholar
Digital Library
- Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:248--375, 1978.Google Scholar
Cross Ref
- Martin Odersky and Konstantin Läufer. Putting type annotations to work. In 23th ACM symp. on Principles of Programming Languages (POPL'96), pages 54--67, January 1996. Google Scholar
Digital Library
- Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Mark Shields. Practical type inference for arbitrary-rank types. Journal of Functional Programming, 17(1):1--82, 2007. Google Scholar
Digital Library
- Didier R´emy. Simple, partial type-inference for System-F based on type-containment. In The International Conference on Functional Programming (ICFP'05), September 2005. Google Scholar
Digital Library
- Didier R´emy and Boris Yakobowski. A graphical presentation of MLF types with a linear-time unification algorithm. In TLDI'07, pages 27--38, 2007. Google Scholar
Digital Library
- Dimitrios Vytiniotis, Stephanie Weirich, and Simon Peyton Jones. Boxy types: type inference for higher-rank types and impredicativity. In The International Conference on Functional Programming (ICFP'06), September 2006. Google Scholar
Digital Library
- Dimitrios Vytiniotis, Stephanie Weirich, and Simon Peyton Jones. FPH : First-class polymorphism for Haskell. In 13th ACM symp. of the International Conference on Functional Programming (ICFP'08), September 2008. Google Scholar
Digital Library
- J.B.Wells. Typability and type checking in System-F are equivalent and undecidable. Ann. Pure Appl. Logic, 98(1--3):111--156, 1999.Google Scholar
Index Terms
Flexible types: robust type inference for first-class polymorphism
Recommendations
Flexible types: robust type inference for first-class polymorphism
POPL '09We present HML, a type inference system that supports full first-class polymorphism where few annotations are needed: only function parameters with a polymorphic type need to be annotated. HML is a simplification of MLF where only flexibly quantified ...
A type directed translation of MLF to system F
Proceedings of the ICFP '07 conferenceThe MLF type system by Le Botlan and Rémy is a natural extension of Hindley-Milner type inference that supports full first-class polymorphism, where types can be of higher-rank and impredicatively instantiated. Even though MLF is theoretically very ...
A type directed translation of MLF to system F
ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programmingThe MLF type system by Le Botlan and Rémy is a natural extension of Hindley-Milner type inference that supports full first-class polymorphism, where types can be of higher-rank and impredicatively instantiated. Even though MLF is theoretically very ...







Comments