What Template Haskell gets wrong and Racket gets right
FYI, Racket's syntax macros is from its Scheme roots. For further information on what Scheme provides, by standard revision:<p>R5RS: [0]<p>R6RS: [1]<p>R7RS: [2] (Page 22)<p>And many Schemes provide non-standard extensions; for instance, Chicken supports non-hygienic macros[3].<p>FWIW, I prefer to think of the two stages as "syntax expansion" and "evaluation", and not "compile time" and "run time". Compilation and running are loaded terms that don't appropriately capture the totality of situations where this behaviour applies, in Scheme.<p>0: <a href="http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8.html#%_sec_5.3" rel="nofollow">http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8...</a><p>1: <a href="http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_sec_11.2.2" rel="nofollow">http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_se...</a><p>2: <a href="http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs.pdf" rel="nofollow">http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7r...</a><p>3: <a href="http://wiki.call-cc.org/explicit-renaming-macros" rel="nofollow">http://wiki.call-cc.org/explicit-renaming-macros</a>