ACM Home Page
Please provide us with feedback. Feedback
Type classes in Haskell
Full text PdfPdf (307 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 18 ,  Issue 2  (March 1996) table of contents
Pages: 109 - 138  
Year of Publication: 1996
ISSN:0164-0925
Authors
Cordelia V. Hall  Glasgow Univ., Glasgow, Scotland, UK
Kevin Hammond  Glasgow Univ., Glasgow, Scotland, UK
Simon L. Peyton Jones  Glasgow Univ., Glasgow, Scotland, UK
Philip L. Wadler  Glasgow Univ., Glasgow, Scotland, UK
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 10,   Downloads (12 Months): 75,   Citation Count: 28
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/227699.227700
What is a DOI?

ABSTRACT

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


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.

1
 
2
BLOTT, S. 1991. Type classes. Ph.D. thesis, Dept. of Computing Science, Glasgow Univ., Glasgow, Scotland.
 
3
 
4
CHEN, I~. 1994. Semantics and coherence for parametric type classes. Res. Rep., YALEU/DCS/RR-1003, Dept. of Computer Science, Yale Univ., New Haven, Conn. June.
 
5
6
7
 
8
GIRARD J.-Y. 1972. Interpr6tation functionelle et 61imination des coupures dans l'arithm6tique d'ordre sup6rieure. ThSse de doctorat d'6tat, Universit6 Paris VII, Paris, France.
 
9
 
10
HAMMOND~ K. 1993. Extended type classes, Int. Memo., Dept. of Computer Science, Glasgow Univ., Glasgow, Scotland.
 
11
 
12
HINDLEY~ R. 1969. The principal type scheme of an object in combinatory logic. Trans. Am. Math. Soc. 146, 29-60.
13
 
14
 
15
 
16
JONES M.P. 1992b. A theory of qualified types. D.Phil. thesis, Programming Research Group, Oxford Univ., Oxford, England. Published by Oxford University Press, 1994.
 
17
JONES M. P. 1992c. Efficient implementation of type class overloading. Int. Memo., Programming Research Group, Oxford Univ., Oxford, England.
 
18
JONES, M.P. 1993. Partial Evaluation for dictionary-free overloading. Res. Rep., YALEU/DCS/RR-959, Dept. of Computer Science, Yale Univ., New Haven, Conn. Apr.
 
19
JONES, M. P. 1994. Simplifying and improving qualified types. Res. Rep., YALEU/DCS/RR-1040, Dept. of Computer Science, Yale Univ., New Haven, Conn. June.
 
20
JONES~ M. P. 1995. A system of constructor classes: Overloading and implicit higher-order polymorphism. J. Func. Program. 5, 1, 1-37.
 
21
KAES, S. 1988. Parametric polymorphism. In Proceedings of the 1988 European Symposium on Programming (Nancy, France). Lecture Notes in Computer Science, vol. 300. Springer-Verlag, Berlin.
 
22
 
23
LAUFER~ K. 1993. An extension of Haskell with first-class abstract types. Tech. Rep., Loyola Univ. Chicago, Ill.
24
 
25
MILNER~ R. 1978. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 348-375.
 
26
 
27
28
 
29
 
30
ODERSKY, M. AND LAUFER, K. 1991. Type classes are signatures of abstract types. Tech. Rep., IBM T.J. Watson Research Center, Yorktown Heights, N.Y. May.
 
31
 
32
PEYTON JONES, S.L. AND WADLER, P.L. 1991. A static semantics for Haskell. Int. Memo., Dept. of Computing Science, Glasgow Univ., Glasgow, Scotland.
 
33
 
34
35
 
36
 
37
38
39

CITED BY  29


REVIEW

"Christopher Martin Holt : Reviewer"

Type inferencing in a subset of Haskell that contains overloading (but not pattern matching) is described. The process involves adding extra parameters to overloaded functions, thus making the previously implicit typing explicit. Rules are pro  more...

Collaborative Colleagues:
Cordelia V. Hall: colleagues
Kevin Hammond: colleagues
Simon L. Peyton Jones: colleagues
Philip L. Wadler: colleagues