Next: CPS Soup, Previous: CPS in Guile, Up: Continuation-Passing Style [Contents][Index]
Unlike Tree-IL, the CPS language is built to be constructed and deconstructed with abstract macros instead of via procedural constructors or accessors, or instead of S-expression matching.
Deconstruction and matching is handled adequately by the match
form from (ice-9 match). See Pattern Matching. Construction
is handled by a set of mutually builder macros:
build-term, build-cont, and build-exp.
In the following interface definitions, consider term and
exp to be built by build-term or build-exp,
respectively. Consider any other name to be evaluated as a Scheme
expression. Many of these forms recognize unquote in some
contexts, to splice in a previously-built value; see the specifications
below for full details.
Construct a CPS term, expression, or continuation.
There are a few more miscellaneous interfaces as well.
A procedural constructor for $arity objects.
Match val against the series of patterns pat..., using
match. The body of the matching clause should be a template in
the syntax of build-term, build-exp, or build-cont,
respectively.
Next: CPS Soup, Previous: CPS in Guile, Up: Continuation-Passing Style [Contents][Index]