diff --git a/src/ikarus.boot b/src/ikarus.boot index 06bf600..dd5fd27 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.library-manager.ss b/src/ikarus.library-manager.ss index 487beaa..d58e3c1 100644 --- a/src/ikarus.library-manager.ss +++ b/src/ikarus.library-manager.ss @@ -45,6 +45,11 @@ (find-library-by (lambda (x) (equal? (library-name x) name)))) + (define (library-exists? name) + (and (find-library-by + (lambda (x) (equal? (library-name x) name))) + #t)) + (define (find-library-by-spec/die spec) (let ([id (car spec)]) (or (find-library-by @@ -60,7 +65,7 @@ [inv-lib* (map find-library-by-spec/die inv*)]) (unless (and (symbol? id) (list? name) (list? ver)) (error 'install-library "invalid spec ~s ~s ~s" id name ver)) - (when (find-library-by-name name) + (when (library-exists? name) (error 'install-library "~s is already installed" name)) (let ([lib (make-library id name ver imp-lib* vis-lib* inv-lib* exp-subst exp-env visit-code invoke-code)])