Peter Bex wrote: > This won't work. "rename" is operating in the syntactic environment > of the transformer. You can pass it as a procedure to some other module, > but that won't change its internal state.
So, is RENAME closed upon the environment in which ER-MACRO-TRANSFORMER is called? So I can do something like: (module (for-expand) (the-transformer) (import (scheme) (chicken syntax)) (define (the-transformer input-form.stx rename compare) (define %fx+ (rename 'fx+)) ---) #| end of module |#) (module (for-runtime) () (import (scheme) (chicken syntax) (chicken fixnum)) (import-for-syntax (scheme) (for-expand)) (define-syntax the-macro (er-macro-transformer the-transformer)) #| end of module |#) and RENAME will cleanly pick FX+ from the environment in which ER-MACRO-TRANSFORMER has been called? I'm not trying to inject syntactic bindings in the original environment, I just want to put as much as possible of a macro body into a separate library to be imported "for syntax". -- Marco Maggi _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users