fix bug when importing bindings that were already imported and used

* module/ice-9/boot-9.scm (module-use!, module-use-interfaces!): When
  adding the module or interface to the use list, clear the cached
  imports obarray.

  The test case is coming next.
This commit is contained in:
Andy Wingo 2010-04-08 00:29:52 +02:00
commit 8f44138ac6

View file

@ -1978,7 +1978,7 @@ If there is no handler at all, Guile prints an error and then exits."
(module-name interface))))
(module-uses module))
(list interface)))
(hash-clear! (module-import-obarray module))
(module-modified module))))
;; MODULE-USE-INTERFACES! module interfaces
@ -1988,6 +1988,7 @@ If there is no handler at all, Guile prints an error and then exits."
(define (module-use-interfaces! module interfaces)
(set-module-uses! module
(append (module-uses module) interfaces))
(hash-clear! (module-import-obarray module))
(module-modified module))