I was wondering of the behaviour of the following is specified by the document.
(let ((x 1))
(let-syntax
((foo (lambda (_)
(let ((x 'whatever))
(syntax x))))))
(foo))
I believe both the Chez|MzScheme result (an error) or the SRFI-72 result (= 1)
could be justified by the text:
"A reference to an identifier introduced into the output of a transformer refers
to the closest enclosing binding for the introduced identifier",
since, for what it is worth, according to the point of view of SRFI-72, the
(SYNTAX X) that appears after expanding the inner LET is not yet a reference
but is viewed as quoted data. It only becomes the reference X after expanding
(FOO) in the scope of the outer LET where X has the binding 1.
I do not have an objection against the Chex|MzScheme interpretation. I just
think it would be good if the document could specify the behaviour either way.
Regards
Andre