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))))
|
||||
(set! imports (lib:imports (car input-program)))
|
||||
(set! input-program (lib:body (car input-program)))
|
||||
; Add any renamed exports to the begin section
|
||||
;(let ((renames (lib:rename-exports (car input-program))))
|
||||
; (set! input-program
|
||||
; (append
|
||||
; (map
|
||||
; (lambda (r)
|
||||
; `(define ,(caddr r) ,(cadr r)))
|
||||
; renames)
|
||||
; input-program)))
|
||||
;; Add any renamed exports to the begin section
|
||||
(let ((renames (lib:rename-exports (car input-program))))
|
||||
(set! input-program
|
||||
(append
|
||||
(map
|
||||
(lambda (r)
|
||||
`(define ,(caddr r) ,(cadr r)))
|
||||
renames)
|
||||
input-program)))
|
||||
;; Prepend any included files into the begin section
|
||||
(if (not (null? includes))
|
||||
(for-each
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
;;; A sample library
|
||||
;;;
|
||||
(define-library (libs lib1)
|
||||
(export lib1-hello lib1-test)
|
||||
(export
|
||||
lib1-hello
|
||||
(rename lib1-test lib1-test-renamed))
|
||||
(include "lib1.scm")
|
||||
(import (scheme base)
|
||||
(scheme write)
|
||||
|
|
Loading…
Add table
Reference in a new issue