ABSTRACT
MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, originally introduced to represent MLF types. We give a few semantic preserving transformations on constraints and propose a strategy for applying them to solve constraints. We show that the resulting algorithm has optimal complexity for MLF type inference, and argue that, as for ML, this complexity is linear under reasonable assumptions.
Supplemental Material
Available for Download
Slides from the presentation
Supplemental material for: From ML to MLF: graphic type constraints with efficient type inference
- Fritz Henglein. Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems, 15(2):253--289, 1993. Google ScholarDigital Library
- Didier Le Botlan and Didier Rémy. MLF: Raising ML to the power of System-F. In Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, pages 27--38, August 2003. Google ScholarDigital Library
- Didier Le Botlan and Didier Rémy. Recasting MLF. Research Report 6228, INRIA, Rocquencourt, BP 105, 78 153 Le Chesnay Cedex, France, June 2007.Google Scholar
- Daan Leijen. A type directed translation of MLF to system F. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP'07), Freiburg, Germany, pages 111--122, October 2007. Google ScholarDigital Library
- Daan Leijen. Flexible types: robust type inference for first-class polymorphism. Technical Report MSR-TR-2008-55, Microsoft Research, March 2008.Google ScholarDigital Library
- Daan Leijen. HMF: Simple type inference for first-class polymorphism. In ICFP'08 {15}. Google ScholarDigital Library
- David McAllester. A logical algorithm for ML type inference. In International Conference on Rewriting Techniques and Applications (RTA), Valencia, Spain, volume 2706 of Lecture Notes in Computer Science, pages 436--451. Springer-Verlag, June 2003. Google ScholarDigital Library
- François Pottier and Didier Rémy. The essence of ML type inference. In Benjamin C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 10, pages 389--489. MIT Press, 2005.Google Scholar
- Didier Rémy. Extending ML type system with a sorted equational theory. Research Report 1766, INRIA, 1992.Google Scholar
- Didier Rémy and Boris Yakobowski. A graphical presentation of MLF types with a linear-time unification algorithm. In Proceedings of the 2007 ACM SIGPLAN International Workshop on Types in Languages Design and Implementation (TLDI'07), pages 27--38, Nice, France, January 2007. ACM Press. Google ScholarDigital Library
- Didier Rémy and Boris Yakobowski. A Church-style intermediate language for MLF. Submitted, available at http://gallium.inria.fr/~remy/mlf, 2008.Google Scholar
- Didier Rémy and Boris Yakobowski. A graphical presentation of MLF types with a linear-time incremental unification algorithm. Extended version, of {10}, September 2008.Google Scholar
- Dimitrios Vytiniotis, Stephanie Weirich, and Simon Peyton Jones. FPH: First-class polymorphism for Haskell. In ICFP'08 {15}. Google ScholarDigital Library
- Joe B.Wells. Typability and type checking in system F are equivalent and undecidable. Annals of Pure and Applied Logic, 98(1--3):111--156, 1999.Google ScholarCross Ref
- Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming (ICFP'08), Victoria, British Columbia, Canada. ACM Press, September 2008.Google Scholar
Index Terms
- From ML to MLF: graphic type constraints with efficient type inference
Recommendations
From ML to MLF: graphic type constraints with efficient type inference
ICFP '08MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a ...
MLF for everyone (users, implementers, and designers)
ML '07: Proceedings of the 2007 workshop on Workshop on MLMLF is an alternative to ML that permits second-order polymorphism as in System F but retains (partial) type inference a la ML. Type annotations are requested only on parameters of functions that are used polymorphically. Type abstractions and type ...
A church-style intermediate language for MLF
MLF is a type system that seamlessly merges ML-style implicit but second-class polymorphism with System-F explicit first-class polymorphism. We present xMLF, a Church-style version of MLF with full type information that can easily be maintained during ...
Comments