diff --git a/src/ikarus.boot b/src/ikarus.boot index 0221381..e82d454 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 ad45737..58a530f 100644 --- a/src/ikarus.library-manager.ss +++ b/src/ikarus.library-manager.ss @@ -65,36 +65,29 @@ (define label->binding-table (make-hash-table)) - (define install-library - (case-lambda -; [(id name ver imp* vis* inv* exp-subst exp-env -; visit-code invoke-code) -; (install-library id name ver imp* vis* inv* exp-subst exp-env -; visit-code invoke-code #t)] - [(id name ver imp* vis* inv* exp-subst exp-env - visit-code invoke-code visible?) - (let ([imp-lib* (map find-library-by-spec/die imp*)] - [vis-lib* (map find-library-by-spec/die vis*)] - [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 (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 - visible?)]) - (for-each - (lambda (x) - (let ([label (car x)] [binding (cdr x)]) - (let ([binding - (case (car binding) - [(global) - (cons 'global (cons lib (cdr binding)))] - [else binding])]) - (put-hash-table! label->binding-table label binding)))) - exp-env) - ((current-library-collection) lib) - lib))])) + (define (install-library id name ver imp* vis* inv* + exp-subst exp-env visit-code invoke-code visible?) + (let ([imp-lib* (map find-library-by-spec/die imp*)] + [vis-lib* (map find-library-by-spec/die vis*)] + [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 (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 + visible?)]) + (for-each + (lambda (x) + (let ([label (car x)] [binding (cdr x)]) + (let ([binding + (case (car binding) + [(global) + (cons 'global (cons lib (cdr binding)))] + [else binding])]) + (put-hash-table! label->binding-table label binding)))) + exp-env) + ((current-library-collection) lib)))) (define (imported-label->binding lab) (get-hash-table label->binding-table lab #f))