skip to main content
article

A type directed translation of MLF to system F

Published:01 October 2007Publication History
Skip Abstract Section

Abstract

The 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 attractive, it has not seen widespread adoption. We believe that this partly because it is unclear how the rich language of MLF types relate to standard System F types. In this article we give the first type directed translation of MLF terms to System F terms. Based on insight gained from this translation, we also define "Rigid MLF" (MLF=), a restriction of MLF where all bound values have a System F type. The expressiveness of MLF= is the same as that of boxy types, but MLF= needs fewer annotations and we give a detailed comparison between them.

References

  1. Atze Dijkstra. Stepping through Haskell. PhD thesis, Universiteit Utrecht, November 2005.Google ScholarGoogle Scholar
  2. Jaques Garrigue and Didier Rémy. Semi-expicit first-class polymorphism for ML. Journal of Information and Computation, 151:134--169, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. R. Hindley. The principal type scheme of an object in combinatory logic. Transactions of the American Mathematical Society, 146:29--60, December 1969.Google ScholarGoogle Scholar
  4. Mark P. Jones. First-class polymorphism with type inference. In Proceedings of the Twenty Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Mark P. Jones. Qualified types in Theory and Practice. Distinguished Dissertations in Computer Science. Cambridge University Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Didier Le Botlan. MLF: Une extension de ML avec polymorphisme de second ordre et instanciation implicite. PhD thesis, INRIA Rocquencourt, May 2004. Available in English.Google ScholarGoogle Scholar
  7. Didier Le Botlan and Didier Rémy. MLF: Raising ML to the power of System-F. In Proceedings of the International Conference on Functional Programming (ICFP 2003), Uppsala, Sweden, pages 27--38. ACM Press, aug 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Didier Le Botlan and Didier R&3233;my. Recasting MLF. Technical Report 6228, INRIA, Rocquencourt, June 2007. http://gallium.inria.fr/~remy/project/mlf.Google ScholarGoogle Scholar
  9. Daan Leijen. HMF: simple type inference for first-class polymorphism. Work in progress, July 2007.Google ScholarGoogle Scholar
  10. Daan Leijen and Andres Löh. Qualified types for MLF. In The International Conference on Functional Programming (ICFP'05). ACM Press, September 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Xavier Leroy and Michel Mauny. Dynamics in ML. Journal of Functional Programming, 3(4):431--463, 1993.Google ScholarGoogle ScholarCross RefCross Ref
  12. Robert Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:248--375, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Didier R&3233;my and Boris Yakobowski. A graphical presentation of MLF types with a linear-time unification algorithm. In TLDI '07: Proc. of the 2007 ACM SIGPLAN int. workshop on Types in languages design and implementation, pages 27--38, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A type directed translation of MLF to system F

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 42, Issue 9
      Proceedings of the ICFP '07 conference
      September 2007
      331 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1291220
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
        October 2007
        346 pages
        ISBN:9781595938152
        DOI:10.1145/1291151

      Copyright © 2007 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 October 2007

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!