all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: mirai@makinata.eu
To: 59747@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#59747] [PATCH] services: configuration: rework alist? procedure
Date: Thu,  1 Dec 2022 18:09:47 +0000	[thread overview]
Message-ID: <b2f1c8cccc1c6150b7fc3d56af828c883186bdb7.1669918166.git.mirai@makinata.eu> (raw)

From: Bruno Victal <mirai@makinata.eu>

* 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





             reply	other threads:[~2022-12-01 18:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 18:09 mirai [this message]
2022-12-08 11:59 ` bug#59747: [PATCH] services: configuration: rework alist? procedure Ludovic Courtès
2022-12-08 12:07 ` [bug#59747] [PATCH v2] " mirai
2023-01-25 16:37 ` [bug#59747] [PATCH] services: configuration: simplify " Bruno Victal
2023-01-25 16:38 ` [bug#59747] [PATCH v3] " Bruno Victal
2023-02-18  2:31   ` Bruno Victal
2023-03-21 13:52   ` bug#59747: [PATCH] services: configuration: rework " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2f1c8cccc1c6150b7fc3d56af828c883186bdb7.1669918166.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=59747@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.