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: Fri, 15 Dec 2006 09:32:45 +0100 Organization: LAAS-CNRS Message-ID: <878xh9wocy.fsf@laas.fr> References: <87ejrj2s79.fsf@zip.com.au> <87ejrfhn6o.fsf@laas.fr> <87odqjkx22.fsf@zip.com.au> <87ejrfnidd.fsf@zip.com.au> <87lklmacso.fsf@laas.fr> <87bqmew096.fsf@zip.com.au> <87vekmular.fsf@zip.com.au> <87tzzykztl.fsf@ossau.uklinux.net> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166171771 30276 80.91.229.10 (15 Dec 2006 08:36:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Dec 2006 08:36:11 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 15 09:36:08 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 1Gv8Y4-00081y-JW for guile-devel@m.gmane.org; Fri, 15 Dec 2006 09:36:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gv8Y4-0001P7-1I for guile-devel@m.gmane.org; Fri, 15 Dec 2006 03:36:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gv8Wi-0000uW-3C for guile-devel@gnu.org; Fri, 15 Dec 2006 03:34:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gv8Wf-0000tU-GW for guile-devel@gnu.org; Fri, 15 Dec 2006 03:34:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gv8Wf-0000tH-0X for guile-devel@gnu.org; Fri, 15 Dec 2006 03:34:41 -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 1Gv8We-00027B-Nx for guile-devel@gnu.org; Fri, 15 Dec 2006 03:34:41 -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 kBF8YSMM004783; Fri, 15 Dec 2006 09:34:28 +0100 (MET) Original-Received: by messiaen.laas.fr (sSMTP sendmail emulation); Fri, 15 Dec 2006 09:32:47 +0100 Original-To: Neil Jerram X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 25 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: Neil Jerram , Kevin Ryde , guile-devel@gnu.org In-Reply-To: <87tzzykztl.fsf@ossau.uklinux.net> (Neil Jerram's message of "Thu, 14 Dec 2006 20:05:58 +0000") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Spam-Score: -0.001 () 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:6341 Archived-At: Hi, Neil Jerram writes: > It seems to me, though, that this is all a matter of ordering, not of > whether the duplicates processing gets invoked. I don't know all the > details of the duplicate processing, but by default I would expect a > later use-modules (or similar operation) to override an earlier one. > Is that what happens? Roughly, yes. However, the semantics of `module-use!' are very different from those of `use-modules' (unlike what one might think ;-)). While `use-modules' honors the duplicate binding policies, including `replace' as Kevin noted, `module-use!' does no such thing: it blindly overrides bindings. A more important concern is that the order of `module-use!' invocations matters, which leads to all these strange side effects. `module-use!' is a low-level primitive that really should not be used by the "normal user" IMO. Instead, one should rather use `module-use-interfaces!' which has the same semantics as `use-modules'. Getting back to the problem at hand: Since we want to emulate the behavior of `use-modules', the safest way would be to use `module-use-interfaces!', although we can certainly find (fragile?) workarounds. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel