> On Aug 31, 2018, at 4:14 PM, Alex Harsanyi <alexharsa...@gmail.com> wrote:
> 
> Thanks for this solution, it works.  While I understand what is being done, I 
> do not understand why it is necessary....

>From the docs:

"The path is normally computed by taking a relative path result from expr and 
adding it to a path for the enclosing file ... If the expression has no source 
module, the syntax-source location associated with the form is used" [1]

IOW when you wrap `define-runtime-path` in a macro, the "syntax-source location 
associated with the form" becomes that of the macro-definition site. In this 
case, we are overriding this behavior by building the path manually with the 
`syntax-source` we prefer (namely, that of the calling site)


[1] 
http://docs.racket-lang.org/reference/Filesystem.html#(form._((lib._racket%2Fruntime-path..rkt)._define-runtime-path))
 
<http://docs.racket-lang.org/reference/Filesystem.html#(form._((lib._racket/runtime-path..rkt)._define-runtime-path))>



-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to