[plt-scheme] literal-identifiers and modules

From: David Van Horn (dvanhorn at cs.uvm.edu)
Date: Mon Jul 21 02:17:46 EDT 2003

If I define a syntax like this at the top-level,

   (define-syntax z
     (syntax-rules (+)
       ((_ (+ x y)) (+ x y))))

then (z (+ 1 2)) => 3.

However if I define z in a module and require it at the top-level, (z (+ 1 2))
results in a syntax error, z: bad syntax in: (z (+ 1 2)).  If I use a literal
identifier like add instead of +, z works as expected.  Is this intended?

Thanks.

-d



Posted on the users mailing list.