mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-25 06:14:18 +00:00
Estimated hours taken: 3
Enable --warn-interface-imports by default. This was turned off while
list and term were defined in mercury_builtin.m, since it caused many
warnings.
Fix all the unused interface imports that have been added since then.
compiler/options.m:
Enable --warn-interface-imports by default.
compiler/module_qual.m:
Fix formatting inconsistencies with module names in warning
messages. (".m" was not appended to module names if there was
only one module).
compiler/*.m:
library/*.m:
tests/invalid/type_loop.m:
tests/warnings/*.m:
Remove usused interface imports, or move them into
implementation (mostly bool, list and std_util).
58 lines
603 B
Mathematica
58 lines
603 B
Mathematica
:- module simple_code.
|
|
:- interface.
|
|
:- pred p(int::in, int::out) is erroneous.
|
|
:- implementation.
|
|
|
|
:- import_module require.
|
|
p -->
|
|
(
|
|
[]
|
|
;
|
|
{ error("foo") }
|
|
),
|
|
( { true } ->
|
|
{ Z = 2 }
|
|
;
|
|
{ Z = 3 }
|
|
),
|
|
( { X = 3, X = 2, Z = 2 } ->
|
|
[]
|
|
;
|
|
[]
|
|
),
|
|
( { \+ true } ->
|
|
[]
|
|
;
|
|
[]
|
|
),
|
|
( { \+ det_pred } ->
|
|
[]
|
|
;
|
|
[]
|
|
),
|
|
( { \+ fail_pred } ->
|
|
[]
|
|
;
|
|
[]
|
|
),
|
|
{ \+ fail },
|
|
{ obsolete },
|
|
( { error("blah") } ->
|
|
[]
|
|
;
|
|
[]
|
|
).
|
|
|
|
:- pred det_pred is det.
|
|
|
|
det_pred.
|
|
|
|
:- pred fail_pred is failure.
|
|
|
|
fail_pred :- fail.
|
|
|
|
:- pred obsolete is det.
|
|
:- pragma obsolete(obsolete/0).
|
|
|
|
obsolete.
|