- uninstalling precompiled libraries now works properly.

This commit is contained in:
Abdulaziz Ghuloum 2008-11-12 18:15:42 -05:00
parent dc8d4b33ad
commit 9fcf66ea7f
4 changed files with 19 additions and 7 deletions

View File

@ -23,12 +23,12 @@
$unintern-gensym
reset-symbol-proc! system-value system-value-gensym)
(import
(ikarus system $symbols)
(except (ikarus system $symbols) $unintern-gensym)
(ikarus system $pairs)
(ikarus system $fx)
(except (ikarus) gensym gensym? gensym->unique-string
gensym-prefix gensym-count print-gensym system-value
$unintern-gensym string->symbol symbol->string
string->symbol symbol->string
getprop putprop remprop property-list
top-level-value top-level-bound? set-top-level-value!
symbol-value symbol-bound? set-symbol-value! reset-symbol-proc!))

View File

@ -1 +1 @@
1670
1671

View File

@ -23,7 +23,7 @@
read-library-source-file
library-version-mismatch-warning
file-locator-resolution-error
label-binding set-label-binding!)
label-binding set-label-binding! remove-location)
(import
(only (ikarus.compiler) eval-core)
(only (ikarus.reader.annotated) read-library-source-file)
@ -64,6 +64,11 @@
(define (set-label-binding! label binding)
(set-symbol-value! label binding))
(define (label-binding label)
(and (symbol-bound? label) (symbol-value label))))
(define (label-binding label)
(and (symbol-bound? label) (symbol-value label)))
(define (remove-location x)
(import (ikarus system $symbols))
($unintern-gensym x)))

View File

@ -280,7 +280,14 @@
(lambda (x) (equal? (library-name x) name)))])
(when (and err? (not lib))
(assertion-violation who "library not installed" name))
((current-library-collection) lib #t))]
((current-library-collection) lib #t)
(for-each
(lambda (x)
(let ((label (car x)) (binding (cdr x)))
(remove-location label)
(when (memq (car binding) '(global global-macro global-macro!))
(remove-location (cdr binding)))))
(library-env lib)))]
[(name) (uninstall-library name #t)]))
(define (library-exists? name)