put mod_scan back.

This commit is contained in:
Vítor Santos Costa 2014-08-20 08:08:21 -05:00
parent 86a363d3bd
commit 8a4590f3ce

View File

@ -1359,8 +1359,8 @@ export_list(Module, List) :-
format(user_error,'NAME CLASH: ~w was already imported to module ~w;~n',[M1:N/K,M2]), format(user_error,'NAME CLASH: ~w was already imported to module ~w;~n',[M1:N/K,M2]),
format(user_error,' Do you want to import it from ~w ? [y, n, e or h] ',M), format(user_error,' Do you want to import it from ~w ? [y, n, e or h] ',M),
'$mod_scan'(C), '$mod_scan'(C),
( C =:= 0'e -> halt(1) ; ( C == e -> halt(1) ;
C =:= 0'y ). C == y ).
'$redefine_action'(true, M1, _, _, _, _) :- !, '$redefine_action'(true, M1, _, _, _, _) :- !,
recorded('$module','$module'(F, M1, _MyExports,_Line),_), recorded('$module','$module'(F, M1, _MyExports,_Line),_),
unload_file(F). unload_file(F).
@ -1369,6 +1369,11 @@ export_list(Module, List) :-
'$current_module'(_, M2), '$current_module'(_, M2),
'$do_error'(permission_error(import,M1:N/K,redefined,M2),F). '$do_error'(permission_error(import,M1:N/K,redefined,M2),F).
'$mod_scan'(C) :-
get_char(C),
'$skipeol'(C),
(C == y -> true; C == n).
% I assume the clause has been processed, so the % I assume the clause has been processed, so the
% var case is long gone! Yes :) % var case is long gone! Yes :)
'$clean_cuts'(G,(yap_hacks:current_choicepoint(DCP),NG)) :- '$clean_cuts'(G,(yap_hacks:current_choicepoint(DCP),NG)) :-