diff --git a/GPL/aggregate.pl b/GPL/aggregate.pl index a6493b806..5bdcb9bae 100644 --- a/GPL/aggregate.pl +++ b/GPL/aggregate.pl @@ -1,4 +1,4 @@ -/* $Id: aggregate.pl,v 1.1 2008-02-12 17:03:52 vsc Exp $ +/* $Id: aggregate.pl,v 1.2 2008-02-12 18:10:48 vsc Exp $ Part of SWI-Prolog @@ -42,6 +42,10 @@ :- 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, diff --git a/LGPL/prolog_xref.pl b/LGPL/prolog_xref.pl index b7f079d2e..10bc11ad7 100644 --- a/LGPL/prolog_xref.pl +++ b/LGPL/prolog_xref.pl @@ -1,4 +1,4 @@ -/* $Id: prolog_xref.pl,v 1.1 2008-02-12 17:03:54 vsc Exp $ +/* $Id: prolog_xref.pl,v 1.2 2008-02-12 18:10:48 vsc Exp $ Part of SWI-Prolog @@ -118,6 +118,8 @@ genarg(X,Y,Z) :- :- else. % yap +:- ensure_loaded(library(swi)). + :- user_defined_flag(xref). :- use_module(library(arg)). diff --git a/library/swi.yap b/library/swi.yap index cfee4fb53..b6803ac60 100644 --- a/library/swi.yap +++ b/library/swi.yap @@ -23,10 +23,10 @@ term_hash/2, variant/2]). -:- multifile +:- dynamic prolog:message/3. -:- dynamic +:- multifile prolog:message/3. :- multifile @@ -174,9 +174,17 @@ prolog:nth1(I,L,A) :- nth(I,L,A). prolog:prolog_to_os_filename(X,X). +prolog:is_absolute_file_name(X) :- + absolute_file_name(X,X). + +prolog:read_clause(X,Y) :- + read_term(X,Y,[singetons(warning)]). + prolog:forall(X,Y) :- catch(do_forall(X,Y), fail_forall, fail). +prolog:string(_) :- fail. + do_forall(X,Y) :- call(X), do_for_forall(Y).