% $ mmc -e missing_constraints.m % missing_constraints.m:030: In clause for type class method implementation: % missing_constraints.m:030: unsatisfiable typeclass constraints: % missing_constraints.m:030: `missing_constraints.t1(int)' and % missing_constraints.m:030: `missing_constraints.t2(int)'. % :- module missing_constraints. :- interface. :- typeclass t1(T) where []. :- typeclass t2(T) where []. :- typeclass t3(T) where [ pred q(T::in, T::in) is semidet ]. :- pred p(T::in, T::in) is semidet <= (t1(T), t2(T)). :- implementation. p(A, A). :- instance t1(int) where []. % Uncomment below for this to compile %:- instance t2(int) where []. :- instance t3(int) where [ (q(A0, A) :- p(A0, A) ) ].