be sure to respect priority in saving flags

This commit is contained in:
Vitor Santos Costa 2011-08-31 21:12:25 -07:00
parent 841dd3a3e1
commit 0c940b2dce

View File

@ -23,9 +23,15 @@ qsave_program(File) :-
close(S).
'$save_program_status' :-
findall(F:V,yap_flag(F,V),L),
findall(F:V,'$x_yap_flag'(F,V),L),
recordz('$program_state',L,_).
% there is some ordering between flags.
'$x_yap_flag'(language, V).
'$x_yap_flag'(X, V) :-
yap_flag(X, V),
X \= language.
'$init_state' :-
recorded('$program_state', _, _), !,
'$do_init_state'.