[gambit-list] loading modules multiple times

Christian christian at pflanze.mine.nu
Mon Aug 8 16:01:48 EDT 2005


At 18:42 Uhr +0100 08.08.2005, Adam Langley wrote:
>Currently, trying to (load x) twice results in an error. This is a
>problem when A and B each load C and a fourth file tries to load A and
>B. It's also a problem when using (include x) to debug a file which
>loads another.
>
>So I would suggest the load should be a no-op in the case that the
>file has already been loaded.

It's a problem chjmodule is meant to solve (by only load'ing or 
rebuilding a module again if it has changed).
http://scheme.mine.nu/gambit/chjmodule/

Be aware though that it's still buggy, especially it doesn't always 
reimport bindings if you reload a module. So in practice it may not 
yet solve your problem, but I will make it work well as soon as I 
find time (in a few weeks). Currently I use (namespace "") while I'm 
developping a module (so the reimport bug is not an issue).

Christian.


More information about the Gambit-list mailing list