[plt-scheme] Best place to install custom current-module-name-resolver?
At Thu, 10 Apr 2008 08:35:08 -0700, Derick Eddington wrote:
> Hi, I've made a hacked current-module-name-resolver so it can find
> module/library files with more file type extensions than only .ss (it
> just alters the passed-in file suffix when appropriate and calls the
> saved standard-module-name-resolver). It works when I install it
> manually; now I want to patch my PLT code base so it will always
> automatically be installed. Where's the best place to do
>
> (let ([cmnr (current-module-name-resolver)])
> (current-module-name-resolver MINE))
>
> so that mine will be installed when Mz/Dr starts up?
>
You'd have to modify DrScheme and/or MzScheme, such as replacing the
handler that's in "src/mzscheme/startup.ss".
A configurable module-name resolver was a bad idea. The job of the
module system is to establish a universal namespace as much as
possible, and if you can extend that namespace, then it wasn't
universal after all. Many of our tools have always assumed the built-in
resolution, and that assumption has become more formalized in v3.99
(e.g., with `module-path?').
Matthew