[plt-scheme] 204.7

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jul 1 20:03:17 EDT 2003

The exp-tagged code in CVS for MzScheme and MrEd is now version 204.7.


 * Added a "package.ss" library to MzLib. It exports `package' and
   `open', which correspond to Chez's `module' and `import', plus a few
   other forms.

   The `package' and `open' forms are especially useful to macro

      "Extending the Scope of Syntactic Abstraction"
      Waddell and Dybvig

   Beware that `import' doesn't act like `define' or `require' when
   introduced by a macro. Roughly, `import' exposes bindings that were
   hidden, rather than introducing new bindings. See the manual (and
   the paper above) for examples.

   The "package.ss" library is based on Scott Owens's "structure.ss"
   library, and "package.ss" replaces "structure.ss". To support the
   let*-like behavior of Standard ML structures, "package.ss" provides
   `define*', `open*', etc.

 * Added `module->namespace', which takes a module name and returns a
   namespace that corresponds to the body of the module.

   Evaluating with this namespace is like evaluation in DrScheme's
   interactions window in the `(module ...)' language, except that
   changing a namespace binding changes the corresponding module's
   internal and exported defintions. (This is like Tung's environment
   circa 1992.)

 * Added `namespace-module-registry'.

   Previously, a namespace was defined to contain the table of loaded
   and instantiated modules. That definition doesn't work with
   `module->namespace', where different namespaces share the module
   table. The result of `namespace-module-registry' represents this
   sharing. It's useful mainly to module name resolvers.

 * Added #; reader comment syntax (again, like Chez).

 * Added `namespace-undefine-variable!', which is like MzScheme's old

 * Changed `syntax-local-context' so that it returns a list for
   internal-define expansion, instead of 'internal-define, and changed
   `local-expand' so that it accepts a list to mean internal-define

   For built-in expansion, each list item identifies an active
   internal-define expansion context. Transformers that call
   `local-expand' for internal-define-like expansion should generate a
   key that represents the context; use the same key for each expansion
   in a set of definitions, and cons it onto `(syntax-local-context)'
   if the result is a list (or cons it onto null if the result is not a

   See also `(lib "context.ss" "syntax")'.

   This change supports the `package' and `open' forms, so that they
   work right with macros such as `unit', `class', `local', or anything
   else that needs `local-expand'.

 * Added `syntax-local-get-shadower'. See the docs for details.

 * Changed top-level `define-syntaxes' to treat zero results
   from the right-hand side as a kind of abort, so that
     (define-syntax (id ...) (values))

   declares the ids without binding them. This is useful for macros
   that expand to mutuaully recursive definitions of private variables
   (like, of course, `package').


Posted on the users mailing list.