diff --git a/guix/records.scm b/guix/records.scm index dca1e3c2e7..e8b18b1a3e 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012-2024 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver +;;; Copyright © 2024 Lilah Tascheter ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,8 @@ (define-module (guix records) alist->record object->fields recutils->alist + wrap-element + match-record match-record-lambda)) @@ -606,6 +609,10 @@ (define (recutils->alist port) (else (error "unmatched line" line)))))))) +(define (wrap-element x) + "Sanitize a record field value X to a list." + (if (list? x) x (list x))) + ;;; ;;; Pattern matching.