[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: utils: Make the second 'find-files' argument optional.
From: |
Ludovic Courtès |
Subject: |
07/08: utils: Make the second 'find-files' argument optional. |
Date: |
Wed, 01 Apr 2015 15:11:15 +0000 |
civodul pushed a commit to branch core-updates
in repository guix.
commit 4ba3a84d07168f85f13984e6bd143afc4b70a319
Author: Ludovic Courtès <address@hidden>
Date: Wed Apr 1 15:43:54 2015 +0200
utils: Make the second 'find-files' argument optional.
* guix/build/utils.scm (find-files): Make 'pred' optional.
---
guix/build/utils.scm | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 74165c7..5d229b5 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -273,11 +273,12 @@ name matches REGEXP."
(lambda (file stat)
(regexp-exec file-rx (basename file)))))
-(define (find-files dir pred)
+(define* (find-files dir #:optional (pred (const #t)))
"Return the lexicographically sorted list of files under DIR for which PRED
returns true. PRED is passed two arguments: the absolute file name, and its
-stat buffer. PRED can also be a regular expression, in which case it is
-equivalent to (file-name-predicate PRED)."
+stat buffer; the default predicate always returns true. PRED can also be a
+regular expression, in which case it is equivalent to (file-name-predicate
+PRED)."
(let ((pred (if (procedure? pred)
pred
(file-name-predicate pred))))
- branch core-updates updated (4c0d38b -> 112da58), Ludovic Courtès, 2015/04/01
- 03/08: gremlin: Guard against invalid ELF segments., Ludovic Courtès, 2015/04/01
- 01/08: gnu: node: Remove unneeded import., Ludovic Courtès, 2015/04/01
- 05/08: gnu: Remove unneeded uses of #:imported-modules., Ludovic Courtès, 2015/04/01
- 04/08: build-system: Factorize the list of modules imported on the build side., Ludovic Courtès, 2015/04/01
- 02/08: gremlin: Add libnsl to libc's library list., Ludovic Courtès, 2015/04/01
- 06/08: gnu: Refer to %GNU-BUILD-SYSTEM-MODULES instead of listing modules., Ludovic Courtès, 2015/04/01
- 07/08: utils: Make the second 'find-files' argument optional.,
Ludovic Courtès <=
- 08/08: build-system/gnu: Add 'validate-runpath' phase., Ludovic Courtès, 2015/04/01