[plt-scheme] full-expanded syntax and internal definitions
> No, so there no local macro definitions in fully expanded code.
If that's true then this must mean that local-expand is not guaranteed
to produce fully-expanded code?
> (define-syntax (quote-expand stx)
(syntax-case stx ()
[(_ e)
(with-syntax ([exp (local-expand #'e 'expression '())])
#'(quote exp))]))
> (quote-expand (lambda ()
(define-syntax foo (syntax-rules () [(_) 42]))
(define y 10)
y))
(lambda () (letrec-syntaxes+values (((foo) (syntax-rules () ((_) 42))))
(((y) (#%datum . 10))) y))
Dave