22 lines
480 B
Scheme
22 lines
480 B
Scheme
|
;;; Compatability layer to translate DEFINE-NAMESPACE to R7RS's
|
||
|
;;; DEFINE-LIBRARY.
|
||
|
|
||
|
(define-syntax import-from-namespace
|
||
|
(syntax-rules ()
|
||
|
((import-from-namespace body ...) (import body ...))))
|
||
|
|
||
|
(define-syntax define-namespace
|
||
|
(syntax-rules ()
|
||
|
((define-namespace ns body ...)
|
||
|
(define-library (namespace ns) body ...))))
|
||
|
|
||
|
(display "hello world\n")
|
||
|
|
||
|
(define-namespace blah
|
||
|
(begin
|
||
|
(define x 5)))
|
||
|
|
||
|
(define-library (namespace blah)
|
||
|
(begin
|
||
|
(define (x) 5)))
|