Thank you so much, Michael! This is very helpful.
I can see that when this form is used within another internal definition
context, then my version and your version will expand in different order,
and I agree that yours makes more sense. I am unable to come up with a
program where this difference
Explicitly expanding `e` would ensure that the expansion work only has to
happen once, rather than twice. Even so, the fully-expanded syntax will be
expanded again in `syntax-local-bind-syntaxes` and in the expansion.
As far as I've seen, the only thing that liberal define contexts control is
w
Ah, apparently I need syntax-local-identifier-as-binding. Here’s a revised
code that passes the tests.
(begin-for-syntax
(define ((do-it gs ctx) e)
(let loop ([e e])
(define e-expanded (local-expand e
(list gs)
3 matches
Mail list logo