[plt-scheme] renaming primitives

From: Doug Orleans (dougo at ccs.neu.edu)
Date: Sat Nov 2 16:13:41 EST 2002

John Clements writes:
 > On Friday, November 1, 2002, at 12:20  AM, Doug Orleans wrote:
 > >
 > > I just ran into this problem too, and I used the same solution.
 > > However, is there any particular reason the second argument to
 > > "module" has to be a module-name instead of a require-spec?
 > >
 > Nope; this module evaluates fine:
 > (module foo (lib "plt-mzscheme.ss" "lang")
 >    (provide a)
 >    (define a 3))
 > You're right, though; the documented syntax for 'module' doesn't seem 
 > to include this use.

Yeah, that is a module-name, not a require-spec.  See

What I meant was it should be able to handle a require-spec, not just
a module-name, like this:

(module foo (all-except (lib "plt-mzscheme.ss" "lang") set!)

Otherwise, you have to use Matthew's trick of making an intermediate

(module all-but-set! (lib "plt-mzscheme.ss" "lang")
  (provide (all-from-except (lib "plt-mzscheme.ss" "lang") set!)))

(module foo all-but-set!

Or else maybe you could make a minimal language that only had enough
to bootstrap the first require:

(module minimal mzscheme
  (provide #%module-begin require))

(module foo minimal
  (require (all-except (lib "plt-mzscheme.ss" "lang") set!))

I guess my question was, is there any difference between a module
imported via the second argument to a module declaration, and modules
imported with require?  The documentation says:

  In general, the initial import serves as a kind of "language" declaration.

Is there a formal difference between "language" and "module" in MzScheme?

--dougo at ccs.neu.edu

Posted on the users mailing list.