From 8d93e8f9b9ee341fc54480cdd4bce5fb2007a705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 28 May 2010 16:07:20 +0100 Subject: [PATCH] remove all initialization/1 in a single swoop. --- pl/consult.yap | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pl/consult.yap b/pl/consult.yap index 37bebd812..d16755518 100755 --- a/pl/consult.yap +++ b/pl/consult.yap @@ -321,7 +321,8 @@ use_module(M,F,Is) :- '$show_consult_level'(Level1), % it will be done after we leave the current consult level. Level is Level1-1, - recorda('$initialisation',do(Level,G),_), + writeln(+Level:G), + recordz('$initialisation',do(Level,G),_), fail. '$initialization'(_). @@ -386,10 +387,13 @@ use_module(M,F,Is) :- fail. '$exec_initialisation_goals' :- '$show_consult_level'(Level), - recorded('$initialisation',do(Level,G),R), - erase(R), - G \= '$', '$current_module'(M), + findall( + G, + (recorded('$initialisation',do(Level,G),R), erase(R), G\='$'), + LGs), + lists:member(G,LGs), + writeln(doing:Level:G), nb_getval('$system_mode', OldMode), ( OldMode == on -> '$exit_system_mode' ; true ), % run initialization under user control (so allow debugging this stuff).