<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Okay, new information. I’ve looked into this more, and I’m pretty sure it has nothing at all to do with errortrace. I don’t know why running it from the command line without errortrace works, but as far as I can tell it shouldn’t.</div><div class=""><br class=""></div><div class="">The real problem is that require-local uses <a href="http://docs.racket-lang.org/reference/stxtrans.html?q=syntax-local-lift-require#(def._((quote._~23~25kernel)._syntax-local-lift-require))" class=""><font face="Courier" class="">syntax-local-lift-require</font></a>, which pulls the resulting <font face="Courier" class="">#%require</font> expression into the top of the enclosing module. This means it ends up being <i class="">before</i> any submodule definitions, so it explodes.</div><div class=""><br class=""></div><div class="">This seems a little like an issue with submodules and <font face="Courier" class="">syntax-local-lift-require</font> more than anything else. Should submodules be lifted to the top of the module? Either way, this is a frustrating problem, and I can’t see any simple fix.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 11, 2015, at 12:55, Alexis King <<a href="mailto:lexi.lambda@gmail.com" class="">lexi.lambda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I wrote a typed racket macro that creates an untyped submodule, then uses require/typed to add type annotations to the bindings. This would work great, except that it just errors out and dies. I submitted a bug report before realizing that a <a href="http://bugs.racket-lang.org/query/?cmd=view%20audit-trail&database=default&pr=14130&return_url=http://bugs.racket-lang.org/query/?database=default;debug=;State=any;ignoreclosed=Ignore%20Closed;Synopsis=local-require;multitext=;columns=State;columns=Synopsis;columns=Category;columns=Last-Modified;columns=Release;cmd=submit%20query;sortby=Number" class="">bug report already existed</a>. There, someone suggested that it would work fine with <font face="Courier" class="">(submod "." foo)</font> instead of simply using <font face="Courier" class="">'foo</font>. This works!<div class=""><br class=""></div><div class="">Except that it doesn’t work when errortrace is enabled. This behavior is observable here:</div><div class=""><a href="https://gist.github.com/lexi-lambda/d0da64235e1bca59810f" class="">https://gist.github.com/lexi-lambda/d0da64235e1bca59810f</a></div><div class=""><br class=""></div><div class="">Note that it works fine using plain old require, and it also works fine without errortrace. What is errortrace doing that breaks this specific instance? How can I fix it? I’d really like to be able to solve this because my macro sort of depends on it.</div></div></div></blockquote></div><br class=""></body></html>