Re: [racket-users] a question related to bound-identifier=?

2019-08-02 Thread Yongming Shen
I see. Thank you for the clear and detailed explanation! On Friday, August 2, 2019 at 8:37:15 AM UTC-4, Matthew Flatt wrote: > > This is certainly confusing. > > The missing piece of the puzzle has to do with expansion in an > immediate module body. In that context, the macro expander adds the

Re: [racket-users] a question related to bound-identifier=?

2019-08-02 Thread Matthew Flatt
This is certainly confusing. The missing piece of the puzzle has to do with expansion in an immediate module body. In that context, the macro expander adds the module's "inside-edge" scope (unshifted) to the result of any macro expansion. So, the expander is adding back the inside-edge scope that

Re: [racket-users] a question related to bound-identifier=?

2019-07-29 Thread Yongming Shen
I think I found a case where id-a binds id-b when (would-bind? id-a id-b) returns #f: (define-syntax bind-test0 (lambda (stx) (define id #'x) (define shifted-id (syntax-shift-phase-level id -1)) (displayln (would-bind? id shifted-id)) (syntax-case stx () [(_ e)

Re: [racket-users] a question related to bound-identifier=?

2019-07-26 Thread Matthew Flatt
At Thu, 25 Jul 2019 18:55:18 -0700 (PDT), Yongming Shen wrote: > Based on my understanding, (bound-identifier=? id-a id-b) only returns true > if id-a would bind id-b AND id-b would bind id-a. Also based on my > understanding, id-a will bind id-b doesn't imply that id-b will bind id-a. > So, if

[racket-users] a question related to bound-identifier=?

2019-07-25 Thread Yongming Shen
Hi there, Based on my understanding, (bound-identifier=? id-a id-b) only returns true if id-a would bind id-b AND id-b would bind id-a. Also based on my understanding, id-a will bind id-b doesn't imply that id-b will bind id-a. So, if I only want to check whether id-a will bind id-b, which