From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Fix for `submodules' in (ice-9 session) (closes #30062) Date: Tue, 31 Aug 2010 09:04:39 -0700 Message-ID: References: <1283257143-24354-1-git-send-email-jao@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283270705 16272 80.91.229.12 (31 Aug 2010 16:05:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 16:05:05 +0000 (UTC) Cc: guile-devel@gnu.org To: "Jose A. Ortega Ruiz" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 31 18:05:04 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 1OqTKZ-0005L0-OU for guile-devel@m.gmane.org; Tue, 31 Aug 2010 18:05:04 +0200 Original-Received: from localhost ([127.0.0.1]:52477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqTKY-0007VN-B1 for guile-devel@m.gmane.org; Tue, 31 Aug 2010 12:05:02 -0400 Original-Received: from [140.186.70.92] (port=53320 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqTH7-0005um-E0 for guile-devel@gnu.org; Tue, 31 Aug 2010 12:01:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqTH6-0003L7-9G for guile-devel@gnu.org; Tue, 31 Aug 2010 12:01:29 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:44148 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqTH6-0003Kx-5X; Tue, 31 Aug 2010 12:01:28 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 6462BD2CB5; Tue, 31 Aug 2010 12:01:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=1mKgXrlUjHFSOIbAKKiws3/nN8U=; b=hQYhXO sjeDV5iEVcirXWDbs6O50COVQCGqUh6vZJsvOEL1BA2VHts152XwQz87lFRfiXDI KUFvCLFIcTgv2qM6gW3UIlZV1dReISPKHZf0HnSD5tOSWr2NzpY7X94Szrtf8/r+ 5THadT3sHTYITCvQZPP7rdLocmULhb5n20irg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=rGl+iuwgb9begDrzeb6oDEvVvchXWN1r xapmGFpENNrvJaXBzrylxbHQqKSqdHTxCfkZ7H/wklItbduEfVVSkbFEgP6WCqLu 7U22dVCzJMG+thdgIzOdlWXurnItpfG38nADTdeS9UtGOdJ0M7O8OBHIUrjvyT6m C34PhlCypSA= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 50152D2CB4; Tue, 31 Aug 2010 12:01:26 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [75.28.21.123]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id CE773D2CB3; Tue, 31 Aug 2010 12:01:24 -0400 (EDT) In-Reply-To: <1283257143-24354-1-git-send-email-jao@gnu.org> (Jose A. Ortega Ruiz's message of "Tue, 31 Aug 2010 14:19:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 025F12AA-B519-11DF-BFF6-030CEE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:10822 Archived-At: Hi, Can you submit a test please, also? This patch is correct, but with --enable-deprecated builds, it should be unnecessary. Andy On Tue 31 Aug 2010 05:19, "Jose A. Ortega Ruiz" writes: > * 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)) -- http://wingolog.org/