[racket] Dynamic Require of Syntax

From: Cody Schroeder (codeblack08 at gmail.com)
Date: Tue Dec 18 00:20:07 EST 2012

  I'm in a position that I would like to use
dynamic-require<http://docs.racket-lang.org/reference/Module_Names_and_Loading.html#(def._((quote._~23~25kernel)._dynamic-require))>
to
gain access to all of the provides in a module.  This is quite
straightforward for normal procedures, but I also want this to include
syntax.  However, I get this error when trying to dynamically require the
blah macro from my test module:

(dynamic-require "test.rkt" 'blah)
blah: use does not match pattern: (blah body) in: blah

  From the spec, it says that "If the module exports provided as syntax,
then a use of the binding is expanded and evaluated in a fresh namespace to
which the module is attached" when using dynamic-require.  I don't
understand how it's being used, though.

  Is there a way to use dynamic-require how I want?  Is there a better way?
Cody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121217/ca745299/attachment.html>

Posted on the users mailing list.