skip to main content
10.1145/237721.237729acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free Access

Putting type annotations to work

Authors Info & Claims
Published:01 January 1996Publication History

ABSTRACT

We study an extension of the Hindley/Milner system with explicit type scheme annotations and type declarations. The system can express polymorphic function arguments, user-defined data types with abstract components, and structure types with polymorphic fields. More generally, all programs of the polymorphic lambda calculus can be encoded by a translation between typing derivations. We show that type reconstruction in this system can be reduced to the decidable problem of first-order unification under a mixed prefix.

References

  1. Aug94.L. Augustsson. Haskell B. user's manual version 0.999.7, October 1994. Distributed with the HBC compiler.Google ScholarGoogle Scholar
  2. BMS80.Rod Burstall, David MacQueen, and Donald T. Sanella. Hope: An experimental applicative language. In Conference Record of the 1980 LISP Conference, pages 136-143, Redwood Estates, California, August 1980. The LISP Company. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Boe89.Hans-J. Boehm. Type inference in the presence of type abstraction. In Proceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation, pages 192-206. ACM, ACM Press, June 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. DM82.Luis Damas and Robin Milner. Principal type schemes for functional programs. In Proc. 9th A CM Symposium on Principles of Programming Languages, January 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Fel90.Matthias Felleisen. On the expressive power of programming languages. In Neil D. Jones, editor, ESOP '90, European Symposium on Programming, pages 134-151. Springer-Verlag, 1990. Lecture Notes in Computer Science 432. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Gir71.J. Girard. Une extension de l'interpretation de GOdel a l'analyse, et son application a l'elimination des coupures dans l'anMyse et la theorie des types. In 2nd Scandznavian Logic Symp., pages 63-92, 1971.Google ScholarGoogle ScholarCross RefCross Ref
  7. Hen93.Fritz Henglein. Type inference with polymorphic recursion. A CM Transactions on Programming Languages and Systems, 15(1):253-289, April 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jon92.Mark P. Jones. Qualified Types: Theory and Pract, ce. D.phil. thesis, Oxford University, September 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jon95.Mark P. Jones. From Hindley-Milner types to first-class structures. In Proc. Hasketl Workshop, La Jolla, pages 1t5-136, June 1995. Yale University Research Report YALEU/DCS/RR-1075.Google ScholarGoogle Scholar
  10. KTU89.A. Kfoury, J. Tiuryn, and P. Urzyczyn. The undecidability of the semi-unification problem. Technical Report BUCS-89-010, Boston University, Oct. 1989. also in Proc. of Symp. on Theory of Computing, Baltimore, Maryland, May 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. KTU93.A.J. Kfoury, J. Tiuryn, and P. Urzyczyn. Type reconstruction in the presence of polymorphic recursion. A CM Transactions on Programming Languages and Systems. 15(1):290-311, April 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. LMM87.J. Lassez, M. Maher, and K. Marriott. Unification revisited. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming. Morgan Kauffman, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. LO94.Konstantin Litufer and Martin Odersky. Polymorphic type inference and abstract data types. A CM Transactions on Programming Languages and Systems, 16(5):1411-1430, September 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. LPar.John Launchbury and Simon Peyton Jones. State in Haskell. Lisp and Symbolic Computation, to appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. McC84.N. McOracken. The typechecking of programs with implicit type structure. In Gilles Kahn, David B. MacQueen, and Gordon D. Plotkin, editors, Semantics of Data Types, pages 301-315. Springer-Verlag, June 1984. Lecture Notes in Computer Science 173. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mil78.Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, Dec 1978.Google ScholarGoogle ScholarCross RefCross Ref
  17. Mil92.Dale Miller. Unification under a mixed prefix. Journal of Symbolic Computation, 14:321-358, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Mit90.John C. Mitchell. Polymorphic type inference and containment, in G6rard Huet, editor, Logical Foundations of Functional Programming, The UT Year of Programming Series, chapter 8. Addison-Wesley Publishing Company, Inc., 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Mor68.J.H. Morris. Lambda-Calculus Models of Programming Languages. PhD thesis, Massachusetts Institute of Technology, 1968. Technical Report MAC-TR-57.Google ScholarGoogle Scholar
  20. MP88.J. Mitchell and G. Plotkin. Abstract types have existential types. A CM Trans. on Programming Languages and Systems, 10(3):470-502, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. MP93.M. Mauny and F. Pottier. An implementation of Carol-Light with existential types. Technical report, INRIA, October 1993. Distributed with the Caml-Light system.Google ScholarGoogle Scholar
  22. Myc84.A. Mycroft. Polymorphic type schemes and recursive definitions. In Proc. 6th Int. Symposium. on Programming, LNCS 167, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. OG89.James William O'Toole and David K. Gifford. Polymorphic type reconstruction. In Proceedings of the A CM SIGPLAN Conference on Programming Language Design and Implementation, pages 207-217. ACM, ACM Press, June 1989.Google ScholarGoogle Scholar
  24. OL95.Martin Odersky and Konstantin Laufer. Type reconstruction in the presence of type scheme annotations. Technical report, University of Karlsruhe, 1995. forthcoming.Google ScholarGoogle Scholar
  25. OWW95.Martin Odersky, Philip Wadler, and Martin Wehr. A second look at overloading. In Proc. A CM Conf. on Functional Programming and Computer Architecture, pages 135-1469, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Per90.N. Perry. The Implementation of Practical Functional Programming Languages. P hD thesis, Imperial College of Science, Technology, and Medicine, University of London, 1990.Google ScholarGoogle Scholar
  27. Pfe88.Frank Pfenning. Partial polymorphic type inference and higher-order unification. In Proceedings of the 1988 A CM Conference on Lisp and Functional Programming, pages 153-163, July 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Rém89.Didier R#my. Typechecking records and variants in a natural extension of ML. In Proc. 16th A CM Symposium on Principles of Programming Languages, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Rém94.Didier R#my. Programming objects with ML- ART, and extension to ML with abstract and record types. In Proc. Theoretical Aspects of Computer Software, pages 321-346, April 1994. Springer LNCS 789. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Rey74.John C. Reynolds. Towards a theory of type structure. In International Programming Symposium, pages 408-425. Springer-Verlag, 1974. Lecture Notes in Computer Science 19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Wel94.J.B. Wells. Typability and type checking in the second order h-calculus are equivalent and undecidable. In Proc. 9th IEEE Symposium on Logic in Computer Science, pages 176-185, July 1994.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Putting type annotations to work

    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
    • Published in

      cover image ACM Conferences
      POPL '96: Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
      January 1996
      423 pages
      ISBN:0897917693
      DOI:10.1145/237721
      • Chairman:
      • Hans-J. Boehm,
      • Conference Chair:
      • Guy Steele

      Copyright © 1996 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 January 1996

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      POPL '96 Paper Acceptance Rate34of148submissions,23%Overall Acceptance Rate824of4,130submissions,20%

      Upcoming Conference

      POPL '25

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader