[plt-scheme] why does local-expand leave letrec-syntaxes+values
Local-expand, when expanding a letrec-syntaxes+values, expands the body
using the declared syntax expanders, but leaves the letrec-syntaxes
+values in place, whereas expand transforms it into a letrec-values.
Why is this?
For example:
> (define-syntax (go stx)
(syntax-case stx ()
[(_ s) (begin (display (syntax-object->datum (local-expand #'s
'expression null)))
#'(void))]))
> (go (letrec-syntaxes+values () () 4))
(letrec-syntaxes+values () () (#%datum . 4))
> (syntax-object->datum (expand #'(letrec-syntaxes+values () () 4)))
(begin (#%datum . 4))
Thanks,
sam th