diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-10-15 23:31:22 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-10-15 23:31:22 +0200 |
commit | 59fbeb8cae02032a2f8b7966ab52545817f3ed88 (patch) | |
tree | 8cc11a9022a0a7c0112a3ab248ba82822a5bd171 /guix | |
parent | 70a9c7202866df594628750f7c4c242f4fd53e60 (diff) | |
download | gnu-guix-59fbeb8cae02032a2f8b7966ab52545817f3ed88.tar gnu-guix-59fbeb8cae02032a2f8b7966ab52545817f3ed88.tar.gz |
records: define-record-type*: Field bindings are bound with 'let*'.
* guix/records.scm (define-record-type*): Wrap field bindings in a
'let*', not in a 'letrec*', which turned out to be pointlessly
inconvenient.
* tests/records.scm: Adjust test names accordingly.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/records.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guix/records.scm b/guix/records.scm index d47bbf89f2..37d34b4c81 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -73,7 +73,7 @@ thunked fields." (memq (syntax->datum f) '#,thunked)) (define (field-bindings field+value) - ;; Return field to value bindings, for use in `letrec*' below. + ;; Return field to value bindings, for use in 'let*' below. (map (lambda (field+value) (syntax-case field+value () ((field value) @@ -85,7 +85,7 @@ thunked fields." (syntax-case s (inherit #,@fields) ((_ (inherit orig-record) (field value) (... ...)) - #`(letrec* #,(field-bindings #'((field value) (... ...))) + #`(let* #,(field-bindings #'((field value) (... ...))) #,(record-inheritance #'orig-record #'((field value) (... ...))))) ((_ (field value) (... ...)) @@ -116,8 +116,8 @@ thunked fields." s))))) (let ((fields (append fields (map car dflt)))) (cond ((lset= eq? fields 'expected) - #`(letrec* #,(field-bindings - #'((field value) (... ...))) + #`(let* #,(field-bindings + #'((field value) (... ...))) (ctor #,@(map field-value 'expected)))) ((pair? (lset-difference eq? fields 'expected)) (error* "extraneous field initializers ~a" |