From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 27 17:53:20 2022 Received: (at 60225) by debbugs.gnu.org; 27 Dec 2022 22:53:20 +0000 Received: from localhost ([127.0.0.1]:56740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAIox-0001ed-KA for submit@debbugs.gnu.org; Tue, 27 Dec 2022 17:53:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAIow-0001eR-CK for 60225@debbugs.gnu.org; Tue, 27 Dec 2022 17:53:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAIor-0001OH-5O; Tue, 27 Dec 2022 17:53:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=hn6ABW5op0MTA0U/a3pviXp443EKAAnqMNmXi7Fchk4=; b=M3sXAkLSQLlJ0e8qf1DP 5xmI6ozKZ6EbLMGAGDihOYuhQbBhgrBq8V8IITh1Q2eM6fnVHuRQZvBcn47RrlgK/Q5uwTShyFg4D oEtNaISWJWbELicUUjmsL1xuoffXLOJoryOl0q+KdFt2h598bTbsrGqwB7UvmpFbmCTeu23M9/cMj Hf4AUiB23FTiJh5QOeIyjDmnmE1KLhMijinIoT6aDT/4S8UeNMEcyLcmtEP6Zg7n57A+/YU5+M6RB dKWFH6LKkClSZGaxA+yao8pfwTYhhem35n5ulC+tDwnJA0VRHa+AAZynvJC7YwmyB/SI+Q25+PpkW QHGdjYkdBdj2JA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAIoq-00025W-QH; Tue, 27 Dec 2022 17:53:13 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Attila Lendvai Subject: Re: bug#60225: [PATCH] records: match-record supports specifying a different variable name. References: <20221222021455.18632-1-attila@lendvai.name> <20221222021455.18632-2-attila@lendvai.name> Date: Tue, 27 Dec 2022 23:53:11 +0100 In-Reply-To: <20221222021455.18632-2-attila@lendvai.name> (Attila Lendvai's message of "Wed, 21 Dec 2022 23:14:57 -0300") Message-ID: <87sfh0a27c.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60225 Cc: 60225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Attila Lendvai skribis: > * tests/records.scm ("match-record, syntactic interference"): New failing= test. > --- > > i'm not sure what's going on here, but it looks like a bug to me. [...] > + (let (,@bindings) ; but here it does interfere > + (match-record (foo (second 2)) > + (first second) > + (list first second)))))) This has to do with how macro =E2=80=9Cliterals=E2=80=9D are matched (info = "(guile) Syntax Rules"): A literal matches an input expression if the input expression is an identifier with the same name as the literal, and both are unbound(1). Although literals can be unbound, usually they are bound to allow them to be imported, exported, and renamed. *Note Modules::, for more information on imports and exports. In Guile there are a few standard auxiliary syntax definitions, as specified by R6RS and R7RS: In the example above, the =E2=80=98let=E2=80=99 binding for =E2=80=98second= =E2=80=99 was shadowing the other =E2=80=98second=E2=80=99. (I think this was recently discussed on guix-devel or something.) Ludo=E2=80=99.