emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-racket aa40a48 106/191: racket: fix re-loading of m


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-racket aa40a48 106/191: racket: fix re-loading of modules with submodules (e.g. plai-typed)
Date: Sun, 1 Aug 2021 18:32:09 -0400 (EDT)

branch: elpa/geiser-racket
commit aa40a48849854d31199c0d4306ad9d510a20ee4a
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    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.
---
 geiser/enter.rkt | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/geiser/enter.rkt b/geiser/enter.rkt
index 924ef59..b2e233f 100644
--- a/geiser/enter.rkt
+++ b/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)))))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]