fix error messages (patch by Ulrich Neumerkel).

This commit is contained in:
Vítor Santos Costa 2012-10-03 21:52:18 +01:00
parent ab14365a30
commit 1089aaf585

View File

@ -26,10 +26,9 @@
length(L, M) :-
'$skip_list'(L, M, M0, R),
( R == [] -> true ;
var(R) -> '$$_length'(R, M, M0) ;
L \= [_|_], '$do_error'(type_error(list,L),length(L,M))
).
( var(R) -> '$$_length'(R, M, M0) ;
R == []
).
%
% in case A1 is unbound or a difference list, things get tricky