* exports from the compiler to the next runtime (system) library
now works.
This commit is contained in:
parent
e568cc87d9
commit
a3aef19781
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -318,8 +318,7 @@
|
||||||
[b (label->binding label r)]
|
[b (label->binding label r)]
|
||||||
[type (binding-type b)])
|
[type (binding-type b)])
|
||||||
(case type
|
(case type
|
||||||
[(define define-syntax core-macro begin macro
|
[(define define-syntax core-macro begin macro module set!)
|
||||||
module set!)
|
|
||||||
(values type (binding-value b) id)]
|
(values type (binding-value b) id)]
|
||||||
[else
|
[else
|
||||||
(values 'call #f #f)]))
|
(values 'call #f #f)]))
|
||||||
|
|
|
@ -16,11 +16,8 @@
|
||||||
;;; Finally, we're ready to evaluate the files and enter the cafe.
|
;;; Finally, we're ready to evaluate the files and enter the cafe.
|
||||||
|
|
||||||
(library (ikarus interaction)
|
(library (ikarus interaction)
|
||||||
(export bar)
|
(export)
|
||||||
(import (scheme) (ikarus greeting))
|
(import (scheme) (ikarus greeting))
|
||||||
|
|
||||||
(define bar 'i-am-an-exported-primitive-named-foo)
|
|
||||||
|
|
||||||
(let-values ([(files script args)
|
(let-values ([(files script args)
|
||||||
(let f ([args (command-line-arguments)])
|
(let f ([args (command-line-arguments)])
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
(define-record library (code export-subst export-env))
|
(define-record library (code export-subst export-env))
|
||||||
|
|
||||||
(define must-export-primitives '(bar))
|
(define export-as-primitive '())
|
||||||
|
|
||||||
(define (expand-file filename)
|
(define (expand-file filename)
|
||||||
(map (lambda (x)
|
(map (lambda (x)
|
||||||
|
@ -114,9 +114,10 @@
|
||||||
(lambda (v)
|
(lambda (v)
|
||||||
(let ([name (car v)])
|
(let ([name (car v)])
|
||||||
(cond
|
(cond
|
||||||
[(memq name must-export-primitives)
|
[(memq name export-as-primitive)
|
||||||
(cons (cons label (cons 'core-prim name)) r)]
|
(cons (cons label (cons 'core-prim name)) r)]
|
||||||
[else r])))]
|
[else
|
||||||
|
(cons (cons label (cons 'global val)) r)])))]
|
||||||
[else (error #f "cannot find binding for ~s" x)])]
|
[else (error #f "cannot find binding for ~s" x)])]
|
||||||
[else (error #f "cannot handle export for ~s" x)]))))
|
[else (error #f "cannot handle export for ~s" x)]))))
|
||||||
(let f ([r r])
|
(let f ([r r])
|
||||||
|
|
Loading…
Reference in New Issue