diff options
author | Andy Wingo <wingo@pobox.com> | 2010-12-17 13:27:43 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-12-17 13:27:43 +0100 |
commit | cdab9fc6250ffa86467156d50b88834c28922b16 (patch) | |
tree | 5d6f7118d71b2ba3535e8feda03a3e96f64dd788 /module/system/repl/command.scm | |
parent | 626e36e5cbfb8a251c647d44116bd2b34bc88106 (diff) | |
download | guile-cdab9fc6250ffa86467156d50b88834c28922b16.tar.gz |
add ,reload meta-command and document it and reload-module
* module/ice-9/boot-9.scm (reload-module): Add docstring.
* module/system/repl/command.scm (reload): New meta-command.
* doc/ref/scheme-using.texi (Module Commands): Document the ,reload
meta-command.
* doc/ref/api-modules.texi (Module System Reflection): Document
reload-module.
Diffstat (limited to 'module/system/repl/command.scm')
-rw-r--r-- | module/system/repl/command.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm index 08f1c9e08..2897b9bad 100644 --- a/module/system/repl/command.scm +++ b/module/system/repl/command.scm @@ -50,7 +50,7 @@ (define *command-table* '((help (help h) (show) (apropos a) (describe d)) - (module (module m) (import use) (load l) (binding b) (in)) + (module (module m) (import use) (load l) (reload re) (binding b) (in)) (language (language L)) (compile (compile c) (compile-file cc) (disassemble x) (disassemble-file xx)) @@ -391,6 +391,15 @@ Import modules / List those imported." Load a file in the current module." (load (->string file))) +(define-meta-command (reload repl . args) + "reload [MODULE] +Reload the given module, or the current module if none was given." + (pmatch args + (() (reload-module (current-module))) + ((,mod-name) (guard (list? mod-name)) + (reload-module (resolve-module mod-name))) + (,mod-name (reload-module (resolve-module mod-name))))) + (define-meta-command (binding repl) "binding List current bindings." |