mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
70a9c72028
commit
59fbeb8cae
2 changed files with 7 additions and 7 deletions
|
@ -36,9 +36,9 @@
|
|||
(match (foo (bar 1))
|
||||
(($ <foo> 1 42) #t)))))
|
||||
|
||||
(test-assert "define-record-type* with letrec* behavior"
|
||||
(test-assert "define-record-type* with let* behavior"
|
||||
;; Make sure field initializers can refer to each other as if they were in
|
||||
;; a `letrec*'.
|
||||
;; a 'let*'.
|
||||
(begin
|
||||
(define-record-type* <bar> bar make-bar
|
||||
foo?
|
||||
|
@ -69,7 +69,7 @@
|
|||
(equal? c d)
|
||||
(match e (($ <foo> 42 77) #t))))))
|
||||
|
||||
(test-assert "define-record-type* & inherit & letrec* behavior"
|
||||
(test-assert "define-record-type* & inherit & let* behavior"
|
||||
(begin
|
||||
(define-record-type* <foo> foo make-foo
|
||||
foo?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue