* run-library-expander now installs and invokes the library

automatically.
This commit is contained in:
Abdulaziz Ghuloum 2007-05-02 20:29:32 -04:00
parent c3767da70e
commit 9a80586934
3 changed files with 24 additions and 15 deletions

Binary file not shown.

View File

@ -45,7 +45,8 @@
(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)])
(set! *all-libraries* (cons lib *all-libraries*)))))
(set! *all-libraries* (cons lib *all-libraries*))
)))
(define scheme-env ; the-env
'([define define-label (define)]

View File

@ -2022,20 +2022,12 @@
(let ([label (cadr x)] [type (caddr x)] [val (cadddr x)])
(cons label (cons type val))))
exp*)])
(build-application no-source
(build-primref no-source 'install-library)
(list (build-data no-source id)
(build-data no-source name)
(build-data no-source ver)
(build-data no-source imp*)
(build-data no-source vis*)
(build-data no-source inv*)
(build-data no-source exp-subst)
(build-data no-source exp-env)
(build-primref no-source 'void)
(build-sequence no-source
(list invoke-code
(build-primref no-source 'void)))))))))
(install-library id name ver
imp* vis* inv* exp-subst exp-env
void
(lambda () (compile-time-eval-hook invoke-code)))
(invoke-library (find-library-by-name name))
(build-void)))))
(define boot-library-expander
(lambda (x)
(let-values ([(name imp* run* invoke-code exp*)
@ -2089,6 +2081,22 @@
#!eof junk
(build-application no-source
(build-primref no-source 'install-library)
(list (build-data no-source id)
(build-data no-source name)
(build-data no-source ver)
(build-data no-source imp*)
(build-data no-source vis*)
(build-data no-source inv*)
(build-data no-source exp-subst)
(build-data no-source exp-env)
(build-primref no-source 'void)
(build-sequence no-source
(list invoke-code
(build-primref no-source 'void)))))
(module (make-stx stx? stx-expr stx-mark* stx-subst*)
(define make-stx
(lambda (e m* s*)