<p dir="ltr">When I tried this, I was able to lift 'module+ main' successfully using 'syntax-local-lift-module-end-declaration'. I could also lift a 'module', but then requiring the lifted module didn't work.</p>
<p dir="ltr">Sam</p>
<div class="gmail_quote">On Sep 13, 2013 11:25 PM, "Matthew Flatt" <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Right -- there's currently no way to lift a module declaration after<br>
expansion starts working on expressions within a module.<br>
<br>
I think that operation could be added, and I'll look into it as soon as<br>
possible.<br>
<br>
At Fri, 13 Sep 2013 19:41:55 -0700, Eric Dobson wrote:<br>
> Which lifting function? All of the ones I found didn't do what I<br>
> needed when called from an expression context, as the lifted syntax<br>
> was also in expression context. (syntax-local-lift-expression, and<br>
> syntax-local-lift-module-end-declaration)<br>
><br>
> On Fri, Sep 13, 2013 at 1:53 PM, Matthias Felleisen<br>
> <<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>> wrote:<br>
> ><br>
> > Lift the module definition to top and require in the expression position?<br>
> ><br>
> ><br>
> > On Sep 13, 2013, at 12:08 PM, Eric Dobson wrote:<br>
> ><br>
> >> I want to write a macro which generates submodules and then possibly<br>
> >> requires them. This is so that can easily use another language (TR)<br>
> >> for the expression.<br>
> >><br>
> >> If all uses of the macro are at the top-level/module-level this is<br>
> >> easy and I can expand out to something like:<br>
> >> (begin<br>
> >> (module new-mod typed/racket <expr and provides>)<br>
> >> (require 'new-mod)<br>
> >> <use exports>)<br>
> >><br>
> >> But I don't see how I can do something like this when the use is in an<br>
> >> expression context or an internal-definition context. Is there a way<br>
> >> to do this?<br>
> >> ____________________<br>
> >> Racket Users list:<br>
> >> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
> ><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div>