mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
compiler/parse_item.m:
When parsing the arguments of function and predicate declarations,
which may consist either of just a type or a type::mode pair,
report an error for each unparseable type and for each unparseable mode,
instead of reporting a single "syntax error" for the whole declaration.
compiler/parse_type_name.m:
Put quotes around ill-formed types in error messages.
Put the arguments of a predicate in a better order.
compiler/parse_mutable.m:
compiler/parse_type_defn.m:
compiler/superhomogeneous.m:
compiler/parse_class.m:
Conform to the changes in parse_type_name.m.
tests/invalid/predmode.{m,err_exp}:
Add a test of the new capability to this test case.
Remove the cause of an unnecessary error message.
tests/invalid/combined_ho_type_inst.m:
Fix indentation.
tests/invalid/combined_ho_type_inst.err_exp:
tests/invalid/combined_ho_type_inst_2.err_exp:
tests/invalid/impl_def_literal_syntax.err_exp:
tests/invalid/kind.err_exp:
tests/invalid/vars_in_wrong_places.err_exp:
Expect the updated form of error messages.
18 lines
346 B
Mathematica
18 lines
346 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module predmode.
|
|
|
|
:- interface.
|
|
|
|
:- pred p(int::in, int).
|
|
|
|
:- pred q(int::out) is det.
|
|
|
|
:- implementation.
|
|
|
|
q(1).
|
|
|
|
:- pred r(1::2, "bad"::"worse") is det.
|