How to make ad-hoc polymorphism less ad hoc

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.

[1]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[2]  Dines Bjørner,et al.  Partial Evaluation and Mixed Computation: Proceedings of the IFIP TC2 Workshop, Gammel Avernaes, Denmark, 18-24 Oct., 1987 , 1988 .

[3]  Mitchell Wand,et al.  Complete Type Inference for Simple Objects , 1987, LICS.

[4]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[5]  John C. Reynolds,et al.  Three Approaches to Type Structure , 1985, TAPSOFT, Vol.1.

[6]  José Meseguer,et al.  Principles of OBJ2 , 1985, POPL.

[7]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[8]  Robin Milner,et al.  The definition of standard ML, Version 3 , 1988 .

[9]  D. A. Turner,et al.  Miranda: A Non-Strict Functional language with Polymorphic Types , 1985, FPCA.

[10]  Dines Bjørner,et al.  Partial Evaluation and Mixed Computation , 1987 .

[11]  Robin Milner,et al.  A proposal for standard ML , 1984, LFP '84.

[12]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[13]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

[14]  Luca Cardelli,et al.  Structural subtyping and the notion of power type , 1988, POPL '88.

[15]  Robin Milner,et al.  Definition of standard ML , 1990 .

[16]  Neil D. Jones Proceedings of the 3rd European Symposium on Programming , 1990 .

[17]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[18]  Robin Milner,et al.  The definition of standard ML Version 2: LFCS report ECS-LFCS-88-62 , 1988 .

[19]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[20]  Robin Milner,et al.  Standard ML: Report ECS-LFCS-86-2 , 1986 .