skip to main content
10.1145/141471.141536acmconferencesArticle/Chapter ViewAbstractPublication PageslfpConference Proceedingsconference-collections
Article
Free Access

Parametric type classes

Published:01 January 1992Publication History

ABSTRACT

We propose a generalization to Haskell's type classes where a class can have type parameters besides the placeholder variable. We show that this generalization is essential to represent container classes with overloaded data constructor and selector operations. We also show that the resulting type system has principal types and present unification and type reconstruction algorithms.

References

  1. CCH+89.P. Canning, W. Cook, W. Hill, W. Olthoff, and J. Mitchell. F-bounded polymorphism for objectoriented programming. In Proc. A CM Conf. Functional Programming Languages and Computer Architecture, pages 273-280, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. COH92.Kung Chen, Martin Odersky, and Paul Hudak. Type inference for parametric type classes. Technical Report YALEU/DCS/RR-900, Dept. of Computer Science, Yale University, New Haven, Conn., May 1992.Google ScholarGoogle Scholar
  3. CU90.Craig Chambers and David Ungax. Iterative type analysis and extended message splitting: Optimizing dynamically-typed object-oriented programs. In Proc. SIGPLAN '90 Conf. on Programming Language Design and Implementation, White Plains, New York, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. DM82.L. Damas and R. Milner. Principal type schemes for functional programs. In Proc. 9th A CM Syrup. on Principles of Programm2ng Languages, pages 207- 212, Jan. 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. HJW91.Paul Hudak, Simon Peyton Jones, and Philip L. Wadler. Report on the programming language Haskell: a non-strict, purely functional language, version 1.1. Technical Report YALEU/DCS/RR-777, Dept. of Computer Science, Yale University, New Haven, Conn., August 1991.Google ScholarGoogle Scholar
  6. Jon91.Mark P. Jones. Type inference for qualified types. Technical Report PRG-TR-10-91, Oxford University Computing Laboratory, Oxford~ UK~ 1991.Google ScholarGoogle Scholar
  7. Jon92a.Mark P. Jones. Coherence for qualified types. Private communication, March 1992.Google ScholarGoogle Scholar
  8. Jon92b.Mark P. Jones. A theory of qualified types. In B. Krieg-Br{ickner, editor, Proco European Sysposium on Programming, pages 287-306~ Springer Verlag, Feburary 1992. LNCS 582. Google ScholarGoogle Scholar
  9. JT81.R.D. Jenks and B.M. Trager. A language for computational algebra. In Proc. A CM Symposium on Symbolic and Algebraic Manipulation, pages 22-29, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Kae88.S. Kaes. Parametric overloading in polymorphic programming languages. In H. Ganzinger, editor, Proc. and European Symosium on Programming, Lecture Notes in Computer Science, Vol. 300, pages 131-144, Nancy, France, March 1988. Springer~Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Lil91.Mark D. Lilibridge. A generalization of type classes. distributed to HaskeU mailing llst, June 1991.Google ScholarGoogle Scholar
  12. MGS89.J. Meseguer~ J. Goguen, and G. Smolka. Ordersorted unification. J. Symbolic Computation, 8:383- 413, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. NS91.T. Nipkow and G. Snelting. Type classes and overloading resolution via order-sorted unification. In J. Hughes, editor, Proc. Con}. on Functional Programming and Computer Architecture, pages 15-28. Springer-Verlag, 1991. LNCS 523. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Rob65.J. Robinson. A machine-oriented logic based on the resolution principle, d. Assoc. Comput. Mach., 12(1):23-41, 1965. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Rou90.Francois Rouaix. Safe run-time overloading. In Seventeenth Annual A GM Syrup. on Principles of Programming Languages, pages 355-366, San Franscico, CA, January 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. VS91.Dennis M. Volpano and Geoffery S. Smith. On the complexity of ML typabillty and overloading. In J. Hughes, editor, Proceedings of Functional Programming and Computer Architecture, pages 15-28. Springer-Verlag, 1991. LNCS 523. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Wad90.P. Wadler. Comprehending monads. In Proc. A CM Conf. on LISP and Functional Programming, pages 61-78, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Wad91.P. Wadler. Continuing monads, August 1991. Tutorial Notes at FPCA'91.Google ScholarGoogle Scholar
  19. WB89.Phil Wadler and Stephen Blott. How to make adhoc polymorphism less ad hoc. In Sixteenth Annual A CM Syrup. on Principles of Programming Languages, pages 60-76. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Parametric type classes

          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
            LFP '92: Proceedings of the 1992 ACM conference on LISP and functional programming
            January 1992
            365 pages
            ISBN:0897914813
            DOI:10.1145/141471

            Copyright © 1992 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 1992

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            Overall Acceptance Rate30of109submissions,28%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader