mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
This diff does not implement the option itself. The reason is that we want
to turn it off in library/LIB_FLAGS.in, and we can do that only when the
installed compiler knows about the option. This diff is therefore the first
step in the two-step bootstrapping process.
compiler/options.m:
Add a new option --warn-stdlib-shadowing, which, after the bootstrapping
step, will cause the compiler to warn about module names that could be
confused with the name of a module in the Mercury standard library.
Add a new option, --output-stdlib-modules, that tools/bootcheck can use
to test whether the compiler's list of Mercury standard library modules
is complete.
Rename the option name output_class_dir to output_java_class_dir
(internally only, leaving the user-visible name unchanged), to fit in
with the names of options related to C#, which have csharp in the name.
compiler/op_mode.m:
Add a new op_mode for --output-stdlib-modules.
compiler/mercury_compile_main.m:
Implement the new op_mode, using new code in library/library.m.
Simplify some existing code.
library/library.m:
Add an exported but undocumented predicate that mercury_compile_main.m
can use to
- find a list of all the Mercury standard library modules, and
- find out for each whether it is documented or not.
Reimplement the existing exported-but-undocumented predicate
in terms of the new one.
library/Mmakefile:
Add mmake targets that check whether the contents of MODULES_DOC and
MODULES_UNDOC match the output of mmc --output-stdlib-modules.
tools/bootcheck:
Use the new mmake targets to do that check.
This directory, mercury/tools, contains scripts that are not intended for use by users. The scripts here are used by the Mercury developers for maintaining the Mercury compiler.