From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: macros, procedure->macro Date: 14 Jul 2002 16:23:10 +0100 Sender: guile-user-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1026660479 18733 127.0.0.1 (14 Jul 2002 15:27:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 14 Jul 2002 15:27:59 +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 17TlHx-0004s2-00 for ; Sun, 14 Jul 2002 17:27:57 +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 17TlIJ-0006ZD-00; Sun, 14 Jul 2002 11:28:19 -0400 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17TlHF-0006UK-00; Sun, 14 Jul 2002 11:27:13 -0400 Original-Received: from portalet.ossau.uklinux.net (ppp-1-27.lond-b-3.access.uk.tiscali.com [80.40.13.27]) (authenticated) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id g6EFRAQ21216; Sun, 14 Jul 2002 16:27:10 +0100 Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (laruns.ossau.uklinux.net [192.168.1.3]) by portalet.ossau.uklinux.net (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id E01F21704; Sun, 14 Jul 2002 16:29:08 +0000 (GMT) Original-To: Dirk Herrmann Original-Lines: 38 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:744 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:744 >>>>> "Dirk" == Dirk Herrmann writes: Dirk> On 13 Jul 2002, Neil Jerram wrote: >> Thanks, that's helpful. So we won't support references to a macro >> that is defined in a following top-level form, as in: >> >> (define-macro (foo x) `(list ,(bar x) ,x)) >> (define-macro (bar x) `(* ,x ,x)) >> >> or is there a cunning plan that still allows us to support this? Dirk> I don't see why recursive macros shouldn't be possible. Well, because when the first `define-macro' form is read (universally), macroexpanded (universally) and evaluated (with the quasiquoted part protected from evaluation by an implicit lambda), `bar' is not yet defined. Dirk> This, however, depends on the implementation of the macro Dirk> system used. Yes (in practice), but it should depend first on our specification of how it will work. AFAICT, if the specification is that macroexpansion is `universal' in the way that `read' is, the above example will _not_ work. Dirk> However, there are things that won't work any more: Dirk> (define (foo) (bar)) Dirk> (define-macro (bar) #f) Dirk> (foo) For the purposes of current discussion, I don't see the difference between this example and my one above. (Note that my `(bar x)' above is unquoted, so equivalent to your `(bar)'.) What do you intend to be the key difference? (Perhaps you meant `(define foo (bar))'?) Regards, Neil _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user