mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
support (import (only (rename ...))) in addition to the other way around (fixes #431)
This commit is contained in:
parent
da28ca8953
commit
2a712b0715
1 changed files with 4 additions and 6 deletions
|
@ -115,15 +115,13 @@
|
|||
(and (not (eq? 'only (car x)))
|
||||
(module-exports
|
||||
(find-module (car mod-name+imports)))))))
|
||||
;; (if (not (eq? 'only (car x)))
|
||||
;; (let ((unbound
|
||||
;; (id-filter (lambda (i) (not (memq i imp-ids))) (cddr x))))
|
||||
;; (if (pair? unbound)
|
||||
;; (warn "import excepting unbound identifiers" unbound))))
|
||||
(cons (car mod-name+imports)
|
||||
(case (car x)
|
||||
((only)
|
||||
(if imp-ids
|
||||
(map (lambda (imp) (or (assq imp imp-ids) imp))
|
||||
(cddr x))
|
||||
(cddr x)))
|
||||
((except)
|
||||
(id-filter (lambda (i) (not (memq i (cddr x)))) imp-ids))
|
||||
((rename)
|
||||
|
|
Loading…
Add table
Reference in a new issue