[plt-scheme] Expanding into this-expression-file-name

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Tue Aug 22 09:31:55 EDT 2006

Hi all,

I have a macro that expands into this-expression-file-name.
 I want the file name of the point of use, but I get the
file name of the point of definition.  How do I get the
macro to use the source information of the expansion point?
 Current code below.


  ;; syntax this-expression-benchmark-log-file : () -> path
  (define-syntax (this-expression-benchmark-log-file stx)
    (syntax-case stx ()
       ;; result is the same w/ just syntax instead of
       (syntax/loc stx
           (path->string (this-expression-file-name))

Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.