If there are duplicate clausedefs in a module for same clause, typed prolog fails silently instead of giving an error.
Both of the two examples fail silently (they don't get compiled but no error is printed, the compilation predicate in compiler fails silently), so the error happens both when clausedefs are completely identical and when only the predicate names are same:
module(test, [], []).
clausedef(test1, [], [int, int, int]).
clausedef(test1, [], [int, int, int]).
test1(X, Y, Z) :-
X is Y.
module(test, [], []).
clausedef(test1, [], [int, int, int]).
clausedef(test1, [], [int, int, atom]).
test1(X, Y, Z) :-
X is Y.
If there are duplicate
clausedef
s in a module for same clause, typed prolog fails silently instead of giving an error.Both of the two examples fail silently (they don't get compiled but no error is printed, the compilation predicate in compiler fails silently), so the error happens both when
clausedef
s are completely identical and when only the predicate names are same: