mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-06 20:56:36 +02:00
Added (library-exists?)
This commit is contained in:
parent
024b384f7a
commit
1451bf7f8e
1 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
||||||
)
|
)
|
||||||
(export
|
(export
|
||||||
library?
|
library?
|
||||||
|
library-exists?
|
||||||
lib:list->import-set
|
lib:list->import-set
|
||||||
lib:name
|
lib:name
|
||||||
lib:name->string
|
lib:name->string
|
||||||
|
@ -61,6 +62,13 @@
|
||||||
(define (library? ast)
|
(define (library? ast)
|
||||||
(tagged-list? 'define-library ast))
|
(tagged-list? 'define-library ast))
|
||||||
|
|
||||||
|
;; Determine if a library exists for the given import set
|
||||||
|
(define (library-exists? import . ext)
|
||||||
|
(file-exists?
|
||||||
|
(lib:import->filename
|
||||||
|
(lib:import->library-name import)
|
||||||
|
(if (null? ext) ".sld" (car ext)))))
|
||||||
|
|
||||||
;; Convert a raw list to an import set. For example, a list might be
|
;; Convert a raw list to an import set. For example, a list might be
|
||||||
;; (srfi 18) containing the number 18. An import set contains only symbols
|
;; (srfi 18) containing the number 18. An import set contains only symbols
|
||||||
;; or sub-lists.
|
;; or sub-lists.
|
||||||
|
|
Loading…
Add table
Reference in a new issue