[plt-scheme] 299.23

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Nov 26 13:05:20 EST 2004

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

Changes:

 * Windows: changed `find-system-path' to use the registry-specified
   profile directory for a user's home, instead of the HOMEDRIVE and
   HOMEPATH environment variables.

 * Added 'doc-dir and 'desk-dir to `find-system-path'.


 * Removed `#%top' wrapper from references to a module's own bindings
   in the expanded form of the module.

   This change invalidates the suggestion in
    http://list.cs.brown.edu/pipermail/plt-scheme/2004-September/006665.html
   but the following change fixes that problem directly...

 * Changed `generate-temporaries' and `syntax-local-module-introduce'
   to add the top-level context when a top-level expression is
   expanded.

   This fixes the problem reported here and in earlier posts:
    http://list.cs.brown.edu/pipermail/plt-scheme/2004-September/006653.html


 * Added `begin-lifted' to MzLib's "etc.ss". An expression within
   `begin-lifted' is lifted to the top of a module, so that it is
   evaluated once when the module is instantiated. The result of the
   `begin-lifted' form is the result of the last expression in the
   form.

   For example, suppose you have

     (define (f x) (+ x <big-computation>))

   where <big-computation> is constant. You'd like to lift the
   computation out of the function. (Of course, you'd really like the
   compiler to do that for you, but maybe you know more than the
   compiler --- which is almost always the case when using MzScheme.)

   You can manually lift it out as

     (define big-result <big-computation>)
     (define (f x) (+ x big-result))

   With `begin-lifted' now you can equivalently write

     (define (f x) (+ x (begin-lifted <big-computation>)))

   The `begin-lifted' form is intended mainly for use in macro
   expansions, where the macro writer knows that a sub-expression is
   constant, but the macro does not have control over the context where
   it's used.

   The `provide/contract' macro uses `begin-lifted' to dramatically
   reduce the overhead of calling an imported procedure that has a
   contact.

 * Added `syntax-local-lift-expression', `local-expand/capture-lifts',
   and `local-transformer-expand/capture-lift'. See the docs for details,
   or just use `begin-lifted'.


 * Added `get-item-label', `set-item-label', and `set' methods to
   tab-panel%.

 * Added 'arrow+watch built-in cursor.

 * X: minor tweaks to the [editor-]canvas% widget.


Matthew



Posted on the users mailing list.