[R6RS] new syntax srfi draft, reference implementation

dyb at cs.indiana.edu dyb at cs.indiana.edu
Mon Jun 19 14:00:51 EDT 2006


>     An error is signalled if the first pass of macro-expansion
>     of the body (to determine the internal definitions) would
>     be different when expanded in a syntactic environment that
>     excludes all of those identifiers than when expanded in a
>     syntactic environment that binds all of those identifiers
>     to the meanings they are given following macro expansion.

A statement in terms of the identifiers and their scope might be
preferable, but it's not generally possible to detect when the expansion
would differ without expanding the forms twice, and then side effects
performed and observed by one or more of the transformers might cause a
body expansion to change even when the environment has no affect.  It's a
bit like restating the letrec or letrec* restriction in terms of the
values and effects of the letrec or letrec* form rather than in the more
operational sense of whether a LHS variable is referenced prematurely.

Kent



More information about the R6RS mailing list