mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Handling of library renames
This commit is contained in:
parent
89ff8efb70
commit
16dd14345a
2 changed files with 12 additions and 10 deletions
18
cyclone.scm
18
cyclone.scm
|
@ -68,15 +68,15 @@
|
||||||
(lib:exports (car input-program))))
|
(lib:exports (car input-program))))
|
||||||
(set! imports (lib:imports (car input-program)))
|
(set! imports (lib:imports (car input-program)))
|
||||||
(set! input-program (lib:body (car input-program)))
|
(set! input-program (lib:body (car input-program)))
|
||||||
; Add any renamed exports to the begin section
|
;; Add any renamed exports to the begin section
|
||||||
;(let ((renames (lib:rename-exports (car input-program))))
|
(let ((renames (lib:rename-exports (car input-program))))
|
||||||
; (set! input-program
|
(set! input-program
|
||||||
; (append
|
(append
|
||||||
; (map
|
(map
|
||||||
; (lambda (r)
|
(lambda (r)
|
||||||
; `(define ,(caddr r) ,(cadr r)))
|
`(define ,(caddr r) ,(cadr r)))
|
||||||
; renames)
|
renames)
|
||||||
; input-program)))
|
input-program)))
|
||||||
;; Prepend any included files into the begin section
|
;; Prepend any included files into the begin section
|
||||||
(if (not (null? includes))
|
(if (not (null? includes))
|
||||||
(for-each
|
(for-each
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
;;; A sample library
|
;;; A sample library
|
||||||
;;;
|
;;;
|
||||||
(define-library (libs lib1)
|
(define-library (libs lib1)
|
||||||
(export lib1-hello lib1-test)
|
(export
|
||||||
|
lib1-hello
|
||||||
|
(rename lib1-test lib1-test-renamed))
|
||||||
(include "lib1.scm")
|
(include "lib1.scm")
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
(scheme write)
|
(scheme write)
|
||||||
|
|
Loading…
Add table
Reference in a new issue