tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
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 tests
that check compiler error messages, expect the new line numbers.
browser/cterm.m:
browser/tree234_cc.m:
Import only one module per line.
tests/hard_coded/boyer.m:
Fix something I missed.
Estimated hours taken: 15
Branches: main, release
Implement superclass reduction in the style of CHRs rather than as a top
down search. This is shorter, simpler, and more consistent with the rest
of the typeclass implementation. It also removes a few XXXs and fixes a
bug reported by Julien.
compiler/hlds_data.m:
Add an ancestors field to the hlds_constraint type. This caches
all the ancestors of assumed constraints, along with proofs (in the
form of a sequence of subclass constraints) of how each ancestor is
derived.
Update this field whenever new assumed constraints are created, by
traversing the class hierarchy bottom up.
Delete the old subclass_details type, which was part of the
superclass table.
compiler/typeclasses.m:
Use the cached ancestors to apply the class rules, rather than
performing a top down search.
compiler/type_util.m:
Apply substitutions to the ancestors.
compiler/typecheck.m:
compiler/typecheck_info.m:
Update to account for the additional field.
compiler/*.m:
Remove the superclass table from the module_info and from the
interface to context reduction; it is no longer needed.
compiler/hlds_out.m:
Don't output the superclass table.
tests/valid/Mmakefile:
tests/valid/superclass_bug.m:
Regression test for the bug that is now fixed.