Files
mercury/tests/invalid/unsatisfiable_super.m
Zoltan Somogyi 3dc4babb24 Update the style of more test cases.
And update expected output files for changes in line numbers.
2021-07-27 13:29:46 +10:00

20 lines
518 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module unsatisfiable_super.
:- interface.
:- import_module io.
:- typeclass foo(A, B) where [ func f(A) = B ].
:- typeclass bar(B) <= foo(int, B) where [].
:- pred test(B::in, io::di, io::uo) is det <= bar(B).
:- implementation.
:- instance foo(int, int) where [ (f(N) = N) ].
test(X, !IO) :-
io.write_int(f(X), !IO).