[plt-scheme] How do I reload a module that I've "require"d in the REPL?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Oct 15 11:35:40 EDT 2005

If you use DrScheme, of course, you merely click the "run" button again
and you will always have a completely consistent REPL. Use the module
language and that REPL will be "inside" the module you are editing.

If you are using mzscheme thru emacs, for example, it is probably
simplest to just restart the process and reload everything.

You may also want to consider using mzc, which keeps your compiled
files up to date, in a make-like fashion. That is, do this:

  mzc -k file.ss && mzscheme -qu file.ss

each time you want to see your new changes in the mzscheme repl.


At Sat, 15 Oct 2005 08:31:20 -0700, Eric Hanchrow wrote:
> I bet this is a frequently-asked question, but of course I couldn't
> find any answer ...
> I'm using the mzscheme REPL (299.402 if it matters).  I'm tinkering
> with a file foo.ss, which is a module (i.e., it looks like
>         (module foo mzscheme
>          (provide nifty)
>          (define nifty ...)
>          )
> )
> I've done (require "foo"), but then I decided to edit foo.ss.  Now I'd
> like to re-load the file, so that my changes show up in the REPL ...
> but of course simply re-doing (require "foo.ss") has no effect.  Doing
> (load "foo.ss") takes some time, so it seems as if it's doing
> something ... but my changes don't appear (i.e., when I evaluate
> "(nifty)", I get the old behavior).  Is there any easy way to get the
> stuff reloaded?  I'd rather not use DrScheme, and I'd also rather not
> entirely shut down, and then restart, the REPL.
> Thanks
> -- 
> Garbage collection, introduced by Lisp in about 1960, is now
> widely considered to be a good thing.
>         -- Paul Graham
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.