fix case where you may bind variable (eg, freeze(X,Y)), obs from Ulrich Neumerkel.

This commit is contained in:
Vitor Santos Costa 2009-05-07 23:51:18 -04:00
parent e4fdf5a1ff
commit d3632dd48c

View File

@ -524,7 +524,8 @@ frozen(V, LG) :-
'$purge_done_goals'(G0, GF).
'$purge_done_goals'(['$redo_freeze'(_Done, _, CallCleanup)|G0], GF) :-
nonvar(CallCleanup),
CallCleanup = _:'$clean_call'(_), !,
% be careful about possibly adding extra binding at this point.
CallCleanup = _:T, nonvar(T), T = '$clean_call'(_), !,
'$purge_done_goals'(G0, GF).
'$purge_done_goals'(['$redo_eq'(Done, _, _, _)|G0], GF) :- nonvar(Done), !,
'$purge_done_goals'(G0, GF).