I'm having trouble understanding quasisyntax/loc in some cases.

If I have the following example code:

#lang racket

(define here #'here)
(define stx0 (syntax/loc here #'Y))
(define y #'Y)
(define stx1 (quasisyntax/loc here #,y))

(displayln (format "here : line ~a" (syntax-line here)))
(displayln (format "stx0 : line ~a" (syntax-line stx0)))
(displayln (format "stx1 : line ~a" (syntax-line stx1)))

It prints :
here : line 3
stx0 : line 3
stx1 : line 5

I expect stx1 to also be at line 3 where `here` is defined. Is this example
an incorrect use of quasisyntax/loc? What am I missing?


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