mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +00:00
compiler/det_report.m:
When a goal has too many solutions, but it occurs in a context in which
the identity of those solutions does not matter, the compiler inserts
a commit scope to prune away the redundant (because they are externally
indistinguishable) solutions.
When this goal is a switch inside a require_switch_arms_<detism> scope,
this commit scope added by determinism analysis screwed up the expectation
of the require_switch_arms_<detism> scope that the switch is its IMMEDIATE
subgoal. Relax this sometimes-wrong assumption by allowing for a commit
scope wrapped around the switch.
When generating error messages for cons_ids missing from switches,
don't print the module qualifiers for the cons_ids, since users
will already know it (it is part of the identity of the type of switch-on
variable).
Print the missing cons_ids one per line, to make the list easier to read.
Fix capitalization in some error messages.
compiler/switch_detection.m:
When creating switch arms, give each arm a more meaningful context
that the context of the original disjunction, which is usually the context
of the first ";" operator in it.
tests/invalid/switch_arm_multi_not_det.{m,err_exp}:
New test case for the fix listed first for det_report.m.
tests/invalid/Mmakefile:
Enable the new test case.
tests/debugger/dice.exp*:
tests/invalid/det_errors.err_exp:
tests/invalid/require_scopes.err_exp:
Update these expected outputs for the changes above.
71 lines
3.3 KiB
Plaintext
71 lines
3.3 KiB
Plaintext
det_errors.m:009: In `p1'(in):
|
|
det_errors.m:009: error: determinism declaration not satisfied.
|
|
det_errors.m:009: Declared `det', inferred `semidet'.
|
|
det_errors.m:042: In argument 1 of clause head:
|
|
det_errors.m:042: unification of `HeadVar__1' and `42' can fail.
|
|
det_errors.m:010: In `p2'(in):
|
|
det_errors.m:010: error: determinism declaration not satisfied.
|
|
det_errors.m:010: Declared `det', inferred `semidet'.
|
|
det_errors.m:043: Unification of `X' and `42' can fail.
|
|
det_errors.m:011: In `p3'(in):
|
|
det_errors.m:011: error: determinism declaration not satisfied.
|
|
det_errors.m:011: Declared `det', inferred `semidet'.
|
|
det_errors.m:044: Unification of `X' and `42' can fail.
|
|
det_errors.m:012: In `p4'(in):
|
|
det_errors.m:012: error: determinism declaration not satisfied.
|
|
det_errors.m:012: Declared `det', inferred `semidet'.
|
|
det_errors.m:045: In argument 2 of functor `+/2':
|
|
det_errors.m:045: unification with `21' can fail.
|
|
det_errors.m:026: In `q'(in, out):
|
|
det_errors.m:026: error: determinism declaration not satisfied.
|
|
det_errors.m:026: Declared `det', inferred `semidet'.
|
|
det_errors.m:048: The switch on HeadVar__1 does not cover
|
|
det_errors.m:048: `d'/0,
|
|
det_errors.m:048: `e'/0,
|
|
det_errors.m:048: `f'/0,
|
|
det_errors.m:048: `g'/0,
|
|
det_errors.m:048: `h'/1 or
|
|
det_errors.m:048: `i'/1.
|
|
det_errors.m:034: In `r'(in, out):
|
|
det_errors.m:034: error: determinism declaration not satisfied.
|
|
det_errors.m:034: Declared `det', inferred `nondet'.
|
|
det_errors.m:054: The switch on U does not cover
|
|
det_errors.m:054: `u2'/0.
|
|
det_errors.m:057: Inside the case u3(V_16) of the switch on U:
|
|
det_errors.m:057: the switch on V_16 does not cover
|
|
det_errors.m:057: `d'/0,
|
|
det_errors.m:057: `e'/0,
|
|
det_errors.m:057: `f'/0,
|
|
det_errors.m:057: `g'/0,
|
|
det_errors.m:057: `h'/1 or
|
|
det_errors.m:057: `i'/1.
|
|
det_errors.m:066: Inside the case u4(V_17) of the switch on U:
|
|
det_errors.m:066: the switch on V_17 does not cover
|
|
det_errors.m:066: `h'/1 or
|
|
det_errors.m:066: `i'/1.
|
|
det_errors.m:075: Inside the case u4(V_17) of the switch on U:
|
|
det_errors.m:075: inside the case d/0 of the switch on V_17:
|
|
det_errors.m:075: disjunction has multiple clauses with solutions.
|
|
det_errors.m:035: In `s'(in, out):
|
|
det_errors.m:035: error: determinism declaration not satisfied.
|
|
det_errors.m:035: Declared `det', inferred `nondet'.
|
|
det_errors.m:093: The switch on U does not cover
|
|
det_errors.m:093: `u2'/0.
|
|
det_errors.m:096: Inside the case u3(V_11) of the switch on U:
|
|
det_errors.m:096: the switch on V_11 does not cover
|
|
det_errors.m:096: `d'/0,
|
|
det_errors.m:096: `e'/0,
|
|
det_errors.m:096: `f'/0,
|
|
det_errors.m:096: `g'/0,
|
|
det_errors.m:096: `h'/1 or
|
|
det_errors.m:096: `i'/1.
|
|
det_errors.m:116: Inside the case u4(V) of the switch on U:
|
|
det_errors.m:116: inside the case d/0 of the switch on V:
|
|
det_errors.m:116: disjunction has multiple clauses with solutions.
|
|
det_errors.m:124: Inside the case u4(V) of the switch on U:
|
|
det_errors.m:124: inside the case e/0, f/0 of the switch on V:
|
|
det_errors.m:124: disjunction has multiple clauses with solutions.
|
|
det_errors.m:134: Inside the case u4(V) of the switch on U:
|
|
det_errors.m:134: inside the case h/1, i/1 of the switch on V:
|
|
det_errors.m:134: disjunction has multiple clauses with solutions.
|