From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YDKCJ0nuiGOGAwEAbAwnHQ (envelope-from ) for ; Thu, 01 Dec 2022 19:11:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AAyLJ0nuiGOamgAA9RJhRA (envelope-from ) for ; Thu, 01 Dec 2022 19:11:21 +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 71811310A9 for ; Thu, 1 Dec 2022 19:11:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0o1Y-0005aV-7n; Thu, 01 Dec 2022 13:11:04 -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 1p0o1W-0005Yj-MN for guix-patches@gnu.org; Thu, 01 Dec 2022 13:11:02 -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 1p0o1W-0000C3-Dm for guix-patches@gnu.org; Thu, 01 Dec 2022 13:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0o1W-0000Fc-8W for guix-patches@gnu.org; Thu, 01 Dec 2022 13:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59747] [PATCH] services: configuration: rework alist? procedure Resent-From: mirai@makinata.eu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Dec 2022 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59747 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59747@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1669918204950 (code B ref -1); Thu, 01 Dec 2022 18:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Dec 2022 18:10:04 +0000 Received: from localhost ([127.0.0.1]:41150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0o0Z-0000FG-U8 for submit@debbugs.gnu.org; Thu, 01 Dec 2022 13:10:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:34028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0o0U-0000Ei-KK for submit@debbugs.gnu.org; Thu, 01 Dec 2022 13:10:02 -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 1p0o0U-0005Bn-D2 for guix-patches@gnu.org; Thu, 01 Dec 2022 13:09:58 -0500 Received: from smtpm5.myservices.hosting ([185.26.105.236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0o0R-00089b-EU for guix-patches@gnu.org; Thu, 01 Dec 2022 13:09:57 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpm5.myservices.hosting (Postfix) with ESMTP id A725C20C03 for ; Thu, 1 Dec 2022 19:09:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 60BEC80097; Thu, 1 Dec 2022 19:09:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mojQ6jAtVhku; Thu, 1 Dec 2022 19:09:51 +0100 (CET) Received: from guix-nuc.home.arpa (bl12-93-156.dsl.telepac.pt [85.245.93.156]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id A995680093; Thu, 1 Dec 2022 19:09:51 +0100 (CET) From: mirai@makinata.eu Date: Thu, 1 Dec 2022 18:09:47 +0000 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.236; envelope-from=mirai@makinata.eu; helo=smtpm5.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-TUID: fBg4yjcIN7ti From: Bruno Victal * gnu/services/configuration.scm: rework alist? procedure --- gnu/services/configuration.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index dacfc52ba9..5bbb032c66 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -436,7 +436,11 @@ (define (list-of pred?) (define list-of-strings? (list-of string?)) -(define alist? list?) +(define alist? + (match-lambda + (() #t) + ((and (= car head) (= cdr tail)) (and (pair? head) (alist? tail))) + (_ #f))) (define serialize-file-like empty-serializer) base-commit: 748ec628826cea3faa3679074d87fae9bc810080 -- 2.38.1