From 20398352e305f5445d76b4b48c6afd07420b7760 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 18 Jan 2013 14:32:13 +0000 Subject: [PATCH] who will you check? --- pl/boot.yap | 4 ++-- pl/checker.yap | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pl/boot.yap b/pl/boot.yap index 2d2f6074f..4ccc30ccf 100755 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -419,7 +419,7 @@ true :- true. ( get_value('$syntaxcheckflag',on) -> - '$check_term'(Source, V, Pos, BodyMod) + '$check_term'(Source, G, V, Pos, BodyMod) ; true ), @@ -488,8 +488,8 @@ true :- true. '$yes_no'(G,(?-)). '$query'(G,V) :- ( - '$exit_system_mode', yap_hacks:current_choice_point(CP), + '$exit_system_mode', '$execute'(G), yap_hacks:current_choice_point(NCP), ( '$enter_system_mode' ; '$exit_system_mode', fail), diff --git a/pl/checker.yap b/pl/checker.yap index c0b61cd71..9fa9c802e 100644 --- a/pl/checker.yap +++ b/pl/checker.yap @@ -126,24 +126,24 @@ no_style_check([H|T]) :- no_style_check(H), no_style_check(T). '$init_style_check'(_). % style checker proper.. -'$check_term'(T,VL,P,_) :- +'$check_term'(T, _, VL,P,_) :- get_value('$syntaxchecksinglevar',on), '$singletons_in_clause'(T, VL, Sv), Sv = [_|_], '$sv_warning'(Sv,T), fail. -'$check_term'(T,_,P,M) :- +'$check_term'(_, T, _,P,M) :- get_value('$syntaxcheckdiscontiguous',on), '$xtract_head'(T,M,NM,_,F,A), % should always fail '$handle_discontiguous'(F,A,NM), fail. -'$check_term'(T,_,P,M) :- +'$check_term'(_, T,_,P,M) :- get_value('$syntaxcheckmultiple',on), '$xtract_head'(T,M,NM,_,F,A), '$handle_multiple'(F,A,NM), fail. -'$check_term'(T,_,_,M) :- +'$check_term'(_, T,_,_,M) :- once(( get_value('$syntaxcheckdiscontiguous',on) ; @@ -159,7 +159,7 @@ no_style_check([H|T]) :- no_style_check(H), no_style_check(T). ), recorda('$predicate_defs','$predicate_defs'(F,A,NM,File),_), fail. -'$check_term'(_,_,_,_). +'$check_term'(_,_,_,_,_). % % output a list of singleton variables...