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: 8
Branches: main
Add a new pragma that allows dependencies on optional features of the
compilation models to be checked by the compiler. The new pragma
has the form
:- pragma require_feature_set(<list_of_features>).
where <list_of_features> is a list of optional compilation model features
whose presence is required by the module containing the pragma.
For example,
:- pragma require_feature_set([trailing, double_prec_float, memo]).
asserts that the module requires trailing, double precision floats and
memoisation. The compiler will emit an error message if these features
are not available in the current compilation grade. This is particularly
helpful in cases like memoisation and parallel conjunction that are ignored
by default in grades that do not support them.
Fix a bug where we where not emitting a warning about memo and loopcheck
pragmas being ignored in grades that use --highlevel-data.
compiler/prog_item.m:
Represent require_feature_set pragmas in the parse tree.
compiler/prog_data.m:
Add a type that represents optional features of the compilation
model whose presence is required.
compiler/prog_io_pragma.m:
Parse the new pragma.
Turn an if-then-else into a switch.
compiler/add_pragma.m:
Process require_feature_set pragmas and emit error messages
concerning required features that are not supported by the
compilation grade.
compiler/globals.m:
Add three predicates that check whether tabling, threads and
parallel conjunctions are support by the current grade respectively.
(Some of this code used to be in table_gen.m and dep_par_conj.m
and has been moved here since it now called from more than one place).
Fix a bug where we were not emitting a message about memo
and loopcheck pragmas being ignored in grades where --highlevel-data
was enabled.
compiler/make_hlds_passes.m:
compiler/mercury_to_mercury.m:
Handle require_feature_set pragmas.
compiler/module_qual.m:
compiler/recompilation.version.m:
compiler/dep_par_conj.m:
compiler/table_gen.m:
Conform to the above change.
doc/reference_manual.texi:
Document the new pragma.
tests/invalid/Mmakefile:
tests/invalid/Mercury.options:
tests/invalid/conflicting_fs.{m,err_exp}
tests/invalid/test_feature_set.{m,err_exp}:
Test the new pragma.