diff options
author | Andy Wingo <wingo@pobox.com> | 2010-04-23 15:55:32 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-04-24 17:42:00 +0200 |
commit | d58ccc669cf796b8b9c579e86f3072f0f4223adf (patch) | |
tree | 7e8a85ba69c334cd70c5a377d80d9850a705d349 | |
parent | 9e0bfdbaa39ff87e002ec5bbf7183de4ce8f6b61 (diff) | |
download | guile-d58ccc669cf796b8b9c579e86f3072f0f4223adf.tar.gz |
resolve-module uses -module variants
* module/ice-9/boot-9.scm (resolve-module): Use module-define-submodule!
when binding the root, and nested-ref-module for the hot lookup, which
is guaranteed to return a module or #f.
-rw-r--r-- | module/ice-9/boot-9.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index b6b077c6c..5775c46b6 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -2400,15 +2400,15 @@ If there is no handler at all, Guile prints an error and then exits." (let ((root (make-module))) (set-module-name! root '()) ;; Define the-root-module as '(guile). - (module-define! root 'guile the-root-module) + (module-define-submodule! root 'guile the-root-module) (lambda (name . args) ;; #:optional (autoload #t) (version #f) - (let* ((already (nested-ref root name)) + (let* ((already (nested-ref-module root name)) (numargs (length args)) (autoload (or (= numargs 0) (car args))) (version (and (> numargs 1) (cadr args)))) (cond - ((and already (module? already) + ((and already (or (not autoload) (module-public-interface already))) ;; A hit, a palpable hit. (if (and version |