From c0cd1b3ea7753fe2826f7a336019000df9dea96f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 12 May 2013 15:46:16 +0200 Subject: Move record utilities to (guix records). * guix/utils.scm (define-record-type*): Move to... * guix/records.scm: ... here. New file. * guix/build-system.scm, guix/packages.scm: Use it. * guix/gnu-maintenance.scm: Likewise. (official-gnu-packages)[alist->record]: Remove. * guix/scripts/substitute-binary.scm: Likewise. (alist->record, object->fields): Remove. * tests/utils.scm ("define-record-type*", "define-record-type* with letrec* behavior", "define-record-type* & inherit", "define-record-type* & inherit & letrec* behavior", "define-record-type* & thunked", "define-record-type* & thunked & default", "define-record-type* & thunked & inherited"): Move to... * tests/records.scm: ... here. New file. --- guix/gnu-maintenance.scm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'guix/gnu-maintenance.scm') diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index e39094db72..b54cd84ecf 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -32,6 +32,7 @@ #:use-module (guix ftp-client) #:use-module (guix ui) #:use-module (guix utils) + #:use-module (guix records) #:use-module (guix packages) #:use-module ((guix download) #:select (download-to-store)) #:use-module (guix gnupg) @@ -150,12 +151,6 @@ (remove null-list? state) (match-field line)))) - (define (alist->record alist make keys) - ;; Apply MAKE, which should be a syntactic constructor, to the - ;; values associated with KEYS in ALIST. - (let ((args (map (cut assoc-ref alist <>) keys))) - (apply make args))) - (reverse (map (lambda (alist) (alist->record alist -- cgit v1.2.3