diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-05-16 01:09:39 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-05-17 23:27:39 -0400 |
commit | b7297d66c58b4fe2c153dce4f1069235269cd005 (patch) | |
tree | 40f2e87c8f74db175aab3037f0b374e72974fea5 /build-aux | |
parent | e7e2b1c10b9a779ac7938909dbfafbc739740363 (diff) | |
download | guix-b7297d66c58b4fe2c153dce4f1069235269cd005.tar.gz |
services: configuration: Add a define-maybe/no-serialization syntax.
Before this change, using define-maybe along define-configuration with the no-serialization syntactic keyword would result in the following warning: warning: possibly unbound variable `VARIABLE-NAME' This change introduces the define-maybe/no-serialization variant that does away with defining a serialization helper procedure, which makes it possible to avoid the above warning. * gnu/services/configuration.scm (define-maybe/no-serialization): New syntax. (define-maybe-helper): New procedure. (define-maybe): Define syntax using the above procedure. * tests/services/configuration.scm (tests): Fix module name. (custom-number-serializer): Do not print to standard output. (maybe-number?, serialize-maybe-number): New procedures defined via the define-maybe macro. (config-with-maybe-number): New configuration. (serialize-number): New procedure. ("maybe value serialization"): New test. (maybe-string?): New procedure defined via the define-maybe/no-serialization macro. (config-with-maybe-string/no-serialization): New configuration. ("maybe value without serialization no procedure bound"): New test.
Diffstat (limited to 'build-aux')
0 files changed, 0 insertions, 0 deletions