mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 12:23:44 +00:00
Estimated hours taken: 2
Branches: main
Add a new pragma, promise_equivalent_clauses, whose effect is to promise
that mode-specific clauses don't make a predicate definition impure.
doc/reference_manual.texi:
Document the new pragma.
compiler/prog_item.m:
Add a representation of the new pragma.
compiler/prog_io_pragma.m:
Parse the new pragma.
compiler/hlds_pred.m:
Add the corresponding marker to predicates.
Reformat some type definitions to comply with our current standards.
compiler/purity.m:
Respect the new pragma when computing the purity of predicates.
compiler/add_pragma.m:
compiler/hlds_out.m:
compiler/intermod.m:
compiler/mercury_to_mercury.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/recompilation.version.m:
compiler/table_gen.m:
Process the new pragma.
compiler/make_hlds_passes.m:
Fix some documentation rot.
tests/hard_coded/promise_equivalent_clauses.{m,exp}:
New test case to test the proper functioning of the new pragma
tests/invalid/promise_equivalent_clauses.{m,exp}:
New test case to test that the new pragma doesn't promise all that
promise_pure would promise.
tests/hard_coded/Mmakefile:
tests/invalid/Mmakefile:
Enable the new test cases.
7 lines
120 B
Plaintext
7 lines
120 B
Plaintext
[1, 2, 3] [1, 2, 3]
|
|
[1, 3, 2] [1, 2, 3]
|
|
[2, 1, 3] [1, 2, 3]
|
|
[2, 3, 1] [1, 2, 3]
|
|
[3, 1, 2] [1, 2, 3]
|
|
[3, 2, 1] [1, 2, 3]
|