small fixes in stdlib

This commit is contained in:
Felix Brendel
2019-09-23 22:44:08 +02:00
parent 088127387e
commit 97f45f166f
4 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -141,9 +141,9 @@ ithe sequence as arguemens."
@body)))
(define-syntax (define-module module-name :exports . body)
(define-syntax (define-module module-name (:imports ()) :exports . body)
(let ((module-prefix (concat-strings (symbol->string module-name) "::")))
(eval `(begin @body))
(eval `(begin @(map (lambda (x) `(,import ,x)) imports) @body))
(pair 'begin
(map (lambda (orig-export-name)
(let ((export-name (string->symbol
@@ -151,7 +151,7 @@ ithe sequence as arguemens."
(symbol->string orig-export-name)))))
`(define ,export-name
,(mytry (eval orig-export-name)
(error "The module does not contain" orig-export-name)))))
(error "The module does not contain" orig-export-name)))))
exports))))