[racket] unrequire for modules, or a new, clean sub-context?
On Mon, Apr 29, 2013 at 7:16 PM, Sanjeev K Sharma <throwit1 at gmail.com> wrote:
>
> On Mon, Apr 29, 2013 at 01:36:26PM -0600, Danny Yoo wrote:
>> For your other two questions: I'm not quite sure what you mean by
>> "dump a module". Can you say more? Also, it looked like your second
>> question got cut off in mid-sentence.
>
> get rid of all the identifiers and data associated with a (require 'd module.
>
> Now that I'm understanding it a bit better it looks like what I need is
>
> (local-require ...)
Hi Sanjeev,
local-require has a specialized use though. I don't think that's what
you are asking for, at least from your comments above. I'd expect
that you'd use the 'only-in' feature of the module importing system
instead. Something like:
(require (only-in <some-module>))
will cause <some-module> to be invoked, but all of its exports will be
ignored so it doesn't introduce its bindings. That is, the list of
identifiers we're pulling with only-in can be empty.