[plt-scheme] languages and syntax environments

From: David Van Horn (dvanhorn at cs.brandeis.edu)
Date: Thu Jul 12 17:25:23 EDT 2007

Is there a way to define a language module that provides a transformer 
environment for instances of modules written using the language?

For example, this language is like mzscheme but (syntax e) is always 
rewritten to #f:

(module syntax/#f mzscheme
   (provide (all-from-except mzscheme syntax)
            (rename syntax/#f syntax))
   (define-syntax (syntax/#f stx)
     (syntax #f)))

(module f syntax/#f
   ;; #f, because syntax is bound to syntax/#f in
   ;; this environment.
   (syntax #t)

   ;; #t, because syntax is bound to mzscheme's syntax
   ;; in the transformer environment.
   (let-syntax ((f (lambda (stx) (syntax #t))))

I'd like to be able to bind syntax to syntax/#f in the transformer 
environment for programs in this language.


Posted on the users mailing list.