Re: [racket-users] question on quasisyntax/loc

2018-05-08 Thread Luke Whittlesey
Very nice explanation. Thank you! On Tue, May 8, 2018 at 11:08 AM, Alexis King wrote: > This behavior is intentional, though it could perhaps be more clearly > documented. The behavior is hinted at in the documentation for > syntax/loc: > > > Like syntax, except that the immediate resulting synt

Re: [racket-users] question on quasisyntax/loc

2018-05-08 Thread Alexis King
This behavior is intentional, though it could perhaps be more clearly documented. The behavior is hinted at in the documentation for syntax/loc: > Like syntax, except that the immediate resulting syntax object takes > its source-location information from the result of stx-expr (which > must produc

[racket-users] question on quasisyntax/loc

2018-05-08 Thread Luke Whittlesey
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))) (disp