mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added TODO's and test cases
This commit is contained in:
parent
fe0e357d14
commit
3f6f22d4b6
1 changed files with 11 additions and 0 deletions
|
@ -285,11 +285,13 @@
|
|||
;; Filter to symbols from "only" that appear in export list
|
||||
(filter
|
||||
(lambda (sym)
|
||||
;; TODO: not good enough, need to handle renamed identifiers
|
||||
(member sym exports))
|
||||
(cddr import-set)))
|
||||
((tagged-list? 'except import-set)
|
||||
(filter
|
||||
(lambda (sym)
|
||||
;; TODO: not good enough, need to handle renamed identifiers
|
||||
(not (member sym (cddr import-set))))
|
||||
exports))
|
||||
;;((tagged-list? 'prefix import-set)
|
||||
|
@ -303,6 +305,15 @@
|
|||
;; I think that will be OK.
|
||||
(else
|
||||
exports)))
|
||||
;; TODO: test cases for above:
|
||||
;cyclone> (lib:import-set/exports->imports '(lib) '(a b c d e))
|
||||
;(a b c d e)
|
||||
;cyclone> (lib:import-set/exports->imports '(except (lib) a) '(a b c d e))
|
||||
;(b c d e)
|
||||
;cyclone> (lib:import-set/exports->imports '(rename (lib) (a a1) (d d1)) '(a b c d e))
|
||||
;((a a1) b c (d d1) e)
|
||||
;cyclone> (lib:import-set/exports->imports '(prefix (lib) my-) '(a b c d e))
|
||||
;(my-a my-b my-c my-d my-e)
|
||||
|
||||
;; Take a list of imports and resolve it to the imported vars
|
||||
;(define (lib:resolve-imports imports)
|
||||
|
|
Loading…
Add table
Reference in a new issue