get rid of remove-falses

svn: r11055
This commit is contained in:
Eli Barzilay 2008-08-03 22:07:29 +00:00
parent 15b586c6ed
commit 74dd0655e5

View File

@ -221,10 +221,6 @@
;; forces them to conflict with each other. ;; forces them to conflict with each other.
(list (cons 'lib (map path->string collection-p)) 1 0)))) (list (cons 'lib (map path->string collection-p)) 1 0))))
;; remove-falses : listof (union X #f) -> listof X
;; returns the non-false elements of l in order
(define (remove-falses l) (filter values l))
;; planet-spec->planet-list : (list string string nat nat) -> (list path string string (listof string) nat nat) | #f ;; planet-spec->planet-list : (list string string nat nat) -> (list path string string (listof string) nat nat) | #f
;; converts a planet package spec into the information needed to create a cc structure ;; converts a planet package spec into the information needed to create a cc structure
(define (planet-spec->planet-list spec) (define (planet-spec->planet-list spec)
@ -267,11 +263,11 @@
(define planet-dirs-to-compile (define planet-dirs-to-compile
(if (make-planet) (if (make-planet)
(remove-falses (map (lambda (spec) (apply planet->cc spec)) (filter-map (lambda (spec) (apply planet->cc spec))
(if no-specific-collections? (if no-specific-collections?
(get-all-planet-packages) (get-all-planet-packages)
(remove-falses (map planet-spec->planet-list (filter-map planet-spec->planet-list
x-specific-planet-dirs))))) x-specific-planet-dirs)))
null)) null))
(define all-collections (define all-collections
@ -306,10 +302,10 @@
(and (directory-exists? (build-path ccp p)) (and (directory-exists? (build-path ccp p))
(not (member (path->string p) omit)))) (not (member (path->string p) omit))))
(directory-list ccp))]) (directory-list ccp))])
(remove-falses (make-subs cc subs)))) (filter values (make-subs cc subs))))
(remove-falses (filter values
(let loop ([l collections-to-compile]) (let loop ([l collections-to-compile])
(apply append (map (lambda (cc) (cons cc (loop (get-subs cc)))) l))))) (append-map (lambda (cc) (cons cc (loop (get-subs cc)))) l))))
(define (plt-collection-closure collections-to-compile) (define (plt-collection-closure collections-to-compile)
(collection-closure (collection-closure
@ -395,9 +391,8 @@
(if no-specific-collections? (if no-specific-collections?
all-collections all-collections
(check-again-all (check-again-all
(remove-falses (filter-map (lambda (c) (collection->cc (map string->path c)))
(map (lambda (c) (collection->cc (map string->path c))) x-specific-collections))))))
x-specific-collections)))))))
(set! planet-dirs-to-compile (set! planet-dirs-to-compile
(sort-collections (sort-collections