ACM Home Page
Please provide us with feedback. Feedback
Scrap your boilerplate with class: extensible generic functions
Full text PdfPdf (203 KB)
Source International Conference on Functional Programming archive
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming table of contents
Tallinn, Estonia
SESSION: Session 7 table of contents
Pages: 204 - 215  
Year of Publication: 2005
ISBN:1-59593-064-7
Also published in ...
Authors
Ralf Lämmel  Microsoft Corp.
Simon Peyton Jones  Microsoft Research
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 2,   Downloads (12 Months): 27,   Citation Count: 14
Additional Information:

abstract   references   cited by   index terms   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/1086365.1086391
What is a DOI?

ABSTRACT

The 'Scrap your boilerplate' approach to generic programming allows the programmer to write generic functions that can traverse arbitrary data structures, and yet have type-specific cases. However, the original approach required all the type-specific cases to be supplied at once, when the recursive knot of generic function definition is tied. Hence, generic functions were closed. In contrast, Haskell's type classes support open, or extensible, functions that can be extended with new type-specific cases as new data types are defined. In this paper, we extend the 'Scrap your boilerplate' approach to support this open style. On the way, we demonstrate the desirability of abstraction over type classes, and the usefulness of recursive dictionarie.


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
 
3
L Cardelli. Amber. In G Cousineau, PL Curien, and B Robinet, editors, Combinators and functional programming languages. LNCS 242, Springer Verlag, 1986.
4
5
6
 
7
 
8
Simon D. Foster. "HAIFA: The Haskell Application Interoperation Framework Architecture"; web site, 2004--2005. http://www.repton-world.org.uk/mediawiki/index.php/HAIFA_Wiki.
9
10
 
11
Ralf Hinze and Simon Peyton Jones. Derivable type classes. In Graham Hutton, editor, Proceedings of the 2000 Haskell Workshop, Montreal, number NOTTCS-TR-00-1 in Technical Reports, September 2000.
 
12
RJM Hughes. Restricted data types in haskell. In Erik Meijer, editor, Proceedings of the 1999 Haskell Workshop, number UU-CS-1999-28 in Technical Reports, 1999. ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1999/1999-28.pdf.
13
14
15
16
 
17
K Zhuo Ming Lu and M Sulzmann. An implementation of subtyping among regular expression types. In Proc Asian Programming Languages Symposium (APLAS'04), volume 3302 of Lecture Notes in Computer Science, pages 57--73. Springer Verlag, 2004.
 
18
19
 
20
Konstantinos F. Sagonas, Terrance Swift, and David Scott Warren. An abstract machine for efficiently computing queries to well-founded models. J. Log. Program., 45(1--3):1--41, 2000.
21
22
23

CITED BY  15
 
 
 

Collaborative Colleagues:
Ralf Lämmel: colleagues
Simon Peyton Jones: colleagues