Re: [racket-users] Forwarding syntax or srcloc

2017-07-05 Thread William G Hatch
The reason why you are getting the source location from b.rkt is that in `mk-data` you are getting the info from `stx`. In this case, `stx` is the filled-in template you get from `simple-data` in b.rkt. The pattern variables `name` and `x` are filled in with `unlucky` and `262`, which do have lo

Re: [racket-users] Forwarding syntax or srcloc

2017-07-05 Thread Alex Knauth
> On Jul 4, 2017, at 4:39 PM, reilithion wrote: > > I need to somehow forward the srcloc of its use-location. Look up syntax/loc. You should use it in simple-data to forward the source location to mk-data. > There are going to be a lot of macros like simple-data, and some of them may > be wr

Re: [racket-users] Forwarding syntax or srcloc

2017-07-05 Thread Matthew Butterick
> On Jul 4, 2017, at 1:39 PM, reilithion wrote: > > I'd like to be able to get source location information from behind two or > more layers of macros. > > Unfortunately, the srcloc that gets stored ends up being the location of the > simplifying macro. Not what I want. I need to somehow forwa