From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: top-repl priority of guile module Date: Mon, 04 Dec 2006 13:15:27 +0100 Organization: LAAS-CNRS Message-ID: <87ejrfhn6o.fsf@laas.fr> References: <87ejrj2s79.fsf@zip.com.au> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165234553 11700 80.91.229.10 (4 Dec 2006 12:15:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2006 12:15:53 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Dec 04 13:15:51 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GrCjX-0003O0-3C for guile-devel@m.gmane.org; Mon, 04 Dec 2006 13:15:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GrCjV-0004ht-Mg for guile-devel@m.gmane.org; Mon, 04 Dec 2006 07:15:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GrCjS-0004fJ-BS for guile-devel@gnu.org; Mon, 04 Dec 2006 07:15:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GrCjQ-0004dt-RQ for guile-devel@gnu.org; Mon, 04 Dec 2006 07:15:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GrCjQ-0004dk-Oi for guile-devel@gnu.org; Mon, 04 Dec 2006 07:15:36 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1GrCjP-0002rx-Sf for guile-devel@gnu.org; Mon, 04 Dec 2006 07:15:36 -0500 Original-Received: from messiaen.laas.fr (messiaen [IPv6:2001:660:6602:0:230:65ff:fed4:9d20]) by laas.laas.fr (8.13.8/8.13.8) with SMTP id kB4CFTEw028760 for ; Mon, 4 Dec 2006 13:15:29 +0100 (MET) Original-Received: by messiaen.laas.fr (sSMTP sendmail emulation); Mon, 04 Dec 2006 13:15:27 +0100 Original-To: guile-devel@gnu.org X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 14 Frimaire an 215 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: guile-devel@gnu.org In-Reply-To: <87ejrj2s79.fsf@zip.com.au> (Kevin Ryde's message of "Sat, 02 Dec 2006 08:59:22 +1100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Spam-Score: 0.306 () MAILTO_TO_SPAM_ADDR,NO_RELAYS X-Scanned-By: MIMEDefang at CNRS-LAAS on IPv6:2001:660:6602::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:6286 Archived-At: Hi, Kevin Ryde writes: > Sven Hartrumpf on guile-user a while ago reported on a run of > > guile --use-srfi=1 > > leaves the REPL with the core `iota', not the srfi-1 one. What's the > theory behind this bit of top-repl (in boot-9.scm), > > ;; so that builtin bindings will be checked first > (module-use! guile-user-module (resolve-interface '(ice-9 r5rs))) > (module-use! guile-user-module (resolve-interface '(guile))) > > The effect is to override any bindings that srfi modules attempt to > replace. So srfi-17 car or srfi-39 current-input-port are similarly > afflicted. Wild guess: Does the following fix the problem: (module-use-interfaces! guile-user-module (resolve-interface '(ice-9 r5rs)) (resolve-interface '(guile))) (instead of the two `module-use!' line.) IIRC, `module-use-interfaces!' calls `process-duplicates', which in turn correctly honors the `replace' policy for duplicate bindings. Conversely, `module-use!' just conses the given modules to the module's use list without invoking `process-duplicates', hence the problem you are seeing (the interface of `(guile)' ends up before that of `srfi-XX' in the module use list). Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel