The get-module-path function was described in the previous commit.
The get-metadata-path function constructs the paths used to saved .zo files
and so forth; e.g. PATH/compiled/NAME_rkt.zo.
The get-module-path function finds the compiled or source file corresponding
to a module; get-module-code reads and compiles the contents of this file.
This work is preparation for exporting more functionality from this module.
Renamed variables for clarity and to eliminate shadowing.
Turned lets into defines.
Also, add `current-directory-for-user' and `srcloc->string', and
adjust the way that source-location paths are reported to be
relative to `current-directory-for-user'.
The `#%module-begin' of `racket/base' and `scheme/base' now introduces
a suitable `configure-runtime' submodule, instead of using the
`module->language-info' path.
A submodule is a lot easier to work with, as illustrated by the
removal of the `racket/private/lang' and `scheme/private/lang'
languages.
Also, add `#%printing-module-begin', which is the old `#%module-begin'
(i.e., the one that doesn't introduce a `configure-runtime' submodule).
Also cleaned up implementation; only generates syntax for requested part(s) of
source location, and is more intelligent about calculation of relative paths.
The `lazy-require' form expands to `define-runtime-module-path-index',
whch doesn't work right at phase levels other than 0. Work around the
problem by generating a submodule to hold the
`define-runtime-module-path-index' form.
This repair fixes `raco exe' on certain uses of `match', which in turn
uses `lazy-require' at compile time.
Also, use `register-external-module' to generate appropriate
dependencies on lazily loaded modules.
Separate parameters for props to serialize and those to transfer.
Make syntax?/list? checks on attributes explicit.
Also add continuation barrier around metafunction application.