From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jose A. Ortega Ruiz" Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] Fix for `submodules' in (ice-9 session) (closes #30062) Date: Tue, 31 Aug 2010 14:19:03 +0200 Message-ID: <1283257143-24354-1-git-send-email-jao@gnu.org> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1283257371 19487 80.91.229.12 (31 Aug 2010 12:22:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 12:22:51 +0000 (UTC) Cc: "Jose A. Ortega Ruiz" To: guile-devel@gnu.org, wingo@pobox.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 31 14:22:49 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OqPrV-0007Bf-BB for guile-devel@m.gmane.org; Tue, 31 Aug 2010 14:22:49 +0200 Original-Received: from localhost ([127.0.0.1]:35241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqPrU-00013s-IY for guile-devel@m.gmane.org; Tue, 31 Aug 2010 08:22:48 -0400 Original-Received: from [140.186.70.92] (port=59350 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqPob-0007Yn-DG for guile-devel@gnu.org; Tue, 31 Aug 2010 08:19:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqPoW-0002x1-AO for guile-devel@gnu.org; Tue, 31 Aug 2010 08:19:49 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:37294) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqPoW-0002wq-3W; Tue, 31 Aug 2010 08:19:44 -0400 Original-Received: by wyb36 with SMTP id 36so9552141wyb.0 for ; Tue, 31 Aug 2010 05:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:from:to:cc :subject:date:message-id:x-mailer; bh=c4GQxmEsr9XeyLgy6DZhFTXk+gZb3+8PZKCb+mrw0Zo=; b=MFHLyrway1ZqqXaK6BKeGwAXfxtTFJqoUhBeZjo/84ztXg/pyXL4WZUx9xJsgLWpgy sU40/UHTMS2EEdBo4u3GqCGe+u6njJ5mf5QX/WN1g3+dagE0vjFtBUwotevdiSVf0wfC u1vAh4CmS3lTfYKimK9NaLNbq2XLqB47+M/fQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=gKuTl3jHCm1pSTZN6ZD4KDOVo/M+5QN5lmpDv5rOgZfr+IRMP3xY3Ij22MGFMr2chc H3MJVPRvA2G0z+TvdqlO39NvnzScRSABiHJZJr9F5S2ah0L/JHKlsQW+dJZLtxZ1gS8j 0NcX6ftm8eBCChC+VKMP3jCwaUoqYzejBAmtA= Original-Received: by 10.227.128.82 with SMTP id j18mr6396760wbs.36.1283257182163; Tue, 31 Aug 2010 05:19:42 -0700 (PDT) Original-Received: from newton.homeunix.net ([83.50.71.238]) by mx.google.com with ESMTPS id w31sm7585578wbd.9.2010.08.31.05.19.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 05:19:39 -0700 (PDT) Original-Received: from jao by newton.homeunix.net with local (Exim 4.72) (envelope-from ) id 1OqPoM-0006M1-Jv; Tue, 31 Aug 2010 14:19:34 +0200 X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10820 Archived-At: * 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 --- 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