|
ABSTRACT
The recent years have seen a number of proposals for extending statically typed languages by dynamics or generics. Most proposals --- if not all --- require significant extensions to the underlying language. In this paper we show that this need not be the case. We propose a particularly lightweight extension that supports both dynamics and generics. Furthermore, the two features are smoothly integrated: dynamic values, for instance, can be passed to generic functions. Our proposal makes do with a standard Hindley-Milner type system augmented by existential types. Building upon these ideas we have implemented a small library that is readily usable both with Hugs and with the Glasgow Haskell compiler.
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
|
Martín Abadi, Luca Cardelli, Benjamin Pierce, and Didier Rémy. Dynamic typing in polymorphic languages. Journal of Functional Programming, 5(1):111-130, January 1995.
|
 |
2
|
|
| |
3
|
|
 |
4
|
|
| |
5
|
Roland Backhouse, Patrik Jansson, Johan Jeuring, and Lambert Meertens. Generic Programming --- An Introduction. In S. Doaitse Swierstra, Pedro R. Henriques, and Jose N. Oliveira, editors, 3rd International Summer School on Advanced Functional Programming, Braga, Portugal, volume 1608 of Lecture Notes in Computer Science, pages 28-115. Springer-Verlag, Berlin, 1999.
|
| |
6
|
|
| |
7
|
Dæv Clarke, Ralf Hinze, Johan Jeuring, Andres Löh, and Jan de Wit. The Generic Haskell user's guide. Technical Report UU-CS-2001-26, Universiteit Utrecht, November 2001.
|
 |
8
|
|
 |
9
|
Karl Crary , Stephanie Weirich , Greg Morrisett, Intensional polymorphism in type-erasure semantics, Proceedings of the third ACM SIGPLAN international conference on Functional programming, p.301-312, September 26-29, 1998, Baltimore, Maryland, United States
|
 |
10
|
|
 |
11
|
|
| |
12
|
|
 |
13
|
|
 |
14
|
|
| |
15
|
Ralf Hinze. Memo functions, polytypically! In Johan Jeuring, editor, Proceedings of the 2nd Workshop on Generic Programming, Ponte de Lima, Portugal, pages 17-32, July 2000. The proceedings appeared as a technical report of Universiteit Utrecht, UU-CS-2000-19.
|
 |
16
|
|
| |
17
|
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 2002. To appear.
|
| |
18
|
Ralf Hinze and Simon Peyton Jones. Derivable type classes. In Graham Hutton, editor, Proceedings of the 2000 ACM SIGPLAN Haskell Workshop, volume 41.1 of Electronic Notes in Theoretical Computer Science. Elsevier Science, August 2001. The preliminary proceedings appeared as a University of Nottingham technical report.
|
 |
19
|
|
 |
20
|
Xavier Leroy, Manifest types, modules, and separate compilation, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.109-122, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.176926]
|
| |
21
|
Xavier Leroy and Michel Mauny. Dynamics in ML. Journal of Functional Programming, 3(4):431-463, 1993.
|
 |
22
|
Yasuhiko Minamide , Greg Morrisett , Robert Harper, Typed closure conversion, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.271-283, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237791]
|
| |
23
|
Simon Peyton Jones and John Hughes, editors. Haskell 98 --- A Non-strict, Purely Functional Language, February 1999. Available from http://www.haskell.org/definition/.
|
| |
24
|
Simon Peyton Jones, Andrew Tolmach, and Tony Hoare. Playing by the rules: Rewriting as an optimization technique in GHC. In Ralf Hinze, editor, Proceedings of the 2001 ACM SIGPLAN Haskell Workshop (HW '2001), 2nd September 2001, Firenze, Italy, Electronic Notes in Theoretical Computer Science, Vol. 59, pages 203-233, September 2001. The preliminary proceedings appeared as a Universiteit Utrecht technical report, UU-CS-2001-62.
|
| |
25
|
|
| |
26
|
|
 |
27
|
Mark Shields , Tim Sheard , Simon Peyton Jones, Dynamic typing as staged type inference, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.289-302, January 19-21, 1998, San Diego, California, United States
[doi> 10.1145/268946.268970]
|
 |
28
|
|
 |
29
|
|
| |
30
|
|
 |
31
|
|
 |
32
|
|
| |
33
|
|
CITED BY 26
|
|
André Pang , Don Stewart , Sean Seefried , Manuel M. T. Chakravarty, Plugging Haskell in, Proceedings of the 2004 ACM SIGPLAN workshop on Haskell, September 22-22, 2004, Snowbird, Utah, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Martin Sulzmann , Manuel M. T. Chakravarty , Simon Peyton Jones , Kevin Donnelly, System F with type equality coercions, Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation, January 16-16, 2007, Nice, Nice, France
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Alexey Rodriguez , Johan Jeuring , Patrik Jansson , Alex Gerdes , Oleg Kiselyov , Bruno C. d. S. Oliveira, Comparing libraries for generic programming in haskell, Proceedings of the first ACM SIGPLAN symposium on Haskell, September 25-25, 2008, Victoria, BC, Canada
|
|
|
|
|