[plt-scheme] Modules and extensions (yes, again)

From: Pedro Pinto (ppinto at cs.cmu.edu)
Date: Sat Apr 19 17:11:10 EDT 2003


Unfortunately after making the changes you suggest I found another

I would like to be able to create modules that use my custom resolver,

(module my-module

	(require (library "my-library"))

      (provide ...))

This of course does not work since the resolver is not installed yet.
But how can I install it *before* the module's require clause is

Thanks in advance,

-----Original Message-----
From: Matthew Flatt [mailto:mflatt at cs.utah.edu] 
Sent: Saturday, April 19, 2003 10:56 AM
To: Pedro Pinto
Cc: plt-scheme at qua.cs.brown.edu
Subject: Re: [plt-scheme] Modules and extensions (yes, again)

The module-name resolver has two reposnsibilities:

  * transforming a `require' specification into a symbolic module name;

  * loading modules on demand.

"On demand" doesn't necessarily mean that every transformation implies
a load. For example, the compilation of `(require (library '()))'
resolves the name once while compiling the require declaration, and
them again to execute it. In short, the resolver needs some sort of
table to know whether it has already loaded a particular module.

The table of loaded modules should be namespace-specific. Note that
`namespace-attach-module' can introduce a module declaration into a
namespace without resolving any require spec; in that case, the
module-name resolver gets a "notification" call (indicated by a #f
spec), so that it can keep its table in sync.


Posted on the users mailing list.