From 55b2d921456e888f097bf4e43a3d25b112f3e563 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 28 Jan 2017 17:09:34 +0100 Subject: Use 'mlambda' instead of 'memoize'. * gnu/packages.scm (find-newest-available-packages): Use 'mlambda' instead of (memoize (lambda ...) ...). * gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Likewise. * guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]: Likewise. * guix/build-system/python.scm (package-with-explicit-python)[transform]: Likewise. * guix/derivations.scm (derivation->string): Likewise. * guix/gnu-maintenance.scm (gnu-package?): Likewise. * guix/modules.scm (module-file-dependencies): Likewise. * guix/scripts/graph.scm (standard-package-set): Likewise. * guix/scripts/lint.scm (official-gnu-packages*): Likewise. * guix/store.scm (store-regexp*): Likewise. * guix/utils.scm (location): Likewise. --- guix/scripts/graph.scm | 11 +++++------ guix/scripts/lint.scm | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'guix/scripts') diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 8c82d8978c..9804d41929 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -191,12 +191,11 @@ (define %bag-with-origins-node-type %store-monad)))) (define standard-package-set - (memoize - (lambda () - "Return the set of standard packages provided by GNU-BUILD-SYSTEM." - (match (standard-packages) - (((labels packages . output) ...) - (list->setq packages)))))) + (mlambda () + "Return the set of standard packages provided by GNU-BUILD-SYSTEM." + (match (standard-packages) + (((labels packages . output) ...) + (list->setq packages))))) (define (bag-node-edges-sans-bootstrap thing) "Like 'bag-node-edges', but pretend that the standard packages of diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index cb64dc8b2b..0b38aac319 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -559,12 +559,11 @@ (define (escape-quotes str) str))) (define official-gnu-packages* - (memoize - (lambda () - "A memoizing version of 'official-gnu-packages' that returns the empty + (mlambda () + "A memoizing version of 'official-gnu-packages' that returns the empty list when something goes wrong, such as a networking issue." - (let ((gnus (false-if-exception (official-gnu-packages)))) - (or gnus '()))))) + (let ((gnus (false-if-exception (official-gnu-packages)))) + (or gnus '())))) (define (check-gnu-synopsis+description package) "Make sure that, if PACKAGE is a GNU package, it uses the synopsis and -- cgit v1.2.3