Got my answer from another discussion: https://groups.google.com/d/msg/racket-users/qW-NZN2pwgk/y309YUwqEwAJ
On Saturday, July 27, 2019 at 12:56:33 AM UTC-4, Yongming Shen wrote: > > Hi, > > It seems that after an identifier has been shifted > by syntax-shift-phase-level, the original identifier can bind the shifted > identifier, but not the other way around. I think the correct behavior is > that neither should bind the other. The following code can be used to test > this. > > (define-syntax bind-test0 > > (lambda (stx) > > (define id #'x) > > (define shifted-id (syntax-shift-phase-level id -1)) > > (syntax-case stx () > > [(_ e) > > #`(let ([#,id e]) > > (displayln #,shifted-id))]))) > > > (define-syntax bind-test1 > > (lambda (stx) > > (define id #'x) > > (define shifted-id (syntax-shift-phase-level id -1)) > > (syntax-case stx () > > [(_ e) > > #`(let ([#,shifted-id e]) > > (displayln #,id))]))) > > > (bind-test0 100) would display 100, but (bind-test1 100) would raise an > error. I'm new to Racket, so if this is in fact the correct behavior, a > pointer to some related documentation would be appreciated. > > > Thanks, > > Yongming > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/4a31b9c2-7fcf-4bec-bfc3-3aaa44df1cc3%40googlegroups.com.

