Using `lazy-require' under `begin-for-syntax' expands to a use of
`define-runtime-path' under `begin'for-syntax'. Unfortunately,
`define-runtime-path' doesn't yet work with `raco exe' when it
appears under `begin-for-syntax'. Although `define-runtime-path'
should be fixed, it may take a while. Meanwhile, reverting the
change allows programs that require `racket/gui/base' to work
with `raco exe'.
There's another `lazy-require' under `begin-for-syntax' that
doesn't seem to cause the same trouble, though.
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.
For a non-WXME file, fall back to the original load handler,
instead of re-implementing it. This makes module caching work
the right way. Falling back to the original means closing
the port and then re-opening the file to load, but that seems
ok.
Added a couple of contracts and fixed some others up as well.
The two bugs were that with-contract was not imported, and that
subtype could be called with Values and Results.
The lambda-lifting transformation needs to iterate to a fixpoint
where each lambda's added arguments and order are known. The
check for whether something changed was formerly just the number
of added arguments, but that's not good enough, because a binding
might get lifted away while another one acquires an extra argument.
The right test is to check the count and original bindings for the
added arguments.
Closes PR 12910
Since the optimizer can lambda-lift a function and adds box arguments
(i.e., locations of mutable variables instead of values), then
the validator must check that calls and declarations are consistent.
But declaration-side information wasn't registered properly.
- Allow indexing into a VectorTop, with result `Any`.
- Don't use special typing rules for applications when the operator
has an annotation or instantiation.
Closes PR 12887.
Closes PR 12888.