Ah, apparently I need syntax-local-identifier-as-binding. Here’s a revised
code that passes the tests.
(define ((do-it gs ctx) e)
(let loop ([e e])
(define e-expanded (local-expand e
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
Mail list logo