|
From: Vitor S. C. <vs...@us...> - 2008-07-22 23:34:43
|
Update of /cvsroot/yap/GPL In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25978/GPL Modified Files: aggregate.pl error.pl Log Message: SWI and module fixes Index: aggregate.pl =================================================================== RCS file: /cvsroot/yap/GPL/aggregate.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- aggregate.pl 13 Mar 2008 14:37:58 -0000 1.3 +++ aggregate.pl 22 Jul 2008 23:34:49 -0000 1.4 @@ -42,10 +42,6 @@ :- use_module(library(error)). :- use_module(library(lists)). -:- if(current_prolog_flag(dialect, yap)). -:- use_module(library(maplist)). -:- endif. - :- module_transparent foreach/2, aggregate/3, Index: error.pl =================================================================== RCS file: /cvsroot/yap/GPL/error.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- error.pl 15 May 2008 13:41:45 -0000 1.2 +++ error.pl 22 Jul 2008 23:34:49 -0000 1.3 @@ -163,20 +163,6 @@ ; type_error(Type, X) ). -:- if(current_prolog_flag(dialect, yap)). - -% vsc: I hope it works like this -'$skip_list'(_, Rest, Rest) :- var(Rest), !. -'$skip_list'(_, [], _) :- !, fail. -'$skip_list'(Anything, [_|More], Rest) :- - '$skip_list'(Anything, [_|More], Rest). -'$skip_list'(Anything, [_|More], Rest) :- - '$skip_list'(Anything, More, Rest). -'$skip_list'(_Anything, Rest, Rest). - -:- endif. - - not_a_rational(X) :- ( var(X) -> instantiation_error(X) @@ -259,3 +245,18 @@ is_list_or_partial_list(L0) :- '$skip_list'(_, L0,L), ( var(L) -> true ; L == [] ). + +:- if(current_prolog_flag(dialect, yap)). + +% vsc: I hope it works like this +'$skip_list'(_, Rest, Rest) :- var(Rest), !. +'$skip_list'(_, [], _) :- !, fail. +'$skip_list'(Anything, [_|More], Rest) :- + '$skip_list'(Anything, [_|More], Rest). +'$skip_list'(Anything, [_|More], Rest) :- + '$skip_list'(Anything, More, Rest). +'$skip_list'(_Anything, Rest, Rest). + +:- endif. + + |