Hi all -<br><br>Is there something analogous to (provide) but for the transformation environment, e.g. provide-for-syntax? <br><br>It seems that making a module a custom language doesn't automatically introduce the definitions into transformation environment,
i.e. I still need to use (require-for-syntax). The example below demonstrates the need. Am I missing something? <br><br>Thanks,<br>yinso <br><br>; custom language module foo <br>(module foo mzscheme<br> (define (show a . rest)
<br> (map display (cons a rest))<br> (newline)) <br> (define (add a b) <br> (show a " " b)<br> (+ a b))<br> (provide (all-defined) (all-from mzscheme))) <br><br>; use foo as the language <br>(module bar foo
<br> ; require-for-syntax is needed to make it work...<br> (require-for-syntax foo) <br> ; comment above and get error => <br> ; expand: unbound variable in module (transformer environment) in: add<br> (define-syntax bar
<br> (lambda (stx)<br> (syntax-case stx () <br> ((_ val1 val2) <br> (with-syntax ((result (datum->syntax-object <br> #'stx <br> (add (syntax-object->datum #'val1)
<br> (syntax-object->datum #'val2))))) <br> #'result))))) <br> (provide (all-defined))) <br><br>; test <br>(require bar) <br>(bar 5 10)<br>; => 15 with (require-for-syntax foo)
<br>; => error without <br><br>