diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-03-22 14:02:00 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-03-25 23:37:06 +0100 |
commit | abd4d6b33dba4de228e90ad15a8efb456fcf7b6e (patch) | |
tree | 82851cffc3953f138df72fee42a2f5d801dde005 /release.nix | |
parent | 3191b5f6ba5ebbb59a7448facd999ad7f7aeae79 (diff) |
records: Allow thunked fields to refer to 'this-record'.
* guix/records.scm (this-record): New syntax parameter.
(make-syntactic-constructor)[wrap-field-value]: When F is thunked,
return a one-argument lambda instead of a thunk, and parameterize
THIS-RECORD.
(define-record-type*)[thunked-field-accessor-definition]: Pass X
to (real-get X).
* tests/records.scm ("define-record-type* & thunked & this-record")
("define-record-type* & thunked & default & this-record")
("define-record-type* & thunked & inherit & this-record"): New tests.
Diffstat (limited to 'release.nix')
0 files changed, 0 insertions, 0 deletions