Two-level types and parameterized modules (2003)
| Venue: | Journal of Functional Programming |
| Citations: | 7 - 0 self |
BibTeX
@ARTICLE{Sheard03two-leveltypes,
author = {Tim Sheard and Emir Pasalic},
title = {Two-level types and parameterized modules},
journal = {Journal of Functional Programming},
year = {2003},
volume = {14},
pages = {2004}
}
Years of Citing Articles
OpenURL
Abstract
In this paper, we describe two techniques for the efficient, modularized implementation of a large class of algorithms. We illustrate these techniques using several examples, including efficient generic unification algorithms that use reference cells to encode substitutions, and highly modular language implementations. We chose these examples to illustrate the following important techniques that we believe many functional programmers would find useful. First, defining recursive data types by splitting them into two levels: a structure defining level, and a recursive knot-tying level. Second, the use of rank-2 polymorphism inside Haskell’s record types to implement a kind of type-parameterized modules. Finally, we explore techniques that allow us to combine already existing recursive Haskell data-types with the highly modular style of programming proposed here. 1







