a failed resolve-interface does not leave behind an empty module
authorAndy Wingo <wingo@pobox.com>
Fri, 11 Jun 2010 10:55:44 +0000 (12:55 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 11 Jun 2010 14:58:31 +0000 (16:58 +0200)
* module/ice-9/boot-9.scm (resolve-interface): Pass #:ensure #f to
  resolve-module, so that in the case of module-not-found we don't leave
  behind an empty module without an interface.

module/ice-9/boot-9.scm

index 902f474..5af1ebe 100644 (file)
@@ -2348,7 +2348,7 @@ If there is no handler at all, Guile prints an error and then exits."
                                          (symbol-prefix-proc prefix)
                                          identity))
                             version)
-  (let* ((module (resolve-module name #t version))
+  (let* ((module (resolve-module name #t version #:ensure #f))
          (public-i (and module (module-public-interface module))))
     (and (or (not module) (not public-i))
          (error "no code for module" name))