From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marijn Newsgroups: gmane.lisp.guile.devel,gmane.comp.lang.racket.devel Subject: Re: Enhancement to the syntax system? Date: Tue, 10 Jul 2012 16:34:26 +0200 Message-ID: <4FFC3D72.8070506@gentoo.org> References: <877gumufmq.fsf@gnu.org> <87r4stss4d.fsf@gnu.org> <878vf0o7gs.fsf@gnu.org> <87pq85dj8o.fsf@gnu.org> <87sjd058ia.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341930478 12166 80.91.229.3 (10 Jul 2012 14:27:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Jul 2012 14:27:58 +0000 (UTC) Cc: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= , guile-devel@gnu.org To: Stefan Israelsson Tampe , "dev@racket-lang.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jul 10 16:27:55 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SobPt-0006Rz-2f for guile-devel@m.gmane.org; Tue, 10 Jul 2012 16:27:53 +0200 Original-Received: from localhost ([::1]:41856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SobPs-0000xD-41 for guile-devel@m.gmane.org; Tue, 10 Jul 2012 10:27:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SobPj-0000vO-An for guile-devel@gnu.org; Tue, 10 Jul 2012 10:27:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SobPX-0005Sr-Cg for guile-devel@gnu.org; Tue, 10 Jul 2012 10:27:42 -0400 Original-Received: from smtp.gentoo.org ([140.211.166.183]:54762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SobPX-0005S2-6W; Tue, 10 Jul 2012 10:27:31 -0400 Original-Received: from [10.128.1.210] (unknown [79.170.210.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hkbst) by smtp.gentoo.org (Postfix) with ESMTPSA id 714C01B405E; Tue, 10 Jul 2012 14:27:19 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120618 Thunderbird/13.0 In-Reply-To: X-Enigmail-Version: 1.5pre X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 140.211.166.183 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14727 gmane.comp.lang.racket.devel:6396 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10-07-12 15:35, Stefan Israelsson Tampe wrote: > I did miss something when trying in racket, it's a psyntax bug! I'm glad you're finally looking harder at the Racket behavior. > racket: (define-for-syntax (f x) #`(let ((x 1)) #,x)) >> (define-syntax (g x) (syntax-case x ()((_ y) #`(let ((x y)) #,(f >> #'x)))) > ) >> (g 4) > 4 This code produces the same error for me with Racket which I reported earlier, but I seem to have been using a non-release version. So, switching to 5.2.1, I can report that indeed the code #lang racket (define-for-syntax (f x) #`(let ((x 1)) #,x)) (define-syntax (g x) (syntax-case x () ((_ y) #`(let ((x y)) #,(f #'x))))) (g 4) produces 4, which makes sense to me. However when I retry my earlier example #lang racket (define-for-syntax (f stx) #`(let ((x 1)) #,stx)) (define-syntax (m stx) (syntax-case stx () ((_) #`(let ((x 2)) #,(f #'x))) )) (m) it now produces 1 instead of the expected 2. It seems to me that both these results cannot be correct simultaneously, but I'll await the experts' opinion on that. Marijn -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/8PXIACgkQp/VmCx0OL2zdfQCeOVJz/ECKExThGPJoqvRY3E41 gr0An0vSsuXK2B7xi0WT0LuzvVvhUbcy =04xS -----END PGP SIGNATURE-----