From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YoOqCB+Yg2QHFQAASxT56A (envelope-from ) for ; Fri, 09 Jun 2023 23:22:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wOzNBx+Yg2Sv1QAAauVa8A (envelope-from ) for ; Fri, 09 Jun 2023 23:22:39 +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 38D081D0B for ; Fri, 9 Jun 2023 23:22:38 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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=1686345758; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=QeomQZDpPWh5rIdYbqIdUQ8zL54PtoVQCJiRXWSjmgk=; b=la71Vr7adJAk5n+o1wDJcD5Sp/JV1hnPQVgyss8l2WTcL25mfVDl2bhOdr38weldMsdZ8Z xs/qRozb5DJiPRtqJd75qr6WhXs4VK4zpAPCP8YFLiAD9b0kWNpb02wZPaQefJgoqwa0IN nKZ4HJ8TRxGzDpOC1DerU+kP8uF3Vdatmxi8FbgMPSt4J7VrxcgOGvAAWb+uMhMAYMaapE 7y/bsHmVYDLYztBYqnIOOGUcV2oBMH4cEK+zPVckyhJD5832w8MI8dV0ZEh83MSBrn4A8m J4GqrKR4rAvKqX3Cawtkhf+Xz5pNiObewPYkl6sC0hq+zusJkv12NiK2BbcJhA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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-Seal: i=1; s=key1; d=yhetil.org; t=1686345758; a=rsa-sha256; cv=none; b=nrSIE8ZFzNGwuRl5uagKMHCXg0KVpgmCGygcmo+SAXRwIWWl04VISB+FUEFaCr6YrMOB68 RlJFX5yYQFpgtehaWbvAXOWETDxFJNGqWW4Es6zFWXObEhtg+nxzq9owGQpFTvPfJZigTk N4e9rUBQKpwcijYxSPqkt3WSiVmIhm6utohtcofAI20lDdajVaIsiMqSIDdPGBzBXbpL8Q goNBIpNagS6MNlQ0UX8NWUqWvFTIg1onyagPqtilB6TFhnMOh1N6RKrJ6h6vyRzz9gMbOG 4QUNLwdNzAPaDbmD98lzviRxtuyO5ALM0PvPzPpP/d2sxcJ6DBNb9akyWKe1KQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7jYc-00062l-Sm; Fri, 09 Jun 2023 17:22:06 -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 1q7jYY-00061t-W9 for guix-patches@gnu.org; Fri, 09 Jun 2023 17:22: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 1q7jYY-0007Pi-My for guix-patches@gnu.org; Fri, 09 Jun 2023 17:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7jYY-0000Vq-Ir for guix-patches@gnu.org; Fri, 09 Jun 2023 17:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63985] [PATCH RFC 3/5] services: fstrim-service-type: Serialize with SRFI-171 transducers. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2023 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63985@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 63985-submit@debbugs.gnu.org id=B63985.16863456941909 (code B ref 63985); Fri, 09 Jun 2023 21:22:02 +0000 Received: (at 63985) by debbugs.gnu.org; 9 Jun 2023 21:21:34 +0000 Received: from localhost ([127.0.0.1]:32881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7jY6-0000Uj-BN for submit@debbugs.gnu.org; Fri, 09 Jun 2023 17:21:34 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:44790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7jY4-0000UV-Kr for 63985@debbugs.gnu.org; Fri, 09 Jun 2023 17:21:32 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 1260B208D0 for <63985@debbugs.gnu.org>; Fri, 9 Jun 2023 23:21:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6852D8009C; Fri, 9 Jun 2023 23:21:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o20jgf_5watt; Fri, 9 Jun 2023 23:21:23 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id F08C080098; Fri, 9 Jun 2023 23:21:22 +0200 (CEST) From: Bruno Victal Date: Fri, 9 Jun 2023 22:20:58 +0100 Message-Id: <77911cd47e7ae77df6d614d7d07d78b5cf7781f0.1686345627.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: UNKNOWN X-Migadu-Flow: FLOW_IN X-Spam-Score: -0.56 X-Migadu-Queue-Id: 38D081D0B X-Migadu-Scanner: in3.migadu.com X-Migadu-Spam-Score: -0.56 X-TUID: +Zy3Se+ZW7dJ * gnu/services/linux.scm (serialize-fstrim-configuration): Refactor to use base-transducer. --- gnu/services/linux.scm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm index d105c42850..3cfa6d6855 100644 --- a/gnu/services/linux.scm +++ b/gnu/services/linux.scm @@ -40,6 +40,7 @@ (define-module (gnu services linux) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) + #:use-module (srfi srfi-171) #:use-module (ice-9 format) #:use-module (ice-9 match) #:export (earlyoom-configuration @@ -227,13 +228,9 @@ (define-configuration fstrim-configuration (prefix fstrim-)) (define (serialize-fstrim-configuration config) - (concatenate - (filter list? - (map (lambda (field) - ((configuration-field-serializer field) - (configuration-field-name field) - ((configuration-field-getter field) config))) - fstrim-configuration-fields)))) + (list-transduce (compose (base-transducer config) tconcatenate) + rcons + fstrim-configuration-fields)) (define (fstrim-mcron-job config) (match-record config (package schedule) -- 2.39.2