ACM Home Page
Please provide us with feedback. Feedback
Type-safe cast: (functional pearl)
Full text PdfPdf (372 KB)
Source International Conference on Functional Programming archive
Proceedings of the fifth ACM SIGPLAN international conference on Functional programming table of contents
Pages: 58 - 67  
Year of Publication: 2000
ISBN:1-58113-202-6
Also published in ...
Author
Stephanie Weirich  Department of Computer Science, Cornell University, Ithaca, NY
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 2,   Downloads (12 Months): 35,   Citation Count: 20
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/351240.351246
What is a DOI?

ABSTRACT

In a language with non-parametric or ad-hoc polymorphism, it is possible to determine the identity of a type variable at run-time. With this facility, we can write a function to convert a term from one abstract type to another, if the two hidden types are identical. However, the naive implementation of this function requires that the term be destructed and rebuilt. In this paper, we show how to eliminate this overhead using higher-order type abstraction. We demonstrate this solution in two frameworks for ad-hoc polymorphism: intensional type analysis and type classes.


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
 
4
J.-Y. Girard. Interpretation fonctionelle et elimination des coupures de l'arithmetique d'ordre superieur. PhD thesis, Universite Paris VII, 1972.
 
5
6
 
7
 
8
M. P. Jones. A system of constructor classes: overloading and implicit higher-order polymorphism. Journal of Functional Programming, 5(1), Jan. 1995.
 
9
 
10
11
12
 
13
S. Peyton Jones and J. Hughes (editors). Report on the programming language Haskell 98, a non-strict purely functional language. Technical Report YALEU/DCS/RR-1106, Yale University, Department of Computer Science, Feb. 1999. Available from http://www.haskell.org/definition/.
 
14
15
16
 
17
S. Weeks. NJ PearLS dynamically extensible data structures in Standard ML. Talk presented at New Jersey Programming Languages and Systems Seminar, Sept. 1998. Transparencies available at http://www.star-lab.com/sweeks/talks.html. 65

CITED BY  20