From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qJ/AAQaGo2MmFgEAbAwnHQ (envelope-from ) for ; Wed, 21 Dec 2022 23:17:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qLkVAQaGo2MtDwAAG6o9tA (envelope-from ) for ; Wed, 21 Dec 2022 23:17:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5FB9F907A for ; Wed, 21 Dec 2022 23:17:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p87Op-0002Rf-EW; Wed, 21 Dec 2022 17:17:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p87OZ-0002QO-CX for guix-patches@gnu.org; Wed, 21 Dec 2022 17:17:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p87OY-0004yw-Ba for guix-patches@gnu.org; Wed, 21 Dec 2022 17:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p87OX-0005iH-VM for guix-patches@gnu.org; Wed, 21 Dec 2022 17:17:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60225] [PATCH] records: match-record supports specifying a different variable name. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Dec 2022 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60225 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Attila Lendvai Cc: 60225@debbugs.gnu.org Received: via spool by 60225-submit@debbugs.gnu.org id=B60225.167166096821944 (code B ref 60225); Wed, 21 Dec 2022 22:17:01 +0000 Received: (at 60225) by debbugs.gnu.org; 21 Dec 2022 22:16:08 +0000 Received: from localhost ([127.0.0.1]:54241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p87Nf-0005hs-To for submit@debbugs.gnu.org; Wed, 21 Dec 2022 17:16:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p87Ne-0005hF-7g for 60225@debbugs.gnu.org; Wed, 21 Dec 2022 17:16:06 -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 1p87NY-0004m5-GE; Wed, 21 Dec 2022 17:16:00 -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=hE4ZX8ZTeQYv5RBmNmDehJk8itFeWKapmtme+fw4w2A=; b=HTvubuawOWC8YAMuCGL7 NhdCbgG4ggZXKFrcuclll/7k8URWjlSWqaJRodbSQ1UXIw703kGO1fmsKQYJmNELbSUDurUG/9hXV gn36SVgCj+GjeWfuLZVSJuyQ0HIh1exLI25kqGaBK4rNl6YudGa9zgBnK4bHDy98nvCG6amqKQV5Q jsPDQ+O1J660aSZtuX+nq/kzl1s2JViAwa1KDrURfgLSOrAhKdT9kOOjUHPMxj6xtnK6XdyeXBvhA xX3mdPNz9Z/iDhFCM8TpVRIv6iiXCy2VdzW9txV1+cN3nE1ufDqIq8fDjqXDqCTFaSvGpcpwIqMAX 260UPnTmcGoYOA==; 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 1p87NY-0001w4-4X; Wed, 21 Dec 2022 17:16:00 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20221220174018.14433-1-attila@lendvai.name> Date: Wed, 21 Dec 2022 23:15:57 +0100 In-Reply-To: <20221220174018.14433-1-attila@lendvai.name> (Attila Lendvai's message of "Tue, 20 Dec 2022 14:40:19 -0300") Message-ID: <871qos4d42.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671661061; a=rsa-sha256; cv=none; b=fe/Q9Pr4NETHkscda6Vi28PRO7xaiHWC79OUGCexzzIp2HXCDA8ZdqddXIGsxgb8k96fmT lB4EX4N0HjM+Ky8i0QNvqe7Nu1AAN/9uButHkz+NCPGXExf0inI2GSnUB/dk6Yi2vOzm0J YQwRP5Rb8xMR3mFM3BMOITl+l6mBEWg6obwwyaOUBjRZxSSevZ4G4LhAWaMKVjMorfU2Cf /6wh2FcGcMEeY5xQDUjv4jVxK6arXwBG5BXa2swrr0aReHLETdA7sAFELh+1xHwFylx68R uD1LeZb89+JUBqDKBozk+5he4sZhAHPfrDKZZNDq4++b+u+Zl3KTORPpWykcNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HTvubuaw; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671661061; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hE4ZX8ZTeQYv5RBmNmDehJk8itFeWKapmtme+fw4w2A=; b=ExaiykWGf9AdymptUZ5SN2yDEw1nDOL1UZF0kMPEj1Cez+kWJvb8U24ttaQc0qsdrxTWG5 wPZhhkWJSyh1pqr0qsjeziIRWUkc2V/bkkocZWHbUgvOcIvW/PBvJt07KOuvzZTIYWf63Z +ElkadfGtSLj+Z5QrtxJ1UHx9c3xJCJHDCOPIkm/nV/MIQ+QUo9l65Ia70DsuY5W0RyPal +kHXVZnVNCOETR2zm+6liAGb7pDFwLSB353BwyuffjuI181x94WgSJptn9xXvItGrCNcGb YxNHGqPiZo8qVqZmBkng7LV/9qfk5wJSFO4Fi20VIZwDiVuV28j4gK+ZnHOh7g== X-Spam-Score: -5.00 X-Migadu-Queue-Id: 5FB9F907A Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HTvubuaw; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.00 X-TUID: D2fD34OfgG4m Hi, Attila Lendvai skribis: > An example: > > (match-record obj > (field1 (field2 custom-var-name) field3) > ...) Nice! It looks like a useful extension to me. > - ((_ record type (field rest ...) body ...) > - #`(let-syntax ((field-offset (syntax-rules () > + ((_ record type ((field-name variable-name) rest ...) body ...) > + #'(let-syntax ((field-offset (syntax-rules () I=E2=80=99d just drop =E2=80=98-name=E2=80=99, it=E2=80=99s all names anywa= y. :-) Could you also add a test in =E2=80=98tests/records.scm=E2=80=99 next to th= e others? TIA, Ludo=E2=80=99.