I wrote a simple program that determines whether a piece of syntax is original 
in two different ways:

(define-syntax (print-original stx)
  (syntax-case stx ()
    [(_ datum)
     (begin
       (displayln (syntax-original? #'datum))
       #'#'datum)]))

(syntax-original? (print-original 'foo))

Running it prints #f, then #t. This seems to imply that #'datum is not 
considered syntax-original? within the syntax transformer, but in the 
expansion, it is. Stepping though the expression within the macro stepper, the 
identifier always seems to be considered original, so I would expect both cases 
to be #t.

Why is the result of syntax-original? different within the two contexts? If 
this is the intended behavior, could it maybe be explained in the documentation?

Thanks,
Alexis

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to