Re: [racket-users] losing syntax context

2017-03-08 Thread Dan Liebgold
On Wednesday, March 8, 2017 at 11:14:53 AM UTC-8, Jay McCarthy wrote: > > (let ([name-i-want (lambda args body)]) name-i-want) > Yup, that does it. Thanks! > Jay -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group

Re: [racket-users] losing syntax context

2017-03-08 Thread Jay McCarthy
There are a few ways. procedure-rename works at runtime Or you can influence the inferred value name --- http://docs.racket-lang.org/reference/syntax-model.html?q=procedure-rename#%28part._infernames%29 --- by setting the syntax property or expanding to something like (let ([name-i-want (lambda

Re: [racket-users] losing syntax context

2017-03-08 Thread Dan Liebgold
On Wednesday, March 8, 2017 at 10:56:48 AM UTC-8, Jay McCarthy wrote: > You want to use syntax/loc. The error message comes from the lambda, > not from the keyword argument. It could be possible to change where > Yup, that fixes it. Thanks! I experimented with syntax/loc in various places, but

Re: [racket-users] losing syntax context

2017-03-08 Thread Jay McCarthy
You want to use syntax/loc. The error message comes from the lambda, not from the keyword argument. It could be possible to change where lambda looks for the error srcloc, but if you don't want to do that, you can just use syntax/loc in the right spot: http://pasterack.org/pastes/77933 On Wed, Ma

[racket-users] losing syntax context

2017-03-08 Thread Dan Liebgold
I have a syntax transformer that loses enough syntax context that it's error message points to the transformer rather than the usage. Here's an example of what it should do: http://pasterack.org/pastes/89138 This one gives correct syntax in the error message (not in pasterack, but in Dr Racke