From 144025a8c111ca4082e0b039bf459dc5225a2a54 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 15 Sep 2012 16:39:21 +0200 Subject: 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. --- scheme/racket/geiser/enter.rkt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scheme/racket/geiser') 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))))))))) -- cgit v1.2.3