[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix for `submodules' in (ice-9 session) (closes #30062)

From: Jose A. Ortega Ruiz
Subject: [PATCH] Fix for `submodules' in (ice-9 session) (closes #30062)
Date: Tue, 31 Aug 2010 14:19:03 +0200

* module/ice-9/session.scm (submodules): replace implementation to
  use `module-submodules' instead of `module-obarray' (the latter
  doesn't include submodules anymore).

Signed-off-by: Jose A. Ortega Ruiz <address@hidden>
 module/ice-9/session.scm |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/module/ice-9/session.scm b/module/ice-9/session.scm
index 10ce613..36aeb99 100644
--- a/module/ice-9/session.scm
+++ b/module/ice-9/session.scm
@@ -406,15 +406,8 @@ It is an image under the mapping EXTRACT."
 (define (root-modules)
   (submodules (resolve-module '() #f)))
-(define (submodules m)
-  (hash-fold (lambda (name var data)
-              (let ((obj (and (variable-bound? var) (variable-ref var))))
-                (if (and (module? obj)
-                         (eq? (module-kind obj) 'directory))
-                    (cons obj data)
-                    data)))
-            '()
-            (module-obarray m)))
+(define (submodules mod)
+  (hash-map->list (lambda (k v) v) (module-submodules mod)))
 (define apropos-fold-exported
   (make-fold-modules root-modules submodules module-public-interface))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]