From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MG6vJSZR7WbVVAAA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Sep 2024 10:40:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id MG6vJSZR7WbVVAAA62LTzQ (envelope-from ) for ; Fri, 20 Sep 2024 12:40:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=GHNlWV1d; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=U8MrvkFm; 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=1726828838; h=from:from:sender:sender:reply-to: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=ncPhGvvLij3mJW3Pl60KSTuVhclk2lIYNppvNs/WgWk=; b=bbI0+nYU5g0k8vA40I8OOXAktRqnVbFJk3Vp8wu6u94bQzDPapz+scioN+TRpi/rUic9MV MCmimCmEaLtUQhKzJjQyix5winFzQyVk1AZw9bbRomyMajtn8ngaPjK9wwNgyHYTQ7VFIP TJSCLd+cEBRv/eKigD9ZzMohe3GbN7JZY3NFZ/5RqCvfGMnxudvYLsnAXDJsshd4VRYLt+ IPrFdQGaGbQaN5sN4cKzwOKIpMSoWsfeZRS315MUXZn8cvAqHWJlHpNmk5dPfBaZtg/S+p dAC580acmqJAkpEvyyu61BFKxAwYtNmM4RvpWYidHITUET15Co0QD/jd5XHQrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=GHNlWV1d; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=U8MrvkFm; 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-Seal: i=1; s=key1; d=yhetil.org; t=1726828838; a=rsa-sha256; cv=none; b=eQc/MQRww//J8RhjmvzPi+3BAHRE9AH22Af1kZTCkYqpHMNNZTyW+3zuS66ZHK1i8eLNC5 QLhr3Z+KwO+wEYNdNVqEaiTBTZ9HzeLapL2aP/VVVZEVasuUOtaPm4SRWFHuF8RRMeMrmd NYCsTJBl9sta7WF6YBvixpcXwZsTYcoPqR+CA8TXqVe3f6/fk8ebz2lEp0uO5s5U37OaGP jbzD+GL4JA50vfRcNsR+gSFjFK5hKGyIhSo1BkFH+lpkVMcQhjd5+1PqEZjm6c3lhcu4Ol HI50tfdiTDidFTA/KrjE26/G0ipPmTrOceV6ZPolsl6ILwbYwC4TtkUTEe4m4Q== 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 51AD1A231 for ; Fri, 20 Sep 2024 12:40:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srb3h-0005Ea-81; Fri, 20 Sep 2024 06:40:17 -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 1srb3H-0004yC-AF for guix-patches@gnu.org; Fri, 20 Sep 2024 06:39:51 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srb3G-0006Ug-RV; Fri, 20 Sep 2024 06:39:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Ksd+i868hihOoO9MvHLHSaGEWwZMK+WYjJjURZIdch0=; b=GHNlWV1dHgm7WPUKssORPVsZ62Vu6JsduY+8Pv05mzLMwcu9eNTkTLiLIv/Q1C7Vm1D5u6QcLQRAGiLb1IGrMei4yJuxMVx9dAN60NCu8ZClLn3mrJCmMCGynAS4Ro50YIK5lSXS9xo8Nzxj/H5o97eOOTu0xqVgQGGrnzb8mSyzL//PM8EKwdLc7ZS7S7FNYF6u80foSmZXVZwnczVgf48QRYhV0h1xV97Niw18ws1vYDuKZeemYIOx8I6YVOCTjNAFzlx91Xy+xjGQNfm3/rAOeRAZbHF2woUm7LMYFUamPhNpdECgXf5LpkMiQQNvHOefu1yqeIK8Qus/cgpbDA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srb3W-0001PX-7v; Fri, 20 Sep 2024 06:40:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73202] [PATCH v2 07/15] guix: records: Add wrap-element procedure. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 10:40:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73202 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73202@debbugs.gnu.org Cc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 73202-submit@debbugs.gnu.org id=B73202.17268287805275 (code B ref 73202); Fri, 20 Sep 2024 10:40:06 +0000 Received: (at 73202) by debbugs.gnu.org; 20 Sep 2024 10:39:40 +0000 Received: from localhost ([127.0.0.1]:34163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srb35-0001Mv-It for submit@debbugs.gnu.org; Fri, 20 Sep 2024 06:39:39 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:54361 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srb2t-0001KU-39 for 73202@debbugs.gnu.org; Fri, 20 Sep 2024 06:39:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1726828735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ncPhGvvLij3mJW3Pl60KSTuVhclk2lIYNppvNs/WgWk=; b=U8MrvkFmbCO6121E0Yq/VKysSOUyE25F2Mne6osjSkhV6pqaJNg5W06GqhpIlnwYeFL7UM bbsV5Td2fzQVb3ooVZa602RAd6e9iuU+rjJPxbgiuma4ahWSSPGJ6+WlWCG+AQ5RUnbkbv U7d9pwoDTGf/FMzcq9maEY7vijaBls64rOZ3hHBstSyXmWsad1XgHia7O9O1m4m9o7vIqE 0d4AazTyrXpfJes6OSh7ijF2f8vlVGhOfDbyzzbKPkfLXwFLoDTcuhOZ7svMzbhaOgkGCJ HUfpYMWJ+kj0WQe0oQV5tad7H572V/+BQcm+3l7UuhQi9q1pLgqtENYcKSQ7MA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id b25ad08c (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <73202@debbugs.gnu.org>; Fri, 20 Sep 2024 10:38:55 +0000 (UTC) Date: Fri, 20 Sep 2024 12:37:52 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via 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 X-Migadu-Spam-Score: -3.41 X-Spam-Score: -3.41 X-Migadu-Queue-Id: 51AD1A231 X-Migadu-Scanner: mx10.migadu.com X-TUID: 9vIfPFBvb/EF * guix/records.scm (wrap-element): Add procedure. Change-Id: If121c5d856e815776830282a0701a73e5ae2a7e7 --- guix/records.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guix/records.scm b/guix/records.scm index c084441441..b521a59257 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012-2024 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver +;;; Copyright © 2024 Lilah Tascheter ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,8 @@ (define-module (guix records) alist->record object->fields recutils->alist + wrap-element + match-record match-record-lambda)) @@ -606,6 +609,10 @@ (define (recutils->alist port) (else (error "unmatched line" line)))))))) +(define (wrap-element x) + "Sanitize a record field value X to a list." + (if (list? x) x (list x))) + ;;; ;;; Pattern matching. -- 2.45.2