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: 2
Branches: main
Replace deprecated mode and inst syntax in most
of the test suite.
TODO:
Alter valid/mode_syntax.m when we start
issuing warnings about the deprecated syntax.
tests/*/*.m:
Replace deprecated mode and inst syntax.
Replace some uses of `:' as the module
qualifier.
Estimated hours taken: 8
Branches: main
compiler/inst_match.m:
Fix a bug which was causing the mode system to be
overly-conservative: pred_inst_matches was requiring initial
insts of higher-order arguments to match invariantly rather than
contravariantly. The bug was caused by my change to add support
for mode polymorphism. In that change I added a call to
inst_matches_initial to compute the inst variable substitution
for the higher-order inst.
This change modifies inst_matches_final to compute the substitution
that was previously computed by inst_matches_initial, thus
allowing the call to inst_matches_initial to be removed.
However, because the initial inst test is required to be
contravariant, the call to inst_matches_final swaps the
argument insts. We must allow for this inside
inst_matches_final when computing the substitution.
Also add a predicate inst_matches_initial_no_implied_modes which
is similar to inst_matches_initial, but does not allow implied
modes to match. The predicate inst_matches_final was previously
being used for this task, but it does not handle constrained
inst variables correctly.
compiler/modecheck_call.m:
compiler/modes.m:
Use inst_matches_initial_no_implied_modes instead of
inst_matches_final, where appropriate.
tests/hard_coded/Mmakefile:
tests/hard_coded/contravariance_bug.m:
tests/hard_coded/contravariance_bug.exp:
Add a test case supplied by Fergus.
tests/hard_coded/Mmakefile:
tests/hard_coded/contravariance_poly.m:
tests/hard_coded/contravariance_poly.exp:
Add another test case, similar to the above, but using
polymorphic modes.