From 1089aaf5858ca37fef49f68b104cd58dee018e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Wed, 3 Oct 2012 21:52:18 +0100 Subject: [PATCH] fix error messages (patch by Ulrich Neumerkel). --- pl/sort.yap | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pl/sort.yap b/pl/sort.yap index 2b250e5a1..bfb526d8d 100644 --- a/pl/sort.yap +++ b/pl/sort.yap @@ -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