diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2023-06-06 09:06:59 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-06-06 11:54:39 +0200 |
| commit | dc0c5d56ee04d8a2b57f316be7f95b9aca244ab5 (patch) | |
| tree | bf1b2dbbd8f2436a165581edd152becbd243dcd5 | |
| parent | d62c6170efd82b361e08f4f52149709d1c7ae5e4 (diff) | |
records: Use SRFI-11 instead of SRFI-71, for Guile 2.0 compatibility.
This fixes a failure of 'tests/packages.scm' introduced in
b88e38d4b51b9aa0e857baeb614c000e491ad309: some of the tests import (guix
records) on the build side, which uses '%bootstrap-guile' (Guile 2.0)
where SRFI-71 is unavailable.
* guix/records.scm (match-record-inner): Use SRFI-11 instead of SRFI-71.
| -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. |
