Ticket #865: patch1

File patch1, 621 bytes (added by megane, 9 years ago)
Line 
1diff --git a/modules.scm b/modules.scm
2index fd17c62..1a4cada 100644
3--- a/modules.scm
4+++ b/modules.scm
5@@ -157,11 +157,13 @@
6          (##sys#current-module mod))))))
7 
8 (define (##sys#add-to-export-list mod exps)
9-  (set-module-export-list!
10-   mod
11-   (let ((xl (module-export-list mod)))
12-     (or (eq? xl #t)           ; ==> #t
13-        (append xl exps)))))
14+  (let ((xl (module-export-list mod)))
15+    (if (eq? xl #t)
16+       (let ((el (module-exist-list mod)))
17+         (set-module-exist-list!
18+          mod (append el exps)))
19+       (set-module-export-list!
20+        mod (append xl exps)))))
21 
22 (define (##sys#toplevel-definition-hook sym mod exp val) #f)
23