Type Classes in Haskell

This paper defines a set of type inference rules for resolving over-loading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the Hindley-Milner inference rules. In contrast to other work on type classes, the rules presented here relate directly to user programs. An innovative aspect of this work is the use of second-order lambda calculus to record type information in the program.

[1]  Simon Peyton Jones,et al.  A static semantics for Haskell , 1992 .

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

[3]  Paul Hudak,et al.  Parametric type classes , 1992, LFP '92.

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

[5]  Tobias Nipkow,et al.  Type Classes and Overloading Resolution via Order-Sorted Unification , 1991, FPCA.

[6]  Gordon V. Cormack,et al.  Type-dependent parameter inference , 1990, PLDI '90.

[7]  Geoffrey Smith,et al.  On the Complexity of ML Typability with Overloading , 1991, FPCA.

[8]  Stephen Blott,et al.  Implementing Haskell Type Classes , 1989, Functional Programming.

[9]  Lennart Augustsson,et al.  Implementing Haskell overloading , 1993, FPCA '93.

[10]  Gérard Huet,et al.  Logical Foundations of Functional Programming , 1990 .

[11]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[12]  Mark P. Jones A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[13]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.

[14]  François Rouaix,et al.  Safe run-time overloading , 1989, POPL '90.

[15]  Martin Odersky,et al.  Polymorphic type inference and abstract data types , 1994, TOPL.

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

[17]  Martin Odersky,et al.  Type Classes are Signatures of Abstract Types , 1991, Declarative Programming.

[18]  Robin Milner,et al.  Commentary on standard ML , 1990 .

[19]  Tobias Nipkow,et al.  Type checking type classes , 1993, POPL '93.

[20]  Mark P. Jones A Theory of Qualified Types , 1994, Sci. Comput. Program..