fix module-name resolver for embedded exe
svn: r3651
This commit is contained in:
parent
1db7ae24c8
commit
399f98ff14
|
@ -426,12 +426,17 @@
|
||||||
(cons path (mod-full-name m))
|
(cons path (mod-full-name m))
|
||||||
#f)))
|
#f)))
|
||||||
code-l)))])
|
code-l)))])
|
||||||
(current-module-name-resolver
|
(letrec ([embedded-resolver
|
||||||
(lambda (name rel-to stx)
|
(case-lambda
|
||||||
(if (or (not name)
|
[(name)
|
||||||
(not (eq? (current-namespace) ns)))
|
;; a notification
|
||||||
;; a notification,or wrong namespace
|
(orig name)]
|
||||||
(orig name rel-to stx)
|
[(name rel-to stx)
|
||||||
|
(embedded-resolver name rel-to stx #t)]
|
||||||
|
[(name rel-to stx load?)
|
||||||
|
(if (not (eq? (current-namespace) ns))
|
||||||
|
;; Wrong namespace
|
||||||
|
(orig name rel-to stx load?)
|
||||||
;; Have a relative mapping?
|
;; Have a relative mapping?
|
||||||
(let ([a (assoc rel-to mapping-table)])
|
(let ([a (assoc rel-to mapping-table)])
|
||||||
(if a
|
(if a
|
||||||
|
@ -477,7 +482,8 @@
|
||||||
;; Have it:
|
;; Have it:
|
||||||
(cdr a3)
|
(cdr a3)
|
||||||
;; Let default handler try:
|
;; Let default handler try:
|
||||||
(orig name rel-to stx))))))))))
|
(orig name rel-to stx load?))))))])])
|
||||||
|
(current-module-name-resolver embedded-resolver))))
|
||||||
|
|
||||||
;; Write a module bundle that can be loaded with 'load' (do not embed it
|
;; Write a module bundle that can be loaded with 'load' (do not embed it
|
||||||
;; into an executable). The bundle is written to the current output port.
|
;; into an executable). The bundle is written to the current output port.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user