mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-30 08:44:37 +00:00
compiler/det_analysis.m:
Improve an error message about foreign_procs by printing it with
the context of the foreign_proc itself, not the context of the
procedure it is for. Also, make the wording more specific.
compiler/prog_event.m:
Reading event sets is currently implemented when the compiler
is compiled for the C backend (because its parser uses lex/flex
and yacc/bison). However, that is no reason for crashing the compiler if
- someone asks it to read an event set
- while the compiler is compiled to a target language other than C.
Fix this by returning an apology message instead of crashing.
tests/invalid/pragma_c_code_no_det.m:
tests/invalid/test_may_duplicate.m:
tests/invalid/test_may_export_body.m:
Add foreign procs for Java and C# as well as for C.
tests/invalid/pragma_c_code_no_det.err_exp{,2,3}:
tests/invalid/test_may_duplicate.err_exp{,2,3}:
tests/invalid/test_may_export_body.err_exp{,2,3}:
Add expected output files for Java and C#. Update the line numbers
in the expected file for C.
tests/invalid/test_type_spec.m:
Delete the parts of this test case that contain errors that we now report
when creating .int files. We now test for those errors using the new test
case tests/invalid_make_int/test_type_spec_int.
tests/invalid/test_type_spec.err_exp:
Delete the messages for the deleted errors, expect verbose errors
(see the update of Mercury.options below), and update the line numbers.
tests/invalid/try_detism.m:
Explain the reason for the need for the new .err_exp2 file.
tests/invalid/try_detism.err_exp{,2}:
Add the new .err_exp2 file for C#, which differs from the .err_exp file
only in the variable number of a compiler-generated variable.
Update the line numbers in the .err_exp file.
tests/invalid/undef_type.m:
Fix the one problem in this test case that we now report when we create
.int files. The handling of that problem is now tested in the new
tests/invalid_make_int/undef_type_int test case.
tests/invalid/undef_type.err_exp:
Don't expect a report for the fixed error.
tests/invalid/Mercury.options:
Run the test_type_spec test case with verbose errors.
tests/invalid/Mmakefile:
Don't try to execute the test cases that this diff moves to
tests/invalid_make_int.
Execute the test cases that try to read event set specifications
only when targeting C. This is not the exact condition we want,
but it is the closest to that condition that we can actually get.
tests/invalid_make_int/bad_instance.{m,int_err_exp}:
tests/invalid_make_int/type_arity.{m,int_err_exp}:
tests/invalid_make_int/undef_inst.{m,int_err_exp}:
tests/invalid_make_int/undef_mode.{m,int_err_exp}:
tests/invalid_make_int/undef_type_mod_qual.{m,int_err_exp}:
Move these tests here from tests/invalid.
tests/invalid_make_int/test_type_spec_int.{m,int_err_exp}:
tests/invalid_make_int/undef_type_int.{m,int_err_exp}:
The parts of the test_type_spec and undef_type test cases in tests/invalid
that get error messages generarated for them while making .int files.
tests/invalid_make_int/Mercury.options:
tests/invalid_make_int/Mmakefile:
Add the tests moved here, in whole or in part, from tests/invalid.
35 lines
1.9 KiB
Plaintext
35 lines
1.9 KiB
Plaintext
try_detism.m:016: In `p'(out, di, uo):
|
|
try_detism.m:016: error: `cc_nondet' is not a valid determinism for a
|
|
try_detism.m:016: predicate that has I/O state arguments. The valid
|
|
try_detism.m:016: determinisms for such predicates are `det', `cc_multi' and
|
|
try_detism.m:016: `erroneous', since the I/O state can be neither duplicated
|
|
try_detism.m:016: nor destroyed.
|
|
try_detism.m:016: In `p'(out, di, uo):
|
|
try_detism.m:016: error: determinism declaration not satisfied.
|
|
try_detism.m:016: Declared `cc_multi', inferred `cc_nondet'.
|
|
try_detism.m:016: The reason for the difference is the following.
|
|
try_detism.m:023: In argument 1 of call to predicate `try_detism.q'/3:
|
|
try_detism.m:023: unification with `X' can fail.
|
|
try_detism.m:022: Error: call to predicate `exception.magic_exception_result'/1
|
|
try_detism.m:022: with determinism `cc_multi' occurs in a context which
|
|
try_detism.m:022: requires all solutions.
|
|
try_detism.m:023: Unification of X and V_17 can fail.
|
|
try_detism.m:022: In clause for `p(out, di, uo)':
|
|
try_detism.m:022: in call to predicate `exception.try_io'/4:
|
|
try_detism.m:022: mode error: arguments
|
|
try_detism.m:022: `TryLambda, TryResult, STATE_VARIABLE_IO_10, TryIOOutput'
|
|
try_detism.m:022: have the following insts:
|
|
try_detism.m:022: /* unique */ (pred(out, di, uo) is semidet),
|
|
try_detism.m:022: free,
|
|
try_detism.m:022: unique,
|
|
try_detism.m:022: free
|
|
try_detism.m:022: which does not match any of the modes for predicate
|
|
try_detism.m:022: `exception.try_io'/4.
|
|
try_detism.m:022: The first argument `TryLambda' has inst
|
|
try_detism.m:022: /* unique */ (pred(out, di, uo) is semidet),
|
|
try_detism.m:022: which does not match any of those modes.
|
|
try_detism.m:022: (For higher order insts like this, the mismatch is
|
|
try_detism.m:022: sometimes caused by the arity of the predicate or function
|
|
try_detism.m:022: being different in the inst than in the type.)
|
|
For more information, recompile with `-E'.
|