<div>
            <div>
                <span>Unless you are willing to do highly sophisticated static analysis, you will have to implement a new eval to do that. For a tutorial and some example code on how to do that, check out <a href="http://matt.might.net/articles/metacircular-evaluation-and-first-class-run-time-macros/">http://matt.might.net/articles/metacircular-evaluation-and-first-class-run-time-macros/</a><div><br></div><div>That could be complemented by hooking the eval function to the ##expand-source REPL hook, which should basically be a function that takes an expression and returns another (processed) one. That would make it possible to use the language with arc style macros from the REPL.<div><br></div><div>Black hole uses these hooks, see for instance <a href="https://github.com/pereckerdal/blackhole/blob/master/build.scm">https://github.com/pereckerdal/blackhole/blob/master/build.scm</a> for one example of usage. (In essence, it set!s the hook and its compilation counterpart c#expand-source to black hole's own macro expansion function, taking care of the fact that they sometimes get gambit's internal source code location annotation objects as input)</div><div><br></div></div></span>
                <span><br>-- <br>Per Eckerdal<br></span>
                
                <!-- <p style="color: #a0a0a0;">On Friday, 13 May 2011 at 08:51, Meng Zhang wrote:</p> -->
                <p style="color: #a0a0a0;">On Friday, 13 May 2011 at 08:51, Meng Zhang wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>
            <div>
                <span>Hi everyone,</span></div><div><span><span style="white-space:pre">  </span>I'm trying to make a macro can be used as a variable on runtime.In arc a macro is simply a function tagged with 'mac, which is #('tagged 'mac function). so it can be referenced as a variable.</span></div><div><span></span><span style="white-space:pre"> Is there any hook can be set to be called when applying a variable or I have to implement a new eval? Any directions?</span></div><div><br></div><div>Thank you!</div><div>
                <span><br>-- <br>Meng Zhang<br>Sent with <a href="http://www.sparrowmailapp.com">Sparrow</a><br></span>
            </div>
        </div></div><div>_______________________________________________<br>Gambit-list mailing list<br><a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br><a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br></div></div></span>
                
                
                
                
                </blockquote>
                
                <div>
                    <br>
                </div>
            </div>
        </div>