Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unload a lisp file in CLisp REPL?

Am able to load and call the functions but I would like to reload the file after making some corrections.

Cant find either an unload or reload function?

like image 841
hyper_w Avatar asked Sep 19 '10 22:09

hyper_w


1 Answers

Unloading is not really possible. It is for example possible to delete a package and thus remove its definitions. But other references to a symbol of that package might still exist.

The typical way to deal with that is to load a file again, as Vijay Mathew mentioned.

It might be helpful that the file loaded is written in such a way that reloading is possible.

A few remarks on reloading:

  • functions/macros will be replaced with the new definition.

  • functions/macros in existing code may not be replaced due to inlining/macro expansion.

  • CLOS classes will be updated, its instances will be lazily updated.

  • Structure definitions will be updated, existing structure instances will not be updated.

  • DEFVAR replaces a value if one doesn't exist. DEFPARAMETER always replaces a value.

like image 95
Rainer Joswig Avatar answered Sep 28 '22 04:09

Rainer Joswig