From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: new-model.text, please comment Date: 15 Sep 2002 00:05:08 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87wupop6qz.fsf@zagadka.ping.de> References: <871y80tn9r.fsf@zagadka.ping.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032041172 17422 127.0.0.1 (14 Sep 2002 22:06:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 14 Sep 2002 22:06:12 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17qL3K-0004Wk-00 for ; Sun, 15 Sep 2002 00:06:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qL3V-0006DW-00; Sat, 14 Sep 2002 18:06:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17qL2S-00068K-00 for guile-devel@gnu.org; Sat, 14 Sep 2002 18:05:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17qL2M-00067M-00 for guile-devel@gnu.org; Sat, 14 Sep 2002 18:05:14 -0400 Original-Received: from dialin.speedway42.dip18.dokom.de ([195.138.42.18] helo=zagadka.ping.de) by monty-python.gnu.org with smtp (Exim 4.10) id 17qL2L-00067H-00 for guile-devel@gnu.org; Sat, 14 Sep 2002 18:05:09 -0400 Original-Received: (qmail 17443 invoked by uid 1000); 14 Sep 2002 22:05:08 -0000 Original-To: Neil Jerram In-Reply-To: Original-Lines: 77 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1346 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1346 Neil Jerram writes: > Here are my few thoughts. I don't have much experience or expertise > in this area, so feel free to explain the obvious to me if that's what > I've asked for :-) Heh, I'm totally new to this stuff as well... > Marius> The output of the compiler is not specified. Also, > Marius> execution of languages other than Scheme is not > Marius> considered. It is assumed that additional languages are > Marius> first translated to Scheme (or whatever variant of Scheme > Marius> we offer) and then compiled normally." > > High level thought -- is all of this new thinking necessary? Are we > unnecessarily ignoring useful stuff that has already been worked > through on other projects? Is there much new stuff in it? I think what I have written down is quite minimal, and very Guile specific as well. > Marius> When a module is created, the set of bindings is empty. > Marius> You can add bindings to the set, but you can not remove > Marius> them. Existing bindings can not be changed. There can be > Marius> at most one binding with a given symbol. > > So it is impossible to change an existing macro definition? Uhh, ohh. That's what the rules say, but it's not what I intended. I think it is OK to change a macro definition, much as you can change a function definition. The text doesn't say what a macro transformer really is. We could just say that it is some kind of object that contains a function. The text does not allow the object to be replaced by a different object, but the object can be modified (like variables can be modified). The alternative would be to change the rules and say that a macro transformer can be replaced with a different macro transformer, but that might not be as clean. > Marius> During compilation of a file that defines a module, that > Marius> module is partially constructed (via code executed by > Marius> eval-case). The constructed module is made the current > Marius> module, but it is not registered in the system. Requests > Marius> for a module with the name of the module-being-compiled > Marius> will not find the partially constructed module. When the > Marius> compiler wants to follow a :module-ref statement with an > Marius> explicit name, it must check whether that name refers to > Marius> the partially constructed current module. > > Don't understand the point here. What are you trying to say by "will > not find the partially constructed module"? There is a global mapping from module names to module objects. When a module is created by executing a 'define-module' form, it is registered in that global mapping so that 'use-modules' etc can find it. When a module is compiled, we need a compile-time representation of the module, however, for keeping track of imports and macro definitions, etc. That representation can be a real module object, but it would be wrong to register its name in the global mapping since the module will only be partially constructed. When a 'use-modules' form or equivalent is comiled, the referenced module is loaded just as it would be loaded when the 'use-modules' form is executed. When the referenced module in turn references the module that is currently being compiled, it can not use the partially constructed compile-time represenation of the module-being-compiled. The module is then loaded from source or an old compiled version is used (if it isn't already present in the system anyway). However, 'module-ref' forms can also refer to the module-being-compiled by its real name in addition to the special name '#t'. That real name needs to be resolved to the compile-time representation. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel