Skip to content

Commit

Permalink
modules and extra cut.
Browse files Browse the repository at this point in the history
  • Loading branch information
vscosta committed May 19, 2016
1 parent 7c1ea8f commit 437a303
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pl/boot.yap
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private(_).
'$handle_error'(_Action,_G0,_M0) :- fail.

% cases where we cannot afford to ever fail.
'$undefp'([ImportingMod|G], _) :- !,
'$undefp'([ImportingMod|G], _) :-
recorded('$import','$import'(ExportingModI,ImportingMod,G,G0I,_,_),_), !,
% writeln('$execute0'(G0I, ExportingModI)),
'$execute0'(G0I, ExportingModI).
Expand Down Expand Up @@ -659,7 +659,7 @@ number of steps.
'$execute_commands'([],_,_,_,_) :- !.
'$execute_commands'([C|Cs],VL,Pos,Con,Source) :- !,
(
'$system_catch'('$execute_command'(C,VL,Pos,Con,C),prolog,Error,'$LoopError'(Error, Con)),
'$system_catch'('$execute_command'(C,VL,Pos,Con,Source),prolog,Error,'$LoopError'(Error, Con)),
fail
;
'$execute_commands'(Cs,VL,Pos,Con,Source)
Expand Down Expand Up @@ -691,12 +691,12 @@ number of steps.
'$execute_command'((:-G),VL,Pos,Option,_) :-
% !,
Option \= top, !,
'$current_module'(M),
% allow user expansion
expand_term((:- M:G), O),
expand_term((:- G), O),
(
O = (:- G1)
->
'$current_module'(M),
'$process_directive'(G1, Option, M, VL, Pos)
;
'$execute_commands'(O,VL,Pos,Option,O)
Expand Down
3 changes: 2 additions & 1 deletion pl/messages.yap
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ location(error(style_check(style_check(_,LN,FileName,_ ) ),_), _ , _) -->
location( error(_,Term), Level, LC ) -->
{ source_location(F0, L),
stream_property(_Stream, alias(loop_stream)) }, !,
display_consulting( F0, Level, LC ),
display_consulting( F0, Level, LC ),
{ lists:memberchk([p|p(M,Na,Ar,_File,_FilePos)], Term ) },
[ '~a:~d:0 ~a in ~a:~q/~d:'-[F0, L,Level,M,Na,Ar] ].
location( error(_,Term), Level, LC ) -->
Expand Down Expand Up @@ -912,6 +912,7 @@ prolog:print_message(Severity, Msg) :-
!,
format(user_error, 'uninstantiated message~n', [])
;
'$pred_exists'(portray_message(_,_),user),
user:portray_message(Severity, Msg)
),
!.
Expand Down

0 comments on commit 437a303

Please sign in to comment.