2002 · 125 citations · 27 references
ComputingComputer ScienceCompilersProgramming LanguagesSyntaxData TypesFunctional ProgrammingGeneric ProgrammingType CheckingType SystemsExistential TypesGeneric FunctionsGeneric TypesGenerics ImplementationPolymorphic Type SystemsPolymorphism StudiesTyped Lambda Calculus
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.
27
Philip Wadler · 1989 · 776 citations
How to make ad-hoc polymorphism less ad hoc
Philip Wadler, Stephen Blott · 1989 · 770 citations · Full text
Multi-stage programming with explicit annotations
Walid Taha, Tim Sheard · 1997 · 343 citations
A modal analysis of staged computation
Rowan Davies, Frank Pfenning · Journal of the ACM · 2001 · 300 citations