From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UMsiCGqUZ2Q11AAASxT56A (envelope-from ) for ; Fri, 19 May 2023 17:23:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0Gr+B2qUZ2Q6HQEAauVa8A (envelope-from ) for ; Fri, 19 May 2023 17:23:22 +0200 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 AFEBF353F8 for ; Fri, 19 May 2023 17:23:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q01wd-0000ST-Os; Fri, 19 May 2023 11:23:03 -0400 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 1q01wd-0000QT-29 for guix-patches@gnu.org; Fri, 19 May 2023 11:23:03 -0400 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 1q01wc-0005al-BR for guix-patches@gnu.org; Fri, 19 May 2023 11:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q01wc-0000o9-7N for guix-patches@gnu.org; Fri, 19 May 2023 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63135] [PATCH 0/3] MATCH-RECROD improvements Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 May 2023 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "(" Cc: Josselin Poiret , 63135@debbugs.gnu.org Received: via spool by 63135-submit@debbugs.gnu.org id=B63135.16845097813089 (code B ref 63135); Fri, 19 May 2023 15:23:02 +0000 Received: (at 63135) by debbugs.gnu.org; 19 May 2023 15:23:01 +0000 Received: from localhost ([127.0.0.1]:57146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01wb-0000ng-9u for submit@debbugs.gnu.org; Fri, 19 May 2023 11:23:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01wY-0000nT-Ot for 63135@debbugs.gnu.org; Fri, 19 May 2023 11:22:59 -0400 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 1q01wR-0005Zu-EG; Fri, 19 May 2023 11:22:52 -0400 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=btqeqAe7QjJeMiSz+y/xRgNvyAFynxTbkRXf9A3mCWw=; b=Zn1YQAuPgoHuDgwpwDKK sw6fATgtNGPP0dqmA6rgaK0KxnC2sS9W1nW2p7tm3q0QAm9obfXaaJufxpglvcclMmf72jW2M9wLk SXGP0/hLzh8jd2v6Lf597lwmiSCdEzi99cERlc544Z93tLI4mCGtns30Y4Lo/Lixw2epu3dSNQJvP X+odv4Sl8S9jL2EK9To8ymZqxm/vORAEqXZzHU7xccypL2FYmLKrsC9/jVYv/nazSuf3gJJ+mrDgZ Wh34JnuP9GqAUnIsW1dR2aU7PGe2t/BaTeeCuW4qCnx3TS+PM6q4tn6Sq5je6N7bh6F6DUhbczQgC Od65YNFhAYMUew==; 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 1q01wR-0004bA-1b; Fri, 19 May 2023 11:22:51 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230428191905.13860-1-paren@disroot.org> <20230428191905.13860-2-paren@disroot.org> Date: Fri, 19 May 2023 17:22:48 +0200 In-Reply-To: <20230428191905.13860-2-paren@disroot.org> (paren@disroot.org's message of "Fri, 28 Apr 2023 20:19:01 +0100") Message-ID: <87h6s8xs53.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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684509801; a=rsa-sha256; cv=none; b=VGH6QLaRtVZu7nMvlZOnmO6vD/ljJL8Q174NWRc237rDXigb5uUtYBmhiCsponzIQwunzT j+sT0uZLDeyCrJOmMB086QZ7JmLqxIKAiWLnaog3mlC8DrkuNV+DCkq5uhogRfoNVby3FV hc1M5xFWgy4gB0SPdy1/u8kgugKzQCSq1YYCp1cowdTdDn1XM0et1ANUF4J7M3frpbeGjy MM/CcJ9HufiBEAVx8AMT8s+7W16sZnSQKYDDllJJ6NmtoM82jNx6vRf48jfw8mRXyg5OmK pw+MP3nx4HjANycg5wu0xDoiHkwNi+LHTPPJaNd64YPIDjglp4dZsTvQenAMCA== 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=Zn1YQAuP; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684509801; 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=btqeqAe7QjJeMiSz+y/xRgNvyAFynxTbkRXf9A3mCWw=; b=PCfmIjGnR25IozqROdjwJmdIQij/uMdgfFjfROHsLxAeqj2YskF5eexUOqkKkkG20lRRH2 Wed+PmC9nF22e04KNIkDaVUcewsdcnzzM4qJ4uzrJz8EvkMS9CRy3CfnuVM8M3nMA+mHXE 2dcmcahx9zWKlLEfvcRpzPBgbIa96LdlCwoONCsXjCx//hdaZzcRU8nLoV5YQ89ASTXdyj Z0vFuS8VNp4JRYV9ytkpw3GIfdktlagYiAVkmncWWAU/LuUV1D/MHuYzGO1vnITozcaFPS iSZWqpzBQiFJgHa+gpGocAx0GCTz7qqEukFP99zCSofwGg6+6ASCRmEWE3K8Yw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Zn1YQAuP; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -2.59 X-Spam-Score: -2.59 X-Migadu-Queue-Id: AFEBF353F8 X-TUID: ocm13YSErbPb Hi, Thanks for these much welcome improvements! "(" skribis: > * guix/records.scm (match-record): Raise a human-compherensible syntax er= ror > if the given record type identifier is unbound. [...] > (define-syntax map-fields > (lambda (x) > - (syntax-violation 'map-fields "bad use of syntactic keyword" x x))) > + (syntax-case x () > + ((_ type within) > + (syntax-violation (syntax->datum #'within) > + "undefined guix record-type" > + #'type)) How about =E2=80=9Cinvalid record type identifier=E2=80=9D? (Rule of thumb: never use =E2=80=9CGuix=E2=80=9D in messages and interfaces= .) > - ((_ map-fields macro) > + ((_ (map-fields _ _) macro) > #'(macro (field ...))) > (id > (identifier? #'id) > @@ -595,7 +600,7 @@ (define-syntax match-record-inner > #'(let-syntax ((field-offset (syntax-rules () > ((_ f) > (lookup-field field 0 f))))) > - (let* ((offset (type map-fields field-offset)) > + (let* ((offset (type (map-fields type match-record) field-off= set)) There=E2=80=99s always a tradeoff; not a strong opinion but I=E2=80=99d lea= n towards keeping the macro unchanged (thus a bit simpler) and simply changing the default =E2=80=98syntax-violation=E2=80=99 message above. WDYT? Ludo=E2=80=99.