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

View file

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