|
ABSTRACT
This paper presents type classes, a new approach to ad-hoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the “eqtype variables” of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to issues that arise in object-oriented programming, bounded type quantification, and abstract data types. This paper provides an informal introduction to type classes, and defines them formally by means of type inference rules.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
BEJ88
|
D. BjOrner, A. Ershov, and N.D. Jones, editors, Partial Evaluation and Mixed Computation, North-Holland, 1988 (to appear).
|
 |
CW85
|
|
 |
Car88
|
|
 |
DM82
|
|
 |
FGJM85
|
Kokichi Futatsugi , Joseph A. Goguen , Jean-Pierre Jouannaud , José Meseguer, Principles of OBJ2, Proceedings of the 12th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, p.52-66, January 14-16, 1985, New Orleans, Louisiana, United States
[doi> 10.1145/318593.318610]
|
| |
GR83
|
|
| |
Hin69
|
R. Hindley, The principal type scheme of an object in combinatory logic. Trans. Am. Math. Soc. 146, pp. 29-60, December 1969.
|
| |
HMM86
|
R. Harper, D. MacQueen, and R. Milner, Standard ML. Report ECS-LFCS-86-2, Edinburgh University, Computer Science Dept., 1986.
|
| |
HMT88
|
R. Harper, R. Milner, and M. Tofte, The definition of Standard ML, version 2. Report ECS-LFCS-88-62, Edinburgh University, Computer Science Dept., 1988.
|
| |
Kae88
|
S. Kaes, Parametric polymorphism. In Proceedings of the 2'nd European Symposium on Programming, Nancy, France, March 1988. LNCS 300, Springer-Verlag, 1988.
|
| |
Mil78
|
R. Milner, A theory of type polymorphism in programming. J. Compul. Syst. Sci. 17, pp. 348-375, 1978.
|
 |
Mil84
|
|
| |
Mil87
|
R. Milner, Ch~nges to the Standard ML core language. Report ECS-LFCS-87-33, Edinburgh University, Computer Science Dept., 1987.
|
 |
MP85
|
|
| |
Rey85
|
|
| |
Str67
|
C. Strachey, Fundamental concepts in programming languages. Lecture notes for International Summer School in Computer Programming, Copenhagen, August 1967.
|
| |
Tur85
|
|
| |
Wan87
|
M. Wand, Complete type inference for simple objects. In Proceedings of the Symposium on Logic in Computer Science, Ithaca, NY, June 1987. IEEE Computer Society Press, 1987.
|
CITED BY 106
|
|
|
|
|
|
|
|
Jeffrey R. Lewis , John Launchbury , Erik Meijer , Mark B. Shields, Implicit parameters: dynamic scoping with static types, Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.108-118, January 19-21, 2000, Boston, MA, USA
|
|
|
|
|
|
Martin Odersky , Philip Wadler , Martin Wehr, A second look at overloading, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.135-146, June 26-28, 1995, La Jolla, California, United States
|
|
|
|
|
|
Mark Shields , Tim Sheard , Simon Peyton Jones, Dynamic typing as staged type inference, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.289-302, January 19-21, 1998, San Diego, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dimitrios Vytiniotis , Geoffrey Washburn , Stephanie Weirich, An open and shut typecase, Proceedings of the 2005 ACM SIGPLAN international workshop on Types in languages design and implementation, p.13-24, January 10-10, 2005, Long Beach, California, USA
|
|
|
|
|
|
|
|
|
Andreas Abel , Marcin Benke , Ana Bove , John Hughes , Ulf Norell, Verifying haskell programs using constructive type theory, Proceedings of the 2005 ACM SIGPLAN workshop on Haskell, p.62-73, September 30-30, 2005, Tallinn, Estonia
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Douglas Gregor , Jaakko Järvi , Mayuresh Kulkarni , Andrew Lumsdaine , David Musser , Sibylle Schupp, Generic programming and high-performance libraries, International Journal of Parallel Programming, v.33 n.2, p.145-164, June 2005
|
|
|
Paul Hudak , Simon Peyton Jones , Philip Wadler , Brian Boutel , Jon Fairbairn , Joseph Fasel , María M. Guzmán , Kevin Hammond , John Hughes , Thomas Johnsson , Dick Kieburtz , Rishiyur Nikhil , Will Partain , John Peterson, Report on the programming language Haskell: a non-strict, purely functional language version 1.2, ACM SIGPLAN Notices, v.27 n.5, p.1-164, May 1992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Paul Hudak , John Hughes , Simon Peyton Jones , Philip Wadler, A history of Haskell: being lazy with class, Proceedings of the third ACM SIGPLAN conference on History of programming languages, p.12-1-12-55, June 09-10, 2007, San Diego, California
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Iavor S. Diatchki , Thomas Hallgren , Mark P. Jones , Rebekah Leslie , Andrew Tolmach, Writing systems software in a functional language: an experience report, Proceedings of the 4th workshop on Programming languages and operating systems, October 18-18, 2007, Stevenson, Washington
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Jean-Philippe Bernardy , Patrik Jansson , Marcin Zalewski , Sibylle Schupp , Andreas Priesnitz, A comparison of c++ concepts and haskell type classes, Proceedings of the ACM SIGPLAN workshop on Generic programming, September 20-20, 2008, Victoria, BC, Canada
|
|
|
|
|
|
|
|
|
Julien Brunel , Damien Doligez , René Rydhof Hansen , Julia L. Lawall , Gilles Muller, A foundation for flow-based program matching: using temporal logic and model checking, Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, January 21-23, 2009, Savannah, GA, USA
|
|
|
|
|
|
|
|