Handling of library renames

This commit is contained in:
Justin Ethier 2016-04-15 00:16:04 -04:00
parent 89ff8efb70
commit 16dd14345a
2 changed files with 12 additions and 10 deletions

View file

@ -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

View file

@ -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)