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: macros, procedure->macro Date: 13 Jul 2002 20:38:44 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87d6tro4ln.fsf@zagadka.ping.de> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1026585520 21225 127.0.0.1 (13 Jul 2002 18:38:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 13 Jul 2002 18:38:40 +0000 (UTC) Cc: guile-devel@gnu.org, guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17TRmy-0005WE-00 for ; Sat, 13 Jul 2002 20:38:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17TRnS-0002si-00; Sat, 13 Jul 2002 14:39:10 -0400 Original-Received: from dialin.speedway42.dip222.dokom.de ([195.138.42.222] helo=zagadka.ping.de) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17TRn7-0002ow-00 for ; Sat, 13 Jul 2002 14:38:49 -0400 Original-Received: (qmail 1213 invoked by uid 1000); 13 Jul 2002 18:38:44 -0000 Original-To: Dirk Herrmann Original-Lines: 39 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:791 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:791 Dirk Herrmann writes: > I have decided for the solution above to avoid having to export an > additional binding. I hope that we can avoid exporting bindings that are only used in macro expansions. I don't know exactly how (ice-9 syncase) deals with this right now, but I'd say it is supposed to make the following work: (define-module (t1) :use-syntax (ice-9 syncase) :export-syntax foo) (define (bar) #t) (define-syntax foo (syntax-rules () ((foo) (bar)))) (define-module (t2) :use-syntax (ice-9 syncase) :use-module (t1)) (foo) Note that (t1) doesn't export bar, but the expansion of (foo) uses it. I have some vague ideas of how to implement this... the basic one is to add new syntax that allows one to refer to specific bindings from specific modules, on a very low level. For example, we could use (#:module-ref (t1) bar) to get at the bar binding of the (t1) module, from anywhere. Note that we use a keyword in the operator position. (ice-9 syncase) could then rewrite references to global variables to use this form. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel