From 3943913faca20854453cb873144e2844a07ac31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 8 Nov 2017 13:25:04 +0100 Subject: [PATCH] services: 'fold-service-types' includes (gnu services). * gnu/services.scm (all-service-modules): New procedure. (fold-service-types): Use it for the default MODULES value. --- gnu/services.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/services.scm b/gnu/services.scm index 89c5d52c83..df1bedeb9b 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -175,9 +175,14 @@ (make-parameter `((,%distro-root-directory . "gnu/services") (,%distro-root-directory . "gnu/system")))) +(define (all-service-modules) + "Return the default set of service modules." + (cons (resolve-interface '(gnu services)) + (all-modules (%service-type-path)))) + (define* (fold-service-types proc seed #:optional - (modules (all-modules (%service-type-path)))) + (modules (all-service-modules))) "For each service type exported by one of MODULES, call (PROC RESULT). SEED is used as the initial value of RESULT." (fold-module-public-variables (lambda (object result)