summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-01-27 10:57:18 +0100
committerAndy Wingo <wingo@pobox.com>2011-01-27 10:57:18 +0100
commita27b0f36828baa7a1282fb3595792c21cb4ff9a9 (patch)
treeea1e79f8b9a20e67901e4b2854aaa209c9086e0d
parentdce0252bf2b6b25ce825038472b2c3fa811a0164 (diff)
downloadguile-a27b0f36828baa7a1282fb3595792c21cb4ff9a9.tar.gz
guile-tools uses srfi-1
* meta/guile-tools.in (guile-tools): Use srfi-1 here, now that we can.
-rwxr-xr-xmeta/guile-tools.in17
1 files changed, 3 insertions, 14 deletions
diff --git a/meta/guile-tools.in b/meta/guile-tools.in
index 28ef1ba1c..2d9b61534 100755
--- a/meta/guile-tools.in
+++ b/meta/guile-tools.in
@@ -6,7 +6,7 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@"
;;;; guile-tools --- running scripts bundled with Guile
;;;; Andy Wingo <wingo@pobox.com> --- April 2009
;;;;
-;;;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,8 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@"
;;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;;;; Boston, MA 02110-1301 USA
-(define-module (guile-tools))
+(define-module (guile-tools)
+ #:use-module ((srfi srfi-1) #:select (fold append-map)))
;; Hack to provide scripts with the bug-report address.
(module-define! the-scm-module
@@ -31,14 +32,6 @@ exec guile $GUILE_FLAGS -e '(@@ (guile-tools) main)' -s "$0" "$@"
"@PACKAGE_BUGREPORT@")
-;; We can't import srfi-1, unfortunately, as we are used early in the
-;; boot process, before the srfi-1 shlib is built.
-
-(define (fold kons seed seq)
- (if (null? seq)
- seed
- (fold kons (kons (car seq) seed) (cdr seq))))
-
(define (display-help)
(display "\
Usage: guile-tools --version
@@ -87,10 +80,6 @@ There is NO WARRANTY, to the extent permitted by law.
((equal? (car l) (cadr l)) (unique (cdr l)))
(else (cons (car l) (unique (cdr l))))))
-;; for want of srfi-1
-(define (append-map f l)
- (apply append (map f l)))
-
(define (find-submodules head)
(let ((shead (map symbol->string head)))
(unique