Replace __ with . as the module qualifier symbol.
Replace references to io.state with just io.
Replace DCGs with state variables.
Replace (C->T;E) syntax for if-then-elses with (if C then T else E) syntax.
Replace if-then-elses with switches when possible and where this does not
affect what is being tested.
Replace separate pred and mode declarations with predmode declarations.
Put predicate and function declarations just before the definition
of the predicate or function.
Delete unneeded module qualifications on predicate and function declarations
and definitions.
Update .exp files (and if needed, .inp files) for the line number changes
that result from the above.
For tests that have more than one .exp file and where one of those files
is affected by the above, add a section to the source file header that says
which .exp file is for what grade, with XXXs for the (as yet) unknown parts.
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: 5
Allow the value of an exception to be printed and browsed
at EXCP events in the internal debugger. Two new commands
are added to the debugger:
print exception
browse exception
trace/mercury_trace_internal.c:
Implement the new commands.
runtime/mercury_trace_base.c:
runtime/mercury_trace_base.h:
Export functions to get/set a global which stores the
value of an exception for the internal debugger to refer to.
library/exception.m:
Set the exception value before generating EXCP events.
doc/user_guide.texi:
Document the new debugger commands.
tests/debugger/Mmakefile:
tests/debugger/exception_value.m:
tests/debugger/exception_value.inp:
tests/debugger/exception_value.exp:
tests/debugger/exception_value.exp2:
Add a test case.