Maxim Cournoyer <maxim.courno...@gmail.com> skribis: > A side-note, it seems that Ludovic has been > working toward eliminating the use of match patterns matching the fields > directly, instead encouraging the use of 'match-record', see > https://issues.guix.gnu.org/59390. I haven't checked if this is > compatible with define-configuration records though.
It is: ‘define-configuration’ builds on ‘define-record-type*’, which builds on SRFI-9, which builds on Guile “records”, which builds on Guile “structs”. :-) --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,m (gnu home services desktop) scheme@(gnu home services desktop)> (home-redshift-configuration) $1 = #<<home-redshift-configuration> redshift: #<package redshift@1.12 gnu/packages/xdisorg.scm:1430 7f155c3ae210> location-provider: geoclue2 adjustment-method: randr daytime-temperature: 6500 nighttime-temperature: 4500 daytime-brightness: %unset-marker% nighttime-brightness: %unset-marker% latitude: %unset-marker% longitude: %unset-marker% dawn-time: %unset-marker% dusk-time: %unset-marker% extra-content: "" %location: #f> scheme@(gnu home services desktop)> (match-record $1 <home-redshift-configuration> (adjustment-method nighttime-temperature) ... (list nighttime-temperature adjustment-method)) $2 = (4500 randr) --8<---------------cut here---------------end--------------->8--- Ludo’.