Estimated hours taken: 14
Branches: main
Change the compiler and tools so that `.' and not `:' is now used as the
module separator in all output.
Infix `.' now has associativity yfx and priority 10.
NEWS:
Report the change.
configure.in:
Amend the test for an up-to-date Mercury compiler to check whether
it recognises `.' as a module qualifier.
compiler/code_gen.m:
compiler/error_util.m:
compiler/hlds_out.m:
compiler/prog_out.m:
compiler/prog_util.m:
compiler/rl_exprn.m:
compiler/rl_gen.m:
compiler/source_file_map.m:
compiler/unused_args.m:
library/io.m:
library/rtti_implementation.m:
library/type_desc.m:
runtime/mercury_debug.c:
runtime/mercury_deconstruct.c:
runtime/mercury_stack_trace.c:
Change `:' to `.' as module separator for output.
compiler/mercury_to_mercury.m:
compiler/prog_io_typeclass.m:
As above.
Fixed a bug where `.' was not being recognised as a module separator.
doc/reference_manual.texi:
Report the change.
library/term_io.m:
Ensure that infix `.' is written without surrounding spaces.
tests/hard_coded/dot_separator.m:
tests/hard_coded/dot_separator.exp:
tests/hard_coded/Mmakefile:
Test case added.
Estimated hours taken: 1
Branches: main
Make smart recompilation work where the module name doesn't
match the file name (e.g. in the compiler).
compiler/modules.m:
Where the module name doesn't match the file name
and there is a Mercury.modules file, pass the
module name to mmc, not the file name.
compiler/source_file_map.m:
Add a predicate `have_source_file_map' for use
by modules.m.
Don't put the Mercury.modules file in the Mercury
subdirectory. It's the user's responsibility to clean
it up, so it should be in the main directory.
compiler/mercury_compile.m:
Suggest creating the Mercury.modules file if passed
a file name which doesn't match the module name.
compiler/Mmakefile:
browser/Mmakefile:
Generate the Mercury.modules file.
tests/hard_coded/Mmakefile:
The Mercury.modules file is no longer generated in
the Mercury subdirectory.
Estimated hours taken: 0.25
Branches: main
compiler/source_file_map.m:
Fix a bug which caused the Mercury.modules file to be
re-read on each lookup of a source file name.
Estimated hours taken: 8
Branches: main
Allow arbitrary mappings from source file name to module name.
The mapping is created using the command `mmc -f *.m', which must
be run before `mmake depend'.
compiler/parse_tree.m:
compiler/source_file_map.m:
compiler/notes/compiler_design.html:
Add a new module to read, write and search the mapping.
compiler/modules.m:
Use the source file map when searching for source files.
Export `make_directory' for use by source_file_map.m.
Use the module name rather than the source file name to
generate the executable name. This matches the documentation
in the User's Guide, and it's needed to make the tests work.
compiler/prog_io.m:
Separate out the code to read the first item in a module to
find the module name into a new predicate, `find_module_name'.
compiler/handle_options.m:
Don't complain about the module name not matching the file
name when generating the Mercury.modules file -- the file
only needs to be generated when the module name doesn't
match the file name.
compiler/llds_out.m:
Remove a duplicate copy of `make_directory'.
compiler/options.m:
compiler/mercury_compile.m:
doc/user_guide.texi:
Add the `--generate-source-file-mapping' (-f) option
to generate the mapping.
NEWS:
Document the change.
tests/hard_coded/Mmakefile:
tests/hard_coded/source_file_map.m:
tests/hard_coded/mapped_module.exp:
Test case.