:- module bug. :- interface. :- type tt(T) ---> tt. :- typeclass tc(T) where []. :- instance tc(tt(_)). :- func myfunc(T) = int <= tc(T). :- pragma type_spec(myfunc/1, T = tt(_)). :- implementation. :- instance tc(tt(_)) where []. myfunc(_) = 0.