all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#59747] [PATCH] services: configuration: rework alist? procedure
@ 2022-12-01 18:09 mirai
  2022-12-08 11:59 ` bug#59747: " Ludovic Courtès
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: mirai @ 2022-12-01 18:09 UTC (permalink / raw)
  To: 59747; +Cc: Bruno Victal

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





^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-21 13:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 18:09 [bug#59747] [PATCH] services: configuration: rework alist? procedure mirai
2022-12-08 11:59 ` bug#59747: " 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

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.