Call (lib:list->import-set) for an import set

Call for an import set, not a list of import sets.
This commit is contained in:
Justin Ethier 2016-05-05 00:35:20 -04:00
parent f3f86b8d15
commit c631742a70

View file

@ -102,7 +102,8 @@
(define (lib:imports ast) (define (lib:imports ast)
(lib:result (lib:result
(let ((code (assoc 'import (cddr ast)))) (let ((code (assoc 'import (cddr ast))))
(if code (lib:list->import-set (cdr code)) #f)))) (if code (map lib:list->import-set (cdr code))
#f))))
(define (lib:body ast) (define (lib:body ast)
(lib:result (lib:result
(let ((code (assoc 'begin (cddr ast)))) (let ((code (assoc 'begin (cddr ast))))
@ -215,7 +216,7 @@
(map (map
(lambda (import) (lambda (import)
(lib:import->export-list import)) (lib:import->export-list import))
(lib:list->import-set imports)))) (map lib:list->import-set imports))))
;; Take a list of imports and create a "database" from them ;; Take a list of imports and create a "database" from them
;; consisting of maps between each exported identifier and the ;; consisting of maps between each exported identifier and the
@ -239,7 +240,7 @@
'() '()
(lib:import->export-list import)) (lib:import->export-list import))
) )
(lib:list->import-set imports)))) (map lib:list->import-set imports))))
;; Convert from the import DB to a list of identifiers that are imported. ;; Convert from the import DB to a list of identifiers that are imported.
;; EG: '((call/cc . (scheme base))) ==> '(call/cc) ;; EG: '((call/cc . (scheme base))) ==> '(call/cc)