Submitter's Name: Jussi Piitulainen
Submitter's Email Address: jpiitula at ling dot helsinki dot fi
Draft Version of Report: 6th
Summary: Internal syntax definitions vs a body with definitions being a letrec*
I desire a clarification on how a body that begins with internal definitions can be equivalent to a letrec* when syntax definitions are valid wherever definitions are.
The coverage of the related issues in the report has improved much since I last read it. I'm still not quite satisfied about this particular issue: the report seems to me to be silent, or at best much more implicit than I like, about how a body like the following is equivalent to a letrec*. There is no room in a letrec* for the syntax definition:(lambda () ;say (define (f x) ...) ;the body begins (define-syntax ...) (f ...))
If there is a sentence or two that would make the intent of the authors explicit, please add them to the report (in 5.2.2 where the crucial statement of the equivalence is made). Possibly it is something about an "expanded body" not containing the syntax-definitions any more, but I feel like I'm guessing here and looking for some statement that is not there in the report.
I'm concerned because I like the equivalence and wish it to be true.
Relevant sites in the report follow (and a couple of related lesser concerns that turn up when I was investigate this, but it is the issue above that I formally wish to be clarified).
(begin <expression or definition> ...) may appear as part of a <body>, [...] rationale: [macro output]
... valid ... at the _beginning_ of a <body>. [my emphasis]
An expanded <body> containing internal definitions can always be converted into a completely equivalent letrec* expressions.
Syntax definitions are valid wherever definitions are.
<body> --> <definition>* <sequence>
<definition> --> ... | <syntax definition> | ...
Finally, I still have a related concern about <body>: the entry on lambda expressions does not tell the truth about <body> allowing internal definitions, yet several binding constructs refer to it as being authoritative about <body>:
... <body> should be a sequence of one or more expressions. [this does not allow internal definitions]
... <body> should be a sequence of zero or more expressions followed by a sequence of one or more expressions as described in section 4.1.4. ... [this appears in every binding construct and is fine]
Finally finally, "body" is not an index entry (p. 77) and it should be. Probably it should point to 4.1.4 but, as noted above, that site does not tell the truth about <body>, or body, and maybe to 5.2.2, where I'm formally seeking clarification. Thank you for your attention.