diff options
| -rw-r--r-- | guix/records.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/guix/records.scm b/guix/records.scm index 6c9f29eb3ec..5af3e780a0a 100644 --- a/guix/records.scm +++ b/guix/records.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; | 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| @@ -20,8 +20,8 @@ | |||
| 20 | (define-module (guix records) | 20 | (define-module (guix records) |
| 21 | #:use-module (srfi srfi-1) | 21 | #:use-module (srfi srfi-1) |
| 22 | #:use-module (srfi srfi-9) | 22 | #:use-module (srfi srfi-9) |
| 23 | #:use-module (srfi srfi-11) | ||
| 23 | #:use-module (srfi srfi-26) | 24 | #:use-module (srfi srfi-26) |
| 24 | #:use-module (srfi srfi-71) | ||
| 25 | #:use-module (ice-9 match) | 25 | #:use-module (ice-9 match) |
| 26 | #:use-module (ice-9 rdelim) | 26 | #:use-module (ice-9 rdelim) |
| 27 | #:autoload (system base target) (target-most-positive-fixnum) | 27 | #:autoload (system base target) (target-most-positive-fixnum) |
| @@ -622,9 +622,11 @@ to thunked values. Raise a syntax violation when the field is not found." | |||
| 622 | (syntax-rules () | 622 | (syntax-rules () |
| 623 | ((_ f) | 623 | ((_ f) |
| 624 | (lookup-field+wrapper record field 0 f))))) | 624 | (lookup-field+wrapper record field 0 f))))) |
| 625 | (let* ((offset wrap (type (map-fields type match-record) | 625 | (let*-values (((offset wrap) |
| 626 | field-offset+wrapper)) | 626 | (type (map-fields type match-record) |
| 627 | (variable (wrap (struct-ref record offset)))) | 627 | field-offset+wrapper)) |
| 628 | ((variable) | ||
| 629 | (wrap (struct-ref record offset)))) | ||
| 628 | (match-record-inner record type (rest ...) body ...)))) | 630 | (match-record-inner record type (rest ...) body ...)))) |
| 629 | ((_ record type (field rest ...) body ...) | 631 | ((_ record type (field rest ...) body ...) |
| 630 | ;; Redirect to the canonical form above. | 632 | ;; Redirect to the canonical form above. |
