Polymorphic typed defunctionalization and concretization
- Cite this article as:
- Pottier, F. & Gauthier, N. Higher-Order Symb Comput (2006) 19: 125. doi:10.1007/s10990-006-8611-7
- 37 Downloads
Defunctionalization is a program transformation that eliminates functions as first-class values. We show that defunctionalization can be viewed as a type-preserving transformation of an extension of F with guarded algebraic data types into itself. We also suggest that defunctionalization is an instance of concretization, a more general technique that allows eliminating constructs other than functions. We illustrate this point by presenting two new type-preserving transformations that can be viewed as instances of concretization. One eliminates Rémy-style polymorphic records; the other eliminates the dictionary records introduced by the standard compilation scheme for Haskell’s type classes.