unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Fix for `submodules' in (ice-9 session) (closes #30062)
@ 2010-08-31 12:19 Jose A. Ortega Ruiz
  2010-08-31 16:04 ` Andy Wingo
  0 siblings, 1 reply; 13+ messages in thread
From: Jose A. Ortega Ruiz @ 2010-08-31 12:19 UTC (permalink / raw)
  To: guile-devel, wingo; +Cc: Jose A. Ortega Ruiz

* 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 <jao@gnu.org>
---
 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))
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-09-04 17:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31 12:19 [PATCH] Fix for `submodules' in (ice-9 session) (closes #30062) Jose A. Ortega Ruiz
2010-08-31 16:04 ` Andy Wingo
2010-08-31 20:29   ` Jose A. Ortega Ruiz
2010-08-31 23:11     ` Jose A. Ortega Ruiz
2010-09-01 12:02       ` Ludovic Courtès
2010-09-01 20:58         ` Jose A. Ortega Ruiz
2010-09-01 22:23           ` Ludovic Courtès
2010-09-01 23:30             ` Jose A. Ortega Ruiz
2010-09-03  4:35             ` Andy Wingo
2010-09-04  1:13               ` Jose A. Ortega Ruiz
2010-09-04 17:34                 ` Andy Wingo
2010-09-01  0:16   ` Jose A. Ortega Ruiz
2010-09-02 18:45     ` Jose A. Ortega Ruiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).