From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Keith Wright Newsgroups: gmane.lisp.guile.user Subject: Re: Problem with cond macro. Date: Wed, 17 Apr 2002 01:34:33 -0400 Sender: guile-user-admin@gnu.org Message-ID: <200204170534.g3H5YXU01170@fcs9.free-comp-shop.com> References: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019021993 11385 127.0.0.1 (17 Apr 2002 05:39:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 17 Apr 2002 05:39:53 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16xiAa-0002xP-00 for ; Wed, 17 Apr 2002 07:39:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xi9w-0007zy-00; Wed, 17 Apr 2002 01:39:12 -0400 Original-Received: from mx04.gis.net ([208.218.130.12] helo=gis.net) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xi8s-0007xr-00 for ; Wed, 17 Apr 2002 01:38:06 -0400 Original-Received: from fcs9.free-comp-shop.com ([216.41.72.81]) by mx04.gis.net; Wed, 17 Apr 2002 01:38:03 -0400 Original-Received: (from kwright@localhost) by fcs9.free-comp-shop.com (8.11.2/8.11.2) id g3H5YXU01170; Wed, 17 Apr 2002 01:34:33 -0400 X-Authentication-Warning: fcs9.free-comp-shop.com: kwright set sender to kwright@gis.net using -f Original-To: guile-user@gnu.org In-Reply-To: (julian@openit.de) Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 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:199 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:199 > From: julian@openit.de (Julian v. Bock) > > >>>>> "PV" == Panagiotis Vossos writes: > > PV> Ok, I just started studying macros, so I might be missing > PV> something obvious, but the following example from r5rs doesn't > PV> work correctly with guile: > > guile> (let ((=> #f)) > guile> (cond (#t => 'ok))) > guile> In expression (cond (#t => #)): > guile> Wrong type to apply: ok ABORT: I see no macro here. Aren't you using the Guile built-in version of COND? > This works only if cond is implemented as a R5RS macro. This is not > guaranteed by the standard though. That's not the way I read it. R5RS 4.3.2 (near the end) says: R5RS> As an example. if LET and COND are defined as in section 7.3 R5RS> then they are hygenic (as required) and the following is R5RS> not an error. R5RS> I take this to mean that the behaviour shown is required, and that furthermore the hygenic macro system exhibits the required behaviour. Thus the built-in COND should work in the same way as the example implementation given in the R5 Report, even though it may be implemented more (or less) efficiently. -- -- Keith Wright Programmer in Chief, Free Computer Shop --- Food, Shelter, Source code. --- _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user