From f549a9e634c2724a3e6c08123e42809609d152d2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 17 Jul 2012 08:49:53 -0600 Subject: [PATCH] submodules: make .zo path stick for consistent independent loading When a module is loaded from bytecode and then the value of `use-compiled-file-paths' changes, an attempt to load a submodule would fail, because source isn't used if the main module is already declared, and the bytecode code is not used according to `use-compiled-file-paths'. Make the bytecode path stick when it is used once, so that submodule loads succeed, and make it work even with `namespace-module-attach'. The module-attach part of this protocol requires a change to the API of a module name resolver: the notification mode gets two arguments, instead of one, where the second argument is an environment. original commit: c8f4ac6ae47023157a337aa5e164b74439e373d6 --- collects/typed-racket/base-env/base-env.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/typed-racket/base-env/base-env.rkt b/collects/typed-racket/base-env/base-env.rkt index ee0a3016..3da407c3 100644 --- a/collects/typed-racket/base-env/base-env.rkt +++ b/collects/typed-racket/base-env/base-env.rkt @@ -1828,13 +1828,13 @@ [resolved-module-path-name (-> -Resolved-Module-Path (Un -Path -Symbol))] [module-path? (asym-pred Univ B (-FS (-filter -Module-Path 0) -top))] -[current-module-name-resolver (-Param (cl->* (-Resolved-Module-Path . -> . Univ) +[current-module-name-resolver (-Param (cl->* (-Resolved-Module-Path Univ . -> . Univ) ((Un -Module-Path -Path) (-opt -Resolved-Module-Path) (-opt (-Syntax Univ)) -Boolean . -> . -Resolved-Module-Path)) - (cl->* (-Resolved-Module-Path . -> . Univ) + (cl->* (-Resolved-Module-Path Univ . -> . Univ) ((Un -Module-Path -Path) (-opt -Resolved-Module-Path) (-opt (-Syntax Univ))