[plt-scheme] Accessing scheme primitives within macros redefining them

From: Jim Witte (jswitte at bloomington.in.us)
Date: Tue Nov 25 12:08:34 EST 2003

I want to write a macro along the lines of

(define-syntax quasiquote
   (syntax-rules ()
     (_ . rest)
     (begin
        (do-quasi-check rest)
        (quasiquote rest))))

   Except that I want the 'quasiquote' in the last line to be *Scheme's* 
quasiquote, not the macro I just defined.  Can I do this with the 
following?

(define qq$ quasiquote)

(define-syntax quasiquote
   (syntax-rules ()
     (_ . rest)
     (begin
        (do-quasi-check rest)
        (qq$ rest))))

   In Chez, there's an (import scheme) command, so I could right (I 
think)

(define-syntax quasiquote
   (syntax-rules ()
     (_ . rest)
     (begin
        (do-quasi-check rest)
        (import scheme)
        (quasiquote rest))))

But PLT is not Chez..

Jim



Posted on the users mailing list.