compiler/make_hlds_passes.m:
We used to add all modules imported by an ancestor of the current module
to the set of used modules. Once upon a time, this was meant to stop
the compiler generating misleading warnings about imports being unused
when the import wasn't even done by the current module. However, since
we introduced structured representations of import- and use_module
declarations and taught unused_imports.m to use them, that has not been
an issue. However, a bad side-effect remained, which was that if
a module A imported a module B but did not use it, or it imported
module B in its interface but did not use in its interface, then
any warning we could generate about that import being unused was
suppressed by any import of module B in any of module A's ancestors.
(The "shadowing" mentioned above.)
Fix the problem by adding modules imported by ancestors of the
current module NOT to the set of used modules, but to a new field
in the module_info.
compiler/hlds_module.m:
Add this new field. As it happens, it is not needed right now,
but it may be needed later.
Update some documentation.
Note an only-tangentially-related problem.
compiler/unused_imports.m:
Fix a bug that was hiding behind the shadowing, which was that whether
the text of the warning message we generated for an unused local import-
or use_module declaration could be affected by the presence of an
import- or use_module declaration in an ancestor module.
Improve debugging infrastructure.
Make a predicate name more descriptive.
NEWS:
Announce the bugfix.
compiler/add_pragma_tabling.m:
compiler/add_solver.m:
compiler/add_type.m:
compiler/parse_string_format.m:
compiler/recompilation.usage.m:
compiler/recompilation.used_file.m:
library/io.call_system.m:
library/io.text_read.m:
library/random.sfc32.m:
library/random.sfc64.m:
library/random.system_rng.m:
library/string.parse_runtime.m:
library/string.parse_util.m:
library/string.to_string.m:
library/thread.closeable_channel.m:
mdbcomp/feedback.automatic_parallelism.m:
Delete imports that the fixed compiler now generates unused import
warnings for.
library/random.m:
Add predicates shuffle_list/{4,5} and shuffle_array/{4,5}.
library/random.m:
library/random.sfc*.m:
Improve comments.
tests/hard_coded/Mmakefile:
tests/hard_coded/random_shuffle*.{m,exp}:
Test the new predicates.
library/random.m:
Move the new code to the existing random module. Update names and
typeclass methods.
Add adaptors to attach any ground or shared generator to the I/O
state.
library/random.sfc{16,32,64}.m:
Move sfc generators to here. Update for changes to interface.
extras/README:
extras/random/*.m:
Move unused generators to a new directory under extras.
library/uint32.m:
Add cast_from_uint/1.
library/MODULES_DOC:
library/library.m:
Update for the module changes.
tests/hard_coded/*:
Rename test cases to correspond with the library module name.
Test the I/O adaptor.