[plt-scheme] Resetting the mzscheme environment

From: Rohan Nicholls (rohan.nicholls at googlemail.com)
Date: Tue Oct 23 03:48:51 EDT 2007

Hello again,

I have been saving questions up as I explore (as if for the first
time) the plt environment.

Things I have been stumbling on and loving:

* (p)regexp intergration
* expressiveness of the module system (I thought python had this
  bagged, but apparently not as fully as it could be).
* reworked function parameter handling system.  Really nice, not as
  intuitive as python, but as flexible and more expressive, and the
  addition of keyword arguments was very needed (imho), although
  swindle supplied it before.
And there is more to discover.

The current question:

If I using mzscheme as a prompt how can I read in a module again?  If
I try it, it does not work.  Resetting the mzscheme environment is
perfectly fine, but I cannot figure out how to do this.

In the plt guide I ran into this (yes I am using the svn version):

   With mzscheme, you'd save the above text in a file using your
   favorite editor. If you save it as "piece.ss", then after starting
   mzscheme in the same directory, you'd evaluate the following

     > (enter! "piece.ss")

But I get an undefined symbol error if I try and use it.  I have big
loaded in my mzschemerc which solved most language problems while
trying out the examples in the guide, but not this one.

At the moment I have to restart the interpreter, which is not all that
handy.  I could probably hack something up to automate the process
if needed but would prefer to find something that could handle this
within the system.  I know that Dr.Scheme resets the environment
before executing code, but maybe this is a Dr. Scheme specific thing.
If the mechanism is in mred, I am happy to use that as my interpreter.

Thanks in advance,


Posted on the users mailing list.