Re: [racket-users] Obtain use-site source information

2018-11-21 Thread Matthew Butterick
> On Nov 21, 2018, at 6:44 PM, Shu-Hung You > wrote: >> (PS ignore "at L ..." — apparently `gensym` in RacketCS is broken.) Correction: it's not broken. I overlooked the fact that `gensym` is allowed to produce symbols that print the same way, though sometimes it does not. -- You received

Re: [racket-users] Obtain use-site source information

2018-11-21 Thread Shu-Hung You
Thanks! However, I am trying to avoid changing USE. The trouble is that there are too many macros using X that I don't understand, and these macros themselves are more than one layers deep. It is nearly impossible to thread the syntax property through the macros.On Wed, Nov 21, 2018 at 7:30 PM Matt

Re: [racket-users] Obtain use-site source information

2018-11-21 Thread Matthew Butterick
(PS ignore "at L ..." — apparently `gensym` in RacketCS is broken.) > ;; Result: > ;; "at L (unsaved-editor:24.3) ; #f #f" > ;; "at L (unsaved-editor:25.3) ; #f #f" > ;; "at L (unsaved-editor:26.0) ; #f #f" > ;; "at L (unsaved-editor:27.0) ; #f #f" -- You received this message because you are s

Re: [racket-users] Obtain use-site source information

2018-11-21 Thread Matthew Butterick
> On Nov 21, 2018, at 12:44 PM, Shu-Hung You > wrote: > > It works, but it would be better if (X 'USE) can log information about > its uses at B and C in addition to the source location A for debugging > purpose. If I don't want to change the implementation of USE, is there > a way for X to obt

[racket-users] Obtain use-site source information

2018-11-21 Thread Shu-Hung You
I have a macro (let's called it X) that generates unique symbols at all its uses. I need all its uses to be distinguishable from each other. (define-syntax X (syntax-parser [(_ stx) (define label (gensym 'L)) #`(log-error "at ~a (~a) ; ~a ~a" '#,label