(require racket/stxparam racket/splicing)
(define-syntax-parameter f #f)
(splicing-syntax-parameterize ([f #t])
  (begin-for-syntax (printf "~a~%" (syntax-parameter-value #'f)))
  (void))

This prints #f.

If I instead add a macro indirection

(define-syntax (blah stx) (syntax-case stx () [(_ f) (printf "~a~%" 
(syntax-parameter-value #'f)) #'(void)]))

Then

(splicing-syntax-parameterize ([f #t])
  (blah f)
  (void))

prints #t

This is messing up some of my syntax parameters that build their definitions 
from the existing value in the parameter. Why does the first program have this 
behavior? This feels bug-like to me.
-Ian
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to