[plt-scheme] Defining a transformation time path, or setting module-language to something useful

From: Noel Welsh (noelwelsh at gmail.com)
Date: Wed Jun 24 11:55:13 EDT 2009

Hello,

I'm trying to set the module-language syntax property so I can
recognise imports in a particular language. The docs state this
property should be set to a

 vector of three elements where the first is a module path (in the
sense of module-path?) ...

where the module-path? corresponds to the module defining the
language. I thought I could do something like:

(define-runtime-path here ".")
...
     (syntax-property
      #'(#%plain-module-begin ...)
      'module-language
      (vector (build-path here "module.ss") 'module-language 'javascript)))]))

However here is not defined at transformation time. So how do I create
a useful value to place within the property? Do I just hardcode it?

Thanks,
N.


Posted on the users mailing list.