ACM Home Page
Please provide us with feedback. Feedback
An open and shut typecase
Full text PdfPdf (242 KB)
Source Types In Languages Design And Implementation archive
Proceedings of the 2005 ACM SIGPLAN international workshop on Types in languages design and implementation table of contents
Long Beach, California, USA
Pages: 13 - 24  
Year of Publication: 2005
ISBN:1-58113-999-3
Authors
Dimitrios Vytiniotis  University of Pennsylvania
Geoffrey Washburn  University of Pennsylvania
Stephanie Weirich  University of Pennsylvania
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 2,   Downloads (12 Months): 16,   Citation Count: 4
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/1040294.1040296
What is a DOI?

ABSTRACT

Two different ways of defining ad-hoc polymorphic operations commonly occur in programming languages. With the first form polymorphic operations are defined inductively on the structure of types while with the second form polymorphic operations are defined for specific sets of types.In intensional type analysis operations are defined by induction on the structure of types. Therefore no new cases are necessary for user-defined types, because these types are eQuivalent to their underlying structure. However, intensional type analysis is "closed" to extension, as the behavior of the operations cannot be differentiated for the new types, thus destroying the distinctions that these types are designed to express.Haskell type classes on the other hand define polymorphic operations for sets of types. Operations defined by class instances are considered "open"---the programmer can add instances for new types without modifying existing code. However, the operations must be extended with specialized code for each new type, and it may be tedious or even impossible to add extensions that apply to a large universe of new types.Both approaches have their benefits, so it is important to let programmers decide which is most appropriate for their needs. In this paper, we define a language that supports both forms of ad-hoc polymorphism, using the same basic constructs.


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
D. Clarke, R. Hinze, J. Jeuring, A. Löh, and J. de Wit. The Generic Haskell user's guide. Technical Report UU-CS-2001-26, Utrecht University, 2001.
 
3
R. Cockett and T. Fukushima. About Charity. Yellow Series Report No. 92/480/18, Department of Computer Science, The University of Calgary, June 1992.
4
 
5
6
 
7
V. Gapeyev and B. Pierce. Regular object types. In Proc. 10th International Workshops on Foundations of Object-Oriented Languages, FOOL '03, New Orleans, LA, USA, Jan. 2003.
 
8
J. Garrigue. Programming with polymorphic variants. In ML Workshop, Sept. 1998.
 
9
J.-Y. Girard. Interprétation fonctionelle et élimination des coupures de l'arithmétiQue d'ordre supérieur. PhD thesis, Université Paris VII, 1972.
10
11
12
13
 
14
R. Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2--3):129--159, 2002. MPC Special Issue.
 
15
R. Hinze and S. Peyton Jones. Derivable type classes. In G. Hutton, editor, Proceedings of the Fourth Haskell Workshop, Montreal, Canada, September 17, 2000, volume 41.1 of Electronic Notes in Theoretical Computer Science. Elsevier Science, Aug. 2000.
 
16
17
 
18
C. Jay. Programming in FISh. International Journal on Software Tools for Technology Transfer, 2:307--315, 1999.
 
19
20
21
22
 
23
24
 
25
S. Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.
26
 
27
 
28
J. C. Reynolds. Types, abstraction and parametric polymorphism. In Information Processing '83, pages 513--523. North-Holland, 1983. Proceedings of the IFIP 9th World Computer Congress.
29
30
31
32
 
33
D. Vytiniotis, G. Washburn, and S. Weirich. An open and shut typecase. Technical Report MS-CIS-04-26, University of Pennsylvania, 2004. Available from http://www.cis.upenn.edu/~dimitriv/itaname.
34
 
35
 
36
 
37
M. Zenger and M. Odersky. Independently extensible solutions to the expression problem. Technical Report IC/2004/33, EPFL Lausanne, Switzerland, 2004.


Collaborative Colleagues:
Dimitrios Vytiniotis: colleagues
Geoffrey Washburn: colleagues
Stephanie Weirich: colleagues