[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [plt-scheme] How do I reload a module that I've "require"d in the	REPL?
From:       jensaxel () soegaard ! net (=?ISO-8859-1?Q?Jens_Axel_S=F8gaard?=)
Date:       2005-10-15 17:11:56
Message-ID: 4351385C.3000206 () soegaard ! net
[Download RAW message or body]

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.

For the record:

(load "foo.ss")
(require foo)

does what you want.

-- 
Jens Axel S?gaard




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic