Files
mercury/tests/invalid/multimode_syntax.err_exp
Zoltan Somogyi bc56e927b6 Detect when a predicate has a pair of I/O states but isn't det or cc_multi.
Estimated hours taken: 6
Branches: main

Detect when a predicate has a pair of I/O states but isn't det or cc_multi.
Improve the generation of determinism error messages.

compiler/det_analysis.m:
	Detect when a predicate has a pair of I/O states but isn't det or
	cc_multi.

	Factor out some common code.

compiler/det_report.m:
	Add the new error type for predicates with I/O states.

	Use error_util much more extensively to generate error messages.

compiler/hlds_out.m:
	For several existing predicates that write out various HLDS
	constructs, provide versions that return representations of those
	constructs as strings or as error_util pieces, for use by det_report.m.
	Redefine the old predicates as simply printing the output of the new
	predicates where relevant, to avoid code duplication.

compiler/error_util.m:
	When describing a predicate name, specify whether we want to module
	qualify the name or not. The intention is that when generating a kind
	of error message which can only be generated for predicates defined
	in the current module, the module prefix should be omitted in the
	interest of clarity.

compiler/accumulator.m:
compiler/dead_proc_elim.m:
compiler/magic_util.m:
compiler/table_gen.m:
compiler/term_errors.m:
compiler/termination.m:
compiler/typecheck.m:
	Conform to the changes in error_util.m.

compiler/globals.m:
	Reorder arguments to allow the use of state variable notation.

compiler/handle_globals.m:
compiler/mercury_compile.m:
compiler/source_file_map.m:
	Conform to the changed argument order in globals.m.

tests/invalid/aditi_update_errors.err_exp:
tests/invalid/errors2.err_exp2:
tests/invalid/external.err_exp:
tests/invalid/ho_unique_error.err_exp:
tests/invalid/magicbox.err_exp:
tests/invalid/missing_det_decls.err_exp:
tests/invalid/mostly_uniq1.err_exp:
tests/invalid/mostly_uniq2.err_exp:
tests/invalid/multimode_syntax.err_exp:
tests/invalid/multisoln_func.err_exp:
tests/invalid/pragma_c_code_dup_var.err_exp:
tests/invalid/pragma_c_code_no_det.err_exp:
tests/invalid/prog_io_erroneous.err_exp2:
tests/invalid/qualified_cons_id2.err_exp:
tests/invalid/record_syntax_errors.err_exp:
tests/invalid/state_vars_test1.err_exp:
tests/invalid/state_vars_test2.err_exp:
tests/invalid/state_vars_test3.err_exp:
tests/invalid/typeclass_mode.err_exp:
tests/invalid/types.err_exp2:
tests/invalid/undef_mode_and_no_clauses.err_exp:
tests/recompilation/typeclass_method_pragma_r.err_exp.2:
tests/warnings/ambiguous_overloading.exp:
tests/warnings/duplicate_call.exp:
tests/warnings/duplicate_const.exp:
tests/warnings/infinite_recursion.exp:
tests/warnings/simple_code.exp:
tests/warnings/warn_dead_procs.exp:
tests/warnings/warn_stubs.exp:
	Update these files to expect the better error messages we now generate.
2004-05-14 08:40:33 +00:00

41 lines
2.7 KiB
Plaintext

multimode_syntax.m:013: Error: clause for predicate `multimode_syntax.::/2'
multimode_syntax.m:013: without preceding `pred' declaration.
multimode_syntax.m:018: In clause for function `multimode_syntax.func1/1':
multimode_syntax.m:018: syntax error: some but not all arguments have mode annotations.
multimode_syntax.m:019: In clause for function `multimode_syntax.func1/1':
multimode_syntax.m:019: syntax error: some but not all arguments have mode annotations.
multimode_syntax.m:025: In clause for function `multimode_syntax.func2/2':
multimode_syntax.m:025: error: mode annotation specifies undeclared mode
multimode_syntax.m:025: `func2(in, out) = out'
multimode_syntax.m:025: of function `multimode_syntax.func2/2'.
multimode_syntax.m:027: In clause for function `multimode_syntax.func2/2':
multimode_syntax.m:027: error: mode annotation specifies undeclared mode
multimode_syntax.m:027: `func2(out, in) = out'
multimode_syntax.m:027: of function `multimode_syntax.func2/2'.
multimode_syntax.m:029: In clause for function `multimode_syntax.func2/2':
multimode_syntax.m:029: error: mode annotation specifies undeclared mode
multimode_syntax.m:029: `func2(out, out) = out'
multimode_syntax.m:029: of function `multimode_syntax.func2/2'.
multimode_syntax.m:033: In clause for function `multimode_syntax.func2b/2':
multimode_syntax.m:033: error: mode annotation specifies undeclared mode
multimode_syntax.m:033: `func2b(in, out) = out'
multimode_syntax.m:033: of function `multimode_syntax.func2b/2'.
multimode_syntax.m:037: In clause for predicate `multimode_syntax.pred2b/2':
multimode_syntax.m:037: error: mode annotation specifies undeclared mode
multimode_syntax.m:037: `pred2b(in, out)'
multimode_syntax.m:037: of predicate `multimode_syntax.pred2b/2'.
multimode_syntax.m:037: (There are no declared modes for this predicate.)
multimode_syntax.m:045: In clause for predicate `multimode_syntax.test2/2':
multimode_syntax.m:045: syntax error: some but not all arguments have mode annotations.
multimode_syntax.m:047: In clause for predicate `multimode_syntax.test2/2':
multimode_syntax.m:047: syntax error: some but not all arguments have mode annotations.
multimode_syntax.m:011: Error: no clauses for function `func0/0'.
multimode_syntax.m:013: In clause for predicate `multimode_syntax.::/2':
multimode_syntax.m:013: in argument 1 of clause head:
multimode_syntax.m:013: error: the language construct =/2 should be
multimode_syntax.m:013: used as a goal, not as an expression.
multimode_syntax.m:013: In clause for predicate `multimode_syntax.::/2':
multimode_syntax.m:013: in argument 2 of clause head:
multimode_syntax.m:013: error: undefined symbol `out/0'.
For more information, try recompiling with `-E'.