On Mon, Feb 05, 2018 at 04:26:52PM +0100, Ludovic Courtès wrote: > Heya Efraim, > > > +(define openntpd-shepherd-service > > + (match-lambda > > + (($ openntpd openntpd-listen-on > > + openntpd-query-from openntpd-sensor openntpd-server > > + openntpd-servers openntpd-constraint-from > > + openntpd-constraints-from allow-large-adjustment?) > > This is error prone (you could be matching the wrong fields), could you > change that to ‘match-record’? > I think this is the only thing left over. I compared my fields to murmur, and for murmur we're looking at true/false or a single value. Other than 'openntpd' and 'allow-large-adjustment?' each are lists because they can all be lists, and I didn't want to make the logic phase of generating the config file to be immensely long. currently: (match-lambda (($ openntpd openntpd-listen-on openntpd-query-from openntpd-sensor openntpd-server openntpd-servers openntpd-constraint-from openntpd-constraints-from allow-large-adjustment?) (let () (define config (string-join (filter-map (lambda (field value) (string-join (map (cut string-append field <> "\n") value))) '("listen on " "query from " "sensor " "server " "servers " "constraint from ") (list openntpd-listen-on openntpd-query-from openntpd-sensor openntpd-server openntpd-servers openntpd-constraint-from)) ;; The 'constraints from' field needs to be enclosed in double quotes. (string-join (map (cut string-append "constraints from \"" <> "\"\n") openntpd-constraints-from)))) Other wise I suppose I'd be looking more at [the following] for most fields: (match-record ... (if (not (null-list? openntpd-listen-on)) (lambda (value) (string-append "listen on " value "\n") value) '()) ... currently to use the defaults I have (service openntpd-service-type (openntpd-configuration)) which obviously isn't ideal. -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted