Commit Graph

4 Commits

Author SHA1 Message Date
Julien Fischer
e069d16ab1 Do not display the For more information try recompiling with -E'' prompt
Estimated hours taken: 1.5
Branches: main

Do not display the `For more information try recompiling with `-E'' prompt
unless we really mean it, i.e. there is actually more information available.

XXX This change is incomplete for the mode_errors module because that
module requires more substantial changes to make this work - I'll do
that as a separate diff.

compiler/globals.m
	Add a new global (and access predicates) that keeps track of whether
	we have any verbose error information that could be displayed if we
	recompiled with `-E'.

compiler/mercury_compile.m
	Check the new global flag before prompting the user to recompile with
	`-E'.

compiler/mode_errors.m
	Add an XXX comment about needing to respect the extra error info flag
	properly.

compiler/accumulator.m
compiler/add_clause.m
compiler/add_pred.m
compiler/add_type.m
compiler/assertion.m
compiler/check_typeclass.m
compiler/det_report.m
compiler/magic_util.m
compiler/make_hlds_error.m
compiler/modes.m
compiler/module_qual.m
compiler/modules.m
compiler/post_typecheck.m
compiler/purity.m
compiler/stratify.m
compiler/typecheck_errors.m
	Set the new global flag when we come across an error
	for which we have a verbose error message.

tests/recompilation/*:
tests/invalid/*:
	Update expected error files.
2005-09-14 05:27:11 +00:00
Zoltan Somogyi
a65ad5dcb6 Allow simple_call_ids to be formatted by the predicates of error_util.m,
Estimated hours taken: 6
Branches: main

Allow simple_call_ids to be formatted by the predicates of error_util.m,
and convert the error messages in some submodules of make_hlds.m to use this
capability.

compiler/hlds_pred.m:
compiler/prog_data.m:
	Move the simple_call_id type from hlds_pred to prog_data,
	since error_util shouldn't import any HLDS modules.

compiler/hlds_out.m:
compiler/prog_out.m:
	Move the predicates for printing simple_call_ids from hlds_out to
	prog_out.

	Change prog_out.m to four-space indentation to reduce the number
	of bad line breaks.

	In prog_out.m, move the relevant comments to the interface,
	delete unnecessary module qualifications, and delete some long
	obsolete commented-out code.

compiler/error_util.m:
	Add simple_call_id to the list of format components.

	Change to four-space indentation to reduce the number of bad line
	breaks.

	Conform to the standard format for comments.

compiler/add_pragma.m:
compiler/make_hlds_passes.m:
compiler/make_hlds_warn.m:
	Use the new capability to convert some error reporting code to use
	error_util.

compiler/*.m:
	Conform to the changes above, mostly by deleting now incorrect module
	qualifications.

tests/invalid/*.err_exp:
tests/warnings/*.err_exp:
	Expect the new, better formatted error messages.

tests/invalid/Mmakefile:
	Fix some too-long lines in comments.
2005-08-08 02:33:19 +00:00
Ralph Becket
a8ffd3680c Change the compiler and tools so that .' and not :' is now used as the
Estimated hours taken: 14
Branches: main

Change the compiler and tools so that `.' and not `:' is now used as the
module separator in all output.

Infix `.' now has associativity yfx and priority 10.

NEWS:
	Report the change.

configure.in:
	Amend the test for an up-to-date Mercury compiler to check whether
	it recognises `.' as a module qualifier.

compiler/code_gen.m:
compiler/error_util.m:
compiler/hlds_out.m:
compiler/prog_out.m:
compiler/prog_util.m:
compiler/rl_exprn.m:
compiler/rl_gen.m:
compiler/source_file_map.m:
compiler/unused_args.m:
library/io.m:
library/rtti_implementation.m:
library/type_desc.m:
runtime/mercury_debug.c:
runtime/mercury_deconstruct.c:
runtime/mercury_stack_trace.c:
	Change `:' to `.' as module separator for output.

compiler/mercury_to_mercury.m:
compiler/prog_io_typeclass.m:
	As above.
	Fixed a bug where `.' was not being recognised as a module separator.

doc/reference_manual.texi:
	Report the change.

library/term_io.m:
	Ensure that infix `.' is written without surrounding spaces.

tests/hard_coded/dot_separator.m:
tests/hard_coded/dot_separator.exp:
tests/hard_coded/Mmakefile:
	Test case added.
2003-01-17 05:57:20 +00:00
Fergus Henderson
1f45bdca59 Improve the error messages for syntax errors in lambda
Estimated hours taken: 0.5

compiler/typecheck.m:
	Improve the error messages for syntax errors in lambda
	expressions and field selection/update expressions.

tests/invalid/Mmakefile:
tests/invalid/field_syntax_error.m:
tests/invalid/field_syntax_error.err_exp:
tests/invalid/lambda_syntax_error.m:
tests/invalid/lambda_syntax_error.err_exp:
	Regression tests.
2000-09-18 16:38:27 +00:00