[<<][staapl][>>][..]
Thu Mar 13 17:41:54 EDT 2008

module path


more confusion:

  resolve-module-path could maybe be used in combination
  with (syntax-source-module) to resolve relative references?


* have a look at module index :

EDIT:

----- test.ss:

#lang scheme/base
(require
 (for-syntax
  scheme/base))

(define-syntax (foo stx)
  (printf "~a\n"
          (module-path-index-resolve
           (syntax-source-module stx)))
  (datum->syntax stx ''bla))

(foo)

gives:

image> (require (file "/tmp/test.ss"))
'test
bla

so it returns a symbol instead of a path..


EDIT:

incredible.. this also works, but only in the dynamic extent of syntax
transformers (why?) :

(define (module-mapped-symbols module-path)
  (let-values
      (((base-phase template-phase label-phase)
        (syntax-local-module-exports module-path)))
    base-phase))




[Reply][About]
[<<][staapl][>>][..]