tests/hard_coded/*.m:
Update programming style, unless doing so would change
the meaning of the test, in particular:
- use '.' as a module qualifier in place of '__'
- use {write,print}_line where appropriate
- use if-then-else in place of C -> T ; E
- use state variables in place of DCGs
tests/hard_coded/dir_test.m:
Document what the expected outputs correspond to.
Use a uniform module qualifier in the output.
tests/hard_coded/dir_test.exp*:
Conform to the above change.
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: 0.25
Branches: main
Address Fergus's review comments about the change
to add unification expressions to the language.
doc/reference_manual.texi:
Be more explicit about the evaluation order
of unification expressions.
Fix some formatting errors.
library/ops.m:
Fix a comment -- `@' is not an ISO Prolog operator,
it is a Mercury extension.
tests/hard_coded/unify_expression.{m,exp}:
Test the evaluation order of unification expressions.
Estimated hours taken: 1
Add unification expressions, written `X @ Y', to the language.
`X @ Y' unifies X and Y and returns the result. Unification
expressions can make switches more compact.
library/ops.m:
Add the operator `@'.
compiler/make_hlds.m:
Expand unification expressions.
NEWS:
doc/reference_manual.texi:
w3/news/newsdb.inc:
Document the new syntax.
tests/hard_coded/Mmakefile:
tests/hard_coded/unify_expression.{m,exp}:
Test case.