Files
mercury/tests/invalid_nodepend/errors.m
Julien Fischer f3a34e4651 Replace uses of __ as a module qualifier.
samples/muz.zbstract.m:
tests/*/*.m:
    As above.
2022-04-14 20:25:10 +10:00

105 lines
2.9 KiB
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
% This file contains a bunch of test cases, all of which should result
% in errors of one kind or another.
%%% Module should start with :- module declaration.
%---------------------------------------------------------------------------%
:- pred pred_with_no_clauses_or_mode_declaration(int).
%---------------------------------------------------------------------------%
:- pred pred_with_no_clauses(int).
:- mode pred_with_no_clauses(input).
%---------------------------------------------------------------------------%
/*
:- pred pred_with_invalid_goal.
pred_with_invalid_goal :-
5.
*/
%---------------------------------------------------------------------------%
:- mode mode_declaration_without_pred_declaration.
%---------------------------------------------------------------------------%
:- mode missing_pred_declaration.
missing_pred_declaration.
%---------------------------------------------------------------------------%
clause_without_pred_or_mode_declaration.
%---------------------------------------------------------------------------%
:- pred pred_which_calls_non_existant_pred.
pred_which_calls_non_existant_pred :-
non_existant_pred.
%---------------------------------------------------------------------------%
:- type type_with_multiply_defined_ctors ---> a; a; f(int); f(int).
:- type du_type_which_references_undefined_type ---> f(undefined_type).
:- type eqv_type_which_references_undefined_type == undefined_type.
:- type circular_eqv_type == circular_eqv_type.
:- type indirectly_circular_eqv_type_1 == indirectly_circular_eqv_type_2.
:- type indirectly_circular_eqv_type_2 == indirectly_circular_eqv_type_1.
:- type non_transparent_du_type ---> f(T).
:- type non_transparent_eqv_type == f(T).
%---------------------------------------------------------------------------%
:- pred pred_which_binds_type_param(TypeParam::input).
pred_which_binds_type_param(Argument) :-
Argument = 0.
%---------------------------------------------------------------------------%
:- pred pred_with_unresolved_polymorphism.
pred_with_unresolved_polymorphism :-
pred_which_binds_type_param(Arg).
%---------------------------------------------------------------------------%
:- pred pred_producing_string(string).
:- pred pred_expecting_int(int).
:- pred pred_with_type_error.
pred_with_type_error :-
pred_producing_string(X),
pred_expecting_int(X).
:- pred pred_with_singleton_vars(T).
pred_with_singleton_vars(X).
%---------------------------------------------------------------------------%
:- import_module int.
:- use_module int.
:- use_module io.
:- type needs_qualification == state.
:- type has_qualification == io.state.
%---------------------------------------------------------------------------%