library/io.call_system.m:
Move the code in the "system access predicates" section of io.m
to this new module.
library/io.environment.m:
Move the predicates dealing with environment variables in io.m
to this new module.
library/io.m:
Delete the code moved to the new modules.
Leave behind in io.m "forwarding predicates", predicates that do nothing
except call the moved predicates in the new modules, to provide backward
compatibility. But do mark the forwarding predicates as obsolete,
to tell people to update their (at their leisure, since the obsoleteness
warning can be turned off).
Also leave behind in io.m the definitions of the types used
by some parameters of some of the moved predicates.
library/MODULES_DOC:
List the new modules among the documented modules.
library/library.m:
List the new modules, including io.file.m (added in a previous change)
among the documented standard library modules.
NEWS:
Announce the changes.
browser/browse.m:
browser/interactive_query.m:
compiler/fact_table.m:
compiler/handle_options.m:
compiler/make.module_target.m:
compiler/mercury_compile_main.m:
compiler/module_cmds.m:
compiler/optimize.m:
compiler/options_file.m:
deep_profiler/conf.m:
deep_profiler/mdprof_cgi.m:
deep_profiler/mdprof_test.m:
library/io.file.m:
mdbcomp/trace_counts.m:
ssdb/ssdb.m:
tests/general/environment.m:
tests/hard_coded/closeable_channel_test.m:
tests/hard_coded/setenv.m:
tests/hard_coded/system_sort.m:
Call the moved predicates directly in their new modules,
not indirectly through io.m.
tests/general/environment.m:
Catch the exception that is thrown if io.set_environment_var/4 cannot
modify the environment -- this is always the case for Java -- and print
out what the exception is. This avoids the stack trace that would otherwise
be printed.
Update the coding style in this test.
tests/general/environment.exp2:
Add an alternative expected output for systems that do not support
modifying the environment.
tests/general/Mmakefile:
Shift the 'environment' test case to the list of those that
require catching exceptions to be supported.
tests/general/float_roundtrip.exp2:
tests/hard_coded/deep_copy.exp4:
Add new expected outputs to account for differences in the way floats are
printed.
tests/hard_coded/dir_test.exp4:
tests/warnings/singleton_test.exp3:
Update these expected outputs.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Estimated hours taken: 18
Branches: main
Move the univ, maybe, pair and unit types from std_util into their own
modules. std_util still contains the general purpose higher-order programming
constructs.
library/std_util.m:
Move univ, maybe, pair and unit (plus any other related types
and procedures) into their own modules.
library/maybe.m:
New module. This contains the maybe and maybe_error types and
the associated procedures.
library/pair.m:
New module. This contains the pair type and associated procedures.
library/unit.m:
New module. This contains the types unit/0 and unit/1.
library/univ.m:
New module. This contains the univ type and associated procedures.
library/library.m:
Add the new modules.
library/private_builtin.m:
Update the declaration of the type_ctor_info struct for univ.
runtime/mercury.h:
Update the declaration for the type_ctor_info struct for univ.
runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
Update the definition of MR_Univ.
runtime/mercury_init.h:
Fix a comment: ML_type_name is now exported from type_desc.m.
compiler/mlds_to_il.m:
Update the the name of the module that defines univs (which are
handled specially by the il code generator.)
library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
Conform to the above changes. Import the new modules where they
are needed; don't import std_util where it isn't needed.
Fix formatting in lots of modules. Delete duplicate module
imports.
tests/*:
Update the test suite to confrom to the above changes.
Estimated hours taken: 1
runtests:
Compare actual outputs with the outputs computed by NU-Prolog.
Mmake:
Enable the dnf test.
commit_bug.m:
Use more readable formatting.
environment.m:
Since the expected output may be generated on a different machine
than the one on which the test is run, don't print the value of
a possibly machine-specific environment variable such as PATH.
semidet_lambda.m:
Fix the name of the module.
univ.m:
Add a couple of tests to exercise the typeinfo comparison routine.
unreachable.m:
Fix a comment.
*.exp:
The expected output files.
Estimated hours taken: 0.1
tests/general/environment.m:
Change the code to reflect the documentation:
use PATH, not TERM, as the name of a environment
variable which should always be set. (After all,
when you run the tests from a crontab, TERM doesn't
get set.)
Estimated hours taken: 0.5
Update test suite now that bool is a separate module and
`term_*' is now `term__*'.
tests/general/environment.m:
Import `bool'. `std_util__bool_not' is now `bool__not'.
tests/general/interpreter.m:
Replace `term_' with `term__' where appropriate.
tests/general/set_test.m:
Fix some bugs in the test case.
tests/general/hello_again.m:
Avoid `incorrect module name' warning.