define-namespace/define-namespace-7.scm

22 lines
480 B
Scheme
Raw Normal View History

2024-07-29 14:01:20 -04:00
;;; 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)))