[racket-dev] syntax-local-lift-require is useless wrt submodules

From: Alexis King (lexi.lambda at gmail.com)
Date: Mon Jan 12 02:29:28 EST 2015

I posted this to users@ first, but I think this might be more relevant here. The core problem is that syntax-local-lift-require <http://docs.racket-lang.org/reference/stxtrans.html?q=syntax-local-lift-require#(def._((quote._~23~25kernel)._syntax-local-lift-require))> lifts the #%require form to the top of the enclosing module. This has the side effect of preventing those require specs from including submodules.

This is a real problem, since Typed Racket’s require/typed form uses local-require, which in turn uses syntax-local-lift-require. This means that require/typed currently cannot require submodules. It seems to me that either require/typed, require-local, or syntax-local-lift-require needs to be modified to be compatible with submodules, but I’m not sure how this should be achieved.

Should the module form be hoisted to the top of its enclosing module? Or will that cause problems I’m not foreseeing? I’d really appreciate some kind of solution to this problem because I’ve developed what I think is a fairly nice macro for use with Typed Racket, but I’d need it to properly interoperate with submodules to work correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20150111/426bbcbb/attachment.html>

Posted on the dev mailing list.