diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-09-15 16:39:21 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-09-15 16:39:21 +0200 |
commit | 144025a8c111ca4082e0b039bf459dc5225a2a54 (patch) | |
tree | 4bd1131f8977bd687972ccac055e46b56444d0c8 | |
parent | 5e1e9373efcd937635eea68c94d52aa00f4c565d (diff) | |
download | geiser-chez-144025a8c111ca4082e0b039bf459dc5225a2a54.tar.gz geiser-chez-144025a8c111ca4082e0b039bf459dc5225a2a54.tar.bz2 |
racket: fix re-loading of modules with submodules (e.g. plai-typed)
Resolved module path can now be, besides symbols, a list representing
a submodule. When deciding whether what we are loading in enter's
current loader is a module or not, we have now to take that bit into
account.
-rw-r--r-- | scheme/racket/geiser/enter.rkt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scheme/racket/geiser/enter.rkt b/scheme/racket/geiser/enter.rkt index 924ef59..b2e233f 100644 --- a/scheme/racket/geiser/enter.rkt +++ b/scheme/racket/geiser/enter.rkt @@ -88,7 +88,7 @@ (define ((enter-load/use-compiled orig re?) path name) (when (inhibit-eval) (raise (make-exn:fail "namespace not found" (current-continuation-marks)))) - (if name + (if (and name (or (not (list? name)) (car name))) ;; submodule names are lists ;; Module load: (let* ([code (get-module-code path "compiled" @@ -102,7 +102,7 @@ [path (normal-case-path (simplify-path path))]) (define-values (ts real-path) (get-timestamp path)) (add-paths! (make-mod name path ts code) (resolve-paths path)) - (parameterize ([current-module-declare-source path]) (eval code))) + (parameterize ([current-module-declare-source real-path]) (eval code))) ;; Not a module: (begin (notify re? path) (orig path name)))) @@ -142,5 +142,4 @@ (enter-load/use-compiled orig #f)] [current-module-declare-name rpath] [current-module-declare-source actual-path]) - ((enter-load/use-compiled orig #t) - npath (mod-name mod))))))))) + ((enter-load/use-compiled orig #t) npath (mod-name mod))))))))) |