3 - Binding Time Made Explicit
Published online by Cambridge University Press: 12 October 2009
Summary
Neither Miranda, Standard ML nor the enriched λ-calculus has an explicit distinction between kinds of binding times. However, for higher-order functions we can distinguish between the parameters that are available and those that are not. In standard compiler terminology this corresponds to the distinction between compile-time and run-time. The idea is now to capture this implicit distinction between binding times and then to annotate the operations of the enriched λ-calculus accordingly.
In this chapter we present such a development for the enriched λ-calculus by defining a so-called 2-level λ-calculus. To be precise, Section 3.1 first presents the syntax of the 2-level λ-calculus and the accompanying explanations indicate how it may carry over to more than two levels or a base language different from the typed λ-calculus. Next we present well-formedness conditions for 2-level λ-expressions and again we sketch the more general setting. Of the many well-formedness definitions that are possible we choose one that interacts well with the approach to combinator introduction to be presented in Chapter 4. Section 3.2 then studies how to transform binding time information (in the form of 2-level types) into an already typed λ-expression. This transformation complements the transformation developed in Section 2.2.
The 2-Level λ-Calculus
We shall use the types of functions to record when their parameters will be available and their results produced.
- Type
- Chapter
- Information
- Two-Level Functional Languages , pp. 33 - 78Publisher: Cambridge University PressPrint publication year: 1992