services: configuration: Rewrite id procedure.

* gnu/services/configuration.scm (id): Replace it using the more concise
version found in messaging.scm.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
This commit is contained in:
Mathieu Othacehe 2017-03-24 11:00:14 +01:00 committed by Clément Lassieur
parent e7c797f348
commit d02c3c2234
No known key found for this signature in database
GPG Key ID: 89F96D4808F359C7
1 changed files with 3 additions and 8 deletions

View File

@ -87,14 +87,9 @@
(configuration-field-name field) val))))
fields))
(define (id ctx part . parts)
(let ((part (syntax->datum part)))
(datum->syntax
ctx
(match parts
(() part)
(parts (symbol-append part
(syntax->datum (apply id ctx parts))))))))
(define-syntax-rule (id ctx parts ...)
"Assemble PARTS into a raw (unhygienic) identifier."
(datum->syntax ctx (symbol-append (syntax->datum parts) ...)))
(define-syntax define-maybe
(lambda (x)