[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/6] services: 'fold-service-types' includes (gnu services).
From: |
Ludovic Courtès |
Subject: |
[PATCH 4/6] services: 'fold-service-types' includes (gnu services). |
Date: |
Wed, 8 Nov 2017 14:09:19 +0100 |
* 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 89c5d52c8..df1bedeb9 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)
--
2.15.0
- Re: [PATCH] Re: The usability of Guix configurations, (continued)
- Reporting module errors, Ludovic Courtès, 2017/11/07
- Re: Reporting module errors, myglc2, 2017/11/07
- Re: Reporting module errors, Hartmut Goebel, 2017/11/08
- Re: Reporting module errors, Ludovic Courtès, 2017/11/08
- [PATCH 0/6] Error reporting and hints for missing modules, Ludovic Courtès, 2017/11/08
- [PATCH 1/6] ui: Introduce (guix i18n)., Ludovic Courtès, 2017/11/08
- [PATCH 3/6] services: 'fold-service-types' honors its seed., Ludovic Courtès, 2017/11/08
- [PATCH 5/6] services: Add 'lookup-service-types'., Ludovic Courtès, 2017/11/08
- [PATCH 4/6] services: 'fold-service-types' includes (gnu services).,
Ludovic Courtès <=
- [PATCH 2/6] ui: Define and honor '&error-location' and '&fix-hint' conditions., Ludovic Courtès, 2017/11/08
- [PATCH 6/6] gnu: Improve error reporting of the use-.*modules macros., Ludovic Courtès, 2017/11/08
- Re: [PATCH 6/6] gnu: Improve error reporting of the use-.*modules macros., Chris Marusich, 2017/11/10
- Re: [PATCH 6/6] gnu: Improve error reporting of the use-.*modules macros., Ludovic Courtès, 2017/11/11
- Re: [PATCH 6/6] gnu: Improve error reporting of the use-.*modules macros., Chris Marusich, 2017/11/11
- Re: [PATCH 0/6] Error reporting and hints for missing modules, julien lepiller, 2017/11/08
- Re: [PATCH 0/6] Error reporting and hints for missing modules, myglc2, 2017/11/08
- Re: [PATCH 0/6] Error reporting and hints for missing modules, myglc2, 2017/11/08
- Re: [PATCH 0/6] Error reporting and hints for missing modules, Ludovic Courtès, 2017/11/08
- Re: [PATCH 0/6] Error reporting and hints for missing modules, Ludovic Courtès, 2017/11/09