mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 23:37:38 +02:00
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:
parent
f3f86b8d15
commit
c631742a70
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue