Yes, I don&#39;t really want #%top per se.&nbsp; My scenario is to &quot;alias&quot; an imported id (i.e. not something privately defined by the module) and it looks more like below:<br><br>&gt; (module foo mzscheme <br>&nbsp;&nbsp;&nbsp; (define bar (lambda (x) x))
<br>&nbsp;&nbsp;&nbsp; (provide bar))<br>&gt; (begin <br>&nbsp;&nbsp;&nbsp; (require (prefix baz: foo))<br>&nbsp;&nbsp;&nbsp; (define bar baz:bar))<br>&gt; baz:bar<br>#&lt;procedure:bar&gt;<br>&gt; bar<br>#&lt;procedure:bar&gt;<br><br>Aliasing allow me to &quot;trace&quot; and set over the alias (
<a href="http://list.cs.brown.edu/pipermail/plt-scheme/2007-March/016927.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://list.cs.brown.edu/pipermail/plt-scheme/2007-March/016927.html</a>
).&nbsp; So I extracted the exported variables for a module (<a href="http://list.cs.brown.edu/pipermail/plt-scheme/2003-November/003698.html">http://list.cs.brown.edu/pipermail/plt-scheme/2003-November/003698.html</a>) and attempt to do write a macro that would automatically alias them, but all of the variables gets expanded to (#%top . variable) form, while if I manually write it out like above, it is &quot;ok&quot;.
<br><br>Reading the manual it says that unbound variables would automatically gets expanded to (#%top . var) form.&nbsp; Anyway to prevent it from expanding to the form? <br><br>Thanks,<br>yinso <br><br><br><div><span class="gmail_quote">

At Mon, 23 Apr 2007 16:45:25 -0700, &quot;Yin-So Chen&quot; wrote:<br>&gt; What is the difference with respect to imported bindings and local<br>&gt; bindings?&nbsp;&nbsp;I notice that imported binding cannot be expanded via #%top?
<br><br>`#%top&#39; always refers to a definition outside of a module.<br><br>&gt; In syntax a define often gets expanded to (#%top . id) form, so how can I<br>&gt; write<br>&gt;<br>&gt; #&#39;(define local-id imported-id)
<br>&gt;<br>&gt; Given that the above gets expanded to<br>&gt;<br>&gt; #&#39;(define-values (local-id) (#%top . imported-id))<br><br>If I understand, you don&#39;t really want `#%top&#39;. Instead, you want the<br>binding that `imported-id&#39; would have if it appeared at the top level
<br>of its enclosing module (or at the plain top level, if the definition<br>appears outside of a module).<br><br>There&#39;s no way to do that right now (I think).<br><br>In fact, if there was a way to do that, then depending on how it
<br>worked, I think it might open a kind of security hole: a macro might<br>expand to `(let ([x ....]) .... (&lt;untrusted-thing&gt; x))&#39; where the<br>enclosing module also defines a top-level `x&#39; that is supposed to
<br>remain private. If `&lt;untrusted-thing&gt;&#39; turned out to be a macro that<br>find the module-top-level binding of `x&#39;, maybe it could get at the<br>private `x&#39;. Or maybe the relevant operations could be defined to
<br>prevent that sort of thing; I&#39;m not sure.<br><br>Matthew<br><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.yinsochen.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.yinsochen.com</a><br>...continuous learning...