[racket] How do I quote a syntax object for runtime binding?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Tue Jun 8 11:31:20 EDT 2010

I have a syntax object that looks something like this:

((key val)
 (key2 val2))

I need access to the literal values both at compile and run-time. At
compile time is easy:

(define-syntax info 'syntax-object)

saves the quoted form into info, which I can use as a transformer binding.

Unfortunately, I can't figure out how to write something that will expand into

(define runtime-info '((key val) (key2 val2)))

because I think it's trying to evaluate key and val rather than just
hanging on to them.

Assuming that, in the macro's expansion,

(define-syntax info 'syntax-object)

correctly defines info to be '((key val) (key2 val2)) at compile time,
what do I write so that runtime-info will be defined as '((key val)
(key2 val2)) at runtime?


Posted on the users mailing list.