fix some bugs in call_cleanup: the result of action should not matter,
and !,fail would not wakeup the delayed goal. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1754 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -179,7 +179,7 @@ call_cleanup(Goal, Catcher, Cleanup) :-
|
||||
call(Cleanup).
|
||||
|
||||
'$call_cleanup'(Goal,Catcher,Cleanup) :-
|
||||
'$freeze_goal'(Catcher, once(Cleanup)),
|
||||
'$freeze_goal'(Catcher, '$clean_call'(Cleanup)),
|
||||
yap_hacks:trail_suspension_marker(Catcher),
|
||||
yap_hacks:current_choice_point(CP0),
|
||||
call(Goal),
|
||||
@@ -193,6 +193,10 @@ call_cleanup(Goal, Catcher, Cleanup) :-
|
||||
call(Cleanup), !,
|
||||
fail.
|
||||
|
||||
'$clean_call'(Cleanup) :-
|
||||
call(Cleanup), !.
|
||||
'$clean_call'(_).
|
||||
|
||||
op(P,T,V) :- var(P), !,
|
||||
'$do_error'(instantiation_error,op(P,T,V)).
|
||||
op(P,T,V) :- \+integer(P), !,
|
||||
|
Reference in New Issue
Block a user