mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added (lib:import->path)
This commit is contained in:
parent
924b0943d2
commit
f69f2412b5
1 changed files with 15 additions and 1 deletions
16
trans.scm
16
trans.scm
|
@ -1781,9 +1781,23 @@
|
||||||
(filename
|
(filename
|
||||||
(substring filename* 1 (string-length filename*))))
|
(substring filename* 1 (string-length filename*))))
|
||||||
(if (tagged-list? 'scheme import)
|
(if (tagged-list? 'scheme import)
|
||||||
(string-append (cyc:get-lib-dir filename)) ;; Built-in library
|
(string-append (cyc:get-lib-dir) filename) ;; Built-in library
|
||||||
filename)))
|
filename)))
|
||||||
|
|
||||||
|
;; Get path to directory that contains the library
|
||||||
|
(define (lib:import->path import)
|
||||||
|
(let* ((import-path (reverse (cdr (reverse import))))
|
||||||
|
(path
|
||||||
|
(apply
|
||||||
|
string-append
|
||||||
|
(map
|
||||||
|
(lambda (i)
|
||||||
|
(string-append (symbol->string i) "/"))
|
||||||
|
import-path))))
|
||||||
|
(if (tagged-list? 'scheme import)
|
||||||
|
(string-append (cyc:get-lib-dir) path) ;; Built-in library
|
||||||
|
path)))
|
||||||
|
|
||||||
; !!!!!!!!!!!!!!!!!!!!!!!!
|
; !!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
;TODO: all this basedir stuff below is silly. all we need is a way of saying OK, this
|
;TODO: all this basedir stuff below is silly. all we need is a way of saying OK, this
|
||||||
; is a system library so use cyc:get-lib-dir to find it. I think basedir just goes away
|
; is a system library so use cyc:get-lib-dir to find it. I think basedir just goes away
|
||||||
|
|
Loading…
Add table
Reference in a new issue