[plt-scheme] module name clashes

From: Doug Orleans (dougo at ccs.neu.edu)
Date: Thu Dec 12 21:01:48 EST 2002

I'd like to use the SRFI modules from the Schematics project, but it's
causing me some problems because it duplicates some of the stuff in
MzLib.  For example:

 > (module foo (lib "plt-pretty-big-text.ss" "lang")
      (require (lib "1.ss" "srfi")))
STDIN::338: module: identifier already imported (from a different source) at: third in: (require (lib "1.ss" "srfi"))

Now, I guess I could go through the two modules' `provide' statements
and figure out all the duplicate definitions and use `all-except' in a
`require' statement, but that seems pretty tedious (and fragile).  I
suppose I could get rid of MzLib's "list.ss" and require all the other
MzLib modules by hand, but again this is tedious, and what if I really
still want something provided by MzLib's list module that isn't
provided by SRFI 1?

What I think I want is a form of `require' (or something else) that
will override bindings that come from another module, rather than
complaining about them.  In other words, I want to say that I prefer
SRFI 1 above other modules if there are any conflicts.  Is this just
totally incompatible with the goals of the module system design?  What
other options do I have to deal with this problem?

--dougo at ccs.neu.edu


Posted on the users mailing list.