(module ns-base-stx mzscheme (require "ns-utils.ss" ;; lookup not-found "rpn.ss") ;; represent/find (require-for-syntax "rpn-tx.ss") ;; base-represent/find (provide (all-defined)) ;; Using the code from ns-utils.ss we can map paths -> 'find' ;; closures which can be used in transformer macros. This is the ;; most basic one: just look in a bunch of paths and call the ;; pluggable 'not-found' handler on failure. (define (make-base-find paths) (lambda (name) (or (lookup paths name) (not-found name paths)))) ;; first value is name ;; Using the function above, the 'base-stx' macro can be created. (rpn-compiler-stx ns-base-stx ns-base-rpn make-base-find) ;; For documentation see rpn.ss )