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.
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- Jon91.Mark P. Jones. Type inference for qualified types. Technical Report PRG-TR-10-91, Oxford University Computing Laboratory, Oxford~ UK~ 1991.Google Scholar
- Jon92a.Mark P. Jones. Coherence for qualified types. Private communication, March 1992.Google Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Lil91.Mark D. Lilibridge. A generalization of type classes. distributed to HaskeU mailing llst, June 1991.Google Scholar
- MGS89.J. Meseguer~ J. Goguen, and G. Smolka. Ordersorted unification. J. Symbolic Computation, 8:383- 413, 1989. Google ScholarDigital Library
- 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 ScholarDigital Library
- Rob65.J. Robinson. A machine-oriented logic based on the resolution principle, d. Assoc. Comput. Mach., 12(1):23-41, 1965. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Wad90.P. Wadler. Comprehending monads. In Proc. A CM Conf. on LISP and Functional Programming, pages 61-78, June 1990. Google ScholarDigital Library
- Wad91.P. Wadler. Continuing monads, August 1991. Tutorial Notes at FPCA'91.Google Scholar
- 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 ScholarDigital Library
Index Terms
- Parametric type classes
Recommendations
Static type inference for parametric classes
OOPSLA '89: Conference proceedings on Object-oriented programming systems, languages and applicationsCentral features of object-oriented programming are method inheritance and data abstraction attained through hierarchical organization of classes. Recent studies show that method inheritance can be nicely supported by ML style type inference when ...
Static type inference for parametric classes
Special issue: Proceedings of the 1989 ACM OOPSLA conference on object-oriented programmingCentral features of object-oriented programming are method inheritance and data abstraction attained through hierarchical organization of classes. Recent studies show that method inheritance can be nicely supported by ML style type inference when ...
Comments