From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.user Subject: Re: Found a bug in guile 1.6.0 Date: 27 Dec 2002 00:08:57 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <87bs38cr92.fsf@zagadka.ping.de> References: <1040938196.4595.75.camel@localhost> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1040944276 5963 80.91.224.249 (26 Dec 2002 23:11:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 26 Dec 2002 23:11:16 +0000 (UTC) Cc: guile-user@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 18Rh9m-0001Y3-00 for ; Fri, 27 Dec 2002 00:11:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Rh8N-0000xD-00 for guile-user@m.gmane.org; Thu, 26 Dec 2002 18:09:47 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18Rh7x-0000w7-00 for guile-user@gnu.org; Thu, 26 Dec 2002 18:09:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Rh7i-0000CH-00 for guile-user@gnu.org; Thu, 26 Dec 2002 18:09:10 -0500 Original-Received: from dialin.speedway42.dip72.dokom.de ([195.138.42.72] helo=zagadka.ping.de) by monty-python.gnu.org with smtp (Exim 4.10.13) id 18Rh7d-0008Ld-00 for guile-user@gnu.org; Thu, 26 Dec 2002 18:09:01 -0500 Original-Received: (qmail 8036 invoked by uid 1000); 26 Dec 2002 23:08:58 -0000 Original-To: Roland Orre In-Reply-To: <1040938196.4595.75.camel@localhost> Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1468 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1468 Roland Orre writes: > I found a bug when a let clause only contains a macro. > When the clause also contains a lambda clause it works. I don't think this is a bug in Guile, but a bug in the way you are using procedure->macro. The best solution is not to use procedure->macro. Use define-macro (or defmacro) or define-syntax. 'procedure->macro' does not generate what you probably think it does. It creates a "non-memoizing macro", which is expanded everytime it is executed. The second time thru, tho, 'x' contains the internal form of the macro invocation, which is not something that 'car' etc know how to access. You could try (define-macro (push! stack obj) `(set! ,stack (cons ,obj ,stack))) but note that 'stack' is evaluated twice, which matters when you use non-trivial setters/getters. (Just curious: where did you learn about procedure->macro? we don't want people to use it.) -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user