creepy fixes
This commit is contained in:
parent
fdd05abd38
commit
918a973019
@ -148,6 +148,7 @@ lcall2([Goal|Goals], Mod) :-
|
||||
prolog:call_residue_vars(Goal,Residue) :-
|
||||
attributes:all_attvars(Vs0),
|
||||
call(Goal),
|
||||
'$stop_creeping',
|
||||
attributes:all_attvars(Vs),
|
||||
% this should not be actually strictly necessary right now.
|
||||
% but it makes it a safe bet.
|
||||
|
@ -493,7 +493,7 @@ true :- true.
|
||||
'$write_answer'(NV, LGs, Written),
|
||||
'$write_query_answer_true'(Written),
|
||||
(
|
||||
'$prompt_alternatives_on'(determinism), CP = NCP, DCP = 0
|
||||
'$prompt_alternatives_on'(determinism), CP == NCP, DCP = 0
|
||||
->
|
||||
format(user_error, '.~n', []),
|
||||
!
|
||||
@ -1085,7 +1085,7 @@ bootstrap(F) :-
|
||||
% support SWI hook in a separate predicate, to avoid slow down standard consult.
|
||||
'$enter_command_with_hook'(Stream,Status) :-
|
||||
'$read_vars'(Stream,Command,_,Pos,Vars, '|: ', Comments),
|
||||
( prolog:comment_hook(Comments,Pos,Command), prolog) -> true ; true ),
|
||||
( prolog:comment_hook(Comments,Pos,Command) -> true ; true ),
|
||||
'$command'(Command,Vars,Pos,Status).
|
||||
|
||||
'$abort_loop'(Stream) :-
|
||||
|
@ -119,8 +119,7 @@ setup_call_catcher_cleanup(Setup, Goal, Catcher, Cleanup) :-
|
||||
yap_hacks:enable_interrupts,
|
||||
'$current_choice_point'(CP0),
|
||||
'$execute'(Goal),
|
||||
% ensure environment for delayed variables in Goal
|
||||
'$true',
|
||||
'$stop_creeping',
|
||||
'$current_choice_point'(CPF),
|
||||
(
|
||||
CP0 =:= CPF
|
||||
@ -131,6 +130,7 @@ setup_call_catcher_cleanup(Setup, Goal, Catcher, Cleanup) :-
|
||||
true
|
||||
)
|
||||
;
|
||||
'$stop_creeping',
|
||||
Catcher = fail,
|
||||
fail
|
||||
).
|
||||
|
@ -50,10 +50,12 @@ findall(Template, Generator, Answers, SoFar) :-
|
||||
nb:nb_queue(Ref),
|
||||
(
|
||||
'$execute'(Generator),
|
||||
'$stop_creeping',
|
||||
nb:nb_queue_enqueue(Ref, Template),
|
||||
fail
|
||||
fail
|
||||
;
|
||||
nb:nb_queue_close(Ref, Answers, SoFar)
|
||||
'$stop_creeping',
|
||||
nb:nb_queue_close(Ref, Answers, SoFar)
|
||||
).
|
||||
|
||||
|
||||
@ -147,9 +149,11 @@ all(T,G,S) :-
|
||||
'$init_db_queue'(Ref),
|
||||
( '$catch'(Error,'$clean_findall'(Ref,Error),_),
|
||||
'$execute'(G),
|
||||
'$stop_creeping',
|
||||
'$db_enqueue'(Ref, T),
|
||||
fail
|
||||
;
|
||||
'$stop_creeping',
|
||||
'$$set'(S,Ref)
|
||||
).
|
||||
|
||||
|
Reference in New Issue
Block a user