[racket-dev] some surprising behavior with syntax-parameterize and lexical info
> (define-syntax (def stx)
> (syntax-case stx ()
> [(_ (name args ...) body ...)
> (with-syntax ([function-stx stx])
> (syntax/loc stx
> (define (name args ...)
> (splicing-syntax-parameterize ([current-def
> (quote-syntax fuunction-stx)])
> body ...))))]))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> ....Wait, what?
To follow up on this, change the test code at the bottom to:
(let ()
(define x 42)
(def (f x) (* (outer x) x))
(f 2))
and you'll see an error here with your version. My apologies for not
having this more robust test case in place.