summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-11-08 13:25:04 +0100
committerLudovic Courtès <ludo@gnu.org>2017-11-08 22:31:58 +0100
commit3943913faca20854453cb873144e2844a07ac31f (patch)
tree127e5d53b8c0249bb814ec42490ea6fe0dd4d605 /gnu
parenta3d37f3ae5c7e07b981196b671e213692b554ad9 (diff)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services.scm7
1 files changed, 6 insertions, 1 deletions
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)