<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Also, this produces an error saying it's an unknown module if it's a local-require:<div><div><font class="Apple-style-span" face="'Courier New'">#lang racket</font></div><div><font class="Apple-style-span" face="'Courier New'">(module thing racket</font></div><div><font class="Apple-style-span" face="'Courier New'"> (provide x)</font></div><div><font class="Apple-style-span" face="'Courier New'"> (define x "something"))</font></div><div><font class="Apple-style-span" face="'Courier New'">(let ()</font></div><div><font class="Apple-style-span" face="'Courier New'"> (local-require 'thing)</font></div><div><font class="Apple-style-span" face="'Courier New'"> x)</font></div></div><div><font class="Apple-style-span" face="'Courier New'">;;=></font></div><div><font class="Apple-style-span" face="'Courier New'">;; <i>../../Applications/Racket v5.3.4/collects/racket/private/reqprov.rkt:1092:2: require: unknown module</i></font></div><div></div><div></div><div></div><div><font class="Apple-style-span" face="'Courier New'">;; module name: #<resolved-module-path:'thing></font></div><div><br></div><div>But this works fine:</div><div><div><font class="Apple-style-span" face="'Courier New'">#lang racket</font></div><div><font class="Apple-style-span" face="'Courier New'">(module thing racket</font></div><div><font class="Apple-style-span" face="'Courier New'"> (provide x)</font></div><div><font class="Apple-style-span" face="'Courier New'"> (define x "something"))</font></div><div><font class="Apple-style-span" face="'Courier New'">(require 'thing)</font></div><div><font class="Apple-style-span" face="'Courier New'">x</font></div></div><div><font class="Apple-style-span" face="'Courier New'">;;=> "something"</font></div><div><br><div><div>On Nov 28, 2013, at 9:32 AM, Greg Hendershott wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>It looks like there's a corner case where `local-require` does not<br>work -- with non-simple require specs such as `rename-in` or<br>`prefix-in`, AND where the module is the #lang module.<br><br>This works with normal require:<br><br>#lang racket<br>(require (rename-in racket [string rkt:string]))<br>(rkt:string #\a #\b) ;=> "ab"<br><br>But this does not:<br><br>#lang racket<br>(let ()<br> (local-require (rename-in racket [string rkt:string]))<br> ;;=> 3:28: syntax: misplaced ellipsis in template at: ... in: ...<br> (rkt:string #\a #\b))<br><br>Something like...<br><br>#lang racket<br>(let ()<br> (local-require (rename-in net/url [get-pure-port foo]))<br> ...<br><br>...does compile OK. So it seems specific to it being the #lang or<br>perhaps specific to `racket`.<br><br>I'll report this as a not-critical bug. (Even if it's not a bug in the<br>sense that there's a good reason why it ought not to work? The error<br>message could be better and/or the docs for local-require might<br>explain this.)<br>____________________<br> Racket Users list:<br> <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br></div></blockquote></div><br></div></body></html>