[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Geiser-users] Fwd: reloading a module

From: Irvin
Subject: Re: [Geiser-users] Fwd: reloading a module
Date: Sat, 26 May 2012 07:44:31 -0700

Yeah that's great, thanks!

On Fri, May 25, 2012 at 9:41 AM, Jose A. Ortega Ruiz <address@hidden> wrote:
On Fri, May 25 2012, Irvin wrote:

> HI Jao,
> This is directly from the repl so perhaps that's the problem? e.g.

Ah, yes, that's the problem.  That uses Racket's native require, which
only loads modules once unless instructed otherwise.  To do what you
want in the REPL, you need to tell geiser to reevaluate the buffer when
you change it, using C-c C-k in the racket buffer.

It would go more or less like this:

1) in the REPL do a (require "foo.rkt")
2) Now go to the buffer and edit it.  Then evaluate the new version
  with either C-c C-k for the whole file, or C-c C-e or C-M-x for
  individual expressions.
3) Go back to the REPL:
4a) If you didn't change the export clasue in foo.rkt, got back to the
  REPL and use the new values of the exported identifiers.
4b) I you change the export list, do a require again.  Use the new
 identifiers  and the new values of the old ones.

Does that help?

"Beware of bugs in the above code; I have only proved it correct, not tried it."
 - Donald Knuth (in a memo to Peter van Emde Boas)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]