add comments to resolve-module
authorAndy Wingo <wingo@pobox.com>
Tue, 20 Apr 2010 11:42:21 +0000 (13:42 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 22 Apr 2010 13:31:02 +0000 (15:31 +0200)
* module/ice-9/boot-9.scm (resolve-module): Add comments.

module/ice-9/boot-9.scm

index ff9fa9f..ea9f50a 100644 (file)
@@ -2301,10 +2301,14 @@ If there is no handler at all, Guile prints an error and then exits."
 ;;
 (define resolve-module
   (let ((the-root-module the-root-module))
-    (lambda (name . args)
+    (lambda (name . args) ;; #:optional (autoload #t) (version #f)
       (if (equal? name '(guile))
+          ;; During boot, avoid recursion when looking for the root module.
           the-root-module
           (let ((full-name (append '(%app modules) name)))
+            ;; This is pretty strange that '(guile) is the same as '(guile %app
+            ;; modules guile), is the same as '(guile %app modules guile %app
+            ;; modules guile).
             (let* ((already (nested-ref the-root-module full-name))
                    (numargs (length args))
                    (autoload (or (= numargs 0) (car args)))