fix swi falgs and set_prolog_flag/2.

This commit is contained in:
Vítor Santos Costa 2012-12-14 23:31:13 +00:00
parent 4d35c1f70a
commit 7811a697b8

View File

@ -1020,15 +1020,12 @@ set_prolog_flag(F,V) :-
set_prolog_flag(F,V) :-
var(V), !,
'$do_error'(instantiation_error,set_prolog_flag(F,V)).
set_prolog_flag(F, Val) :-
prolog:'$user_defined_flag'(F,_,_,_), !,
yap_flag(F, Val).
set_prolog_flag(F,V) :-
\+ atom(F), !,
'$do_error'(type_error(atom,F),set_prolog_flag(F,V)).
set_prolog_flag(F, Val) :-
prolog:'$user_defined_flag'(F,_,_,_), !,
yap_flag(F, Val).
'$swi_current_prolog_flag'(F, _),
'$swi_set_prolog_flag'(F, Val).
set_prolog_flag(F,V) :-
'$yap_system_flag'(F), !,
yap_flag(F,V).