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: [PATCH] `try-module-autoload' and `current-reader' Date: Thu, 19 Jan 2006 09:42:43 +0100 Organization: LAAS-CNRS Message-ID: <8764ogip6k.fsf@laas.fr> References: <874q49yfvb.fsf@laas.fr> <87irshhy65.fsf@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137661988 5987 80.91.229.2 (19 Jan 2006 09:13:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 09:13:08 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 19 10:13:06 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EzVqi-0003nC-6m for guile-devel@m.gmane.org; Thu, 19 Jan 2006 10:12:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzVkI-0002Jv-Pg for guile-devel@m.gmane.org; Thu, 19 Jan 2006 04:06:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzVQX-0005oj-Ub for guile-devel@gnu.org; Thu, 19 Jan 2006 03:45:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzVQT-0005nx-8f for guile-devel@gnu.org; Thu, 19 Jan 2006 03:45:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzVQQ-0005nf-OK for guile-devel@gnu.org; Thu, 19 Jan 2006 03:45:47 -0500 Original-Received: from [140.93.0.15] (helo=laas.laas.fr) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EzVUQ-0008Bq-Pv for guile-devel@gnu.org; Thu, 19 Jan 2006 03:49:55 -0500 Original-Received: by laas.laas.fr (8.13.1/8.13.4) with SMTP id k0J8hCPJ013588; Thu, 19 Jan 2006 09:43:13 +0100 (CET) Original-To: Neil Jerram X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 30 =?iso-8859-1?Q?Niv=F4se?= an 214 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 , guile-devel@gnu.org In-Reply-To: <87irshhy65.fsf@ossau.uklinux.net> (Neil Jerram's message of "Thu, 19 Jan 2006 00:13:54 +0000") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: 0 () X-Scanned-By: MIMEDefang at CNRS-LAAS X-MIME-Autoconverted: from 8bit to quoted-printable by laas.laas.fr id k0J8hCPJ013588 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:5598 Archived-At: Hi, Neil Jerram writes: > ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > >> Hi, >> >> In `boot-9.scm', `try-module-autoload' should be using `load-module', >> and not `primitive-load', when loading a non-compiled module. The >> reasons are (i) non-autoloaded modules are loaded using `load-module' >> and (ii) `load-module' and `primitive-load' interact differently with >> the `current-reader' fluid. [...] > Hmm; I think just adding (with-fluids ((current-reader #f)) ...) > around the (load-file ...) call would be better. Otherwise we would > be introducing two extra changes: > > 1. Starting a new stack (the start-stack form in R4RS's load). This > affects backtraces, and it is occasionally useful for a backtrace > to show that module X is being loaded because of code from module > Y. > > 2. Interpreting a file path beginning with "." as relative to the > current module's load filename. Change #1 would just make autoload's behavior equivalent to that of explicit loading via `use-module'. It seems important to me that autoload and `use-module' behave identically, i.e., either they both use `load-module' and incidentally set up a new stack, or none of them does. Also, the `with-fluids' framing is already provided by R4RS `load' and consequently by `load-module' so I think we should avoid duplicating it. I don't understand your second point. In `try-module-autoload', the name of the module _to be loaded_ is passed, and its path is inferred from that name, not relatively to the current module's path. Am I missing something? Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel