fix reconsult non-mod file, fix cases where users call source, fix bad atom_concat

This commit is contained in:
Vítor Santos Costa 2013-11-08 08:24:06 +00:00
parent 7e0bf7fbe8
commit 4085f268af
2 changed files with 9 additions and 5 deletions

View File

@ -367,7 +367,7 @@ use_module(M,F,Is) :-
), ),
'$set_current_loop_stream'(Stream, OldStream), '$set_current_loop_stream'(Stream, OldStream),
'$swi_set_prolog_flag'(generate_debug_info, GenerateDebug), '$swi_set_prolog_flag'(generate_debug_info, GenerateDebug),
'$comp_mode'(CompMode, OldCompMode), '$comp_mode'(_CompMode, OldCompMode),
working_directory(_,OldD), working_directory(_,OldD),
% surely, we were in run mode or we would not have included the file! % surely, we were in run mode or we would not have included the file!
nb_setval('$if_skip_mode',run), nb_setval('$if_skip_mode',run),
@ -387,6 +387,7 @@ use_module(M,F,Is) :-
( LC == 0 -> prompt(_,' |: ') ; true), ( LC == 0 -> prompt(_,' |: ') ; true),
( OldMode == off -> '$exit_system_mode' ; true ), ( OldMode == off -> '$exit_system_mode' ; true ),
'$exec_initialisation_goals', '$exec_initialisation_goals',
% format( 'O=~w~n', [Mod=UserFile] ),
!. !.
% are we in autoload and autoload_flag is false? % are we in autoload and autoload_flag is false?
@ -928,7 +929,8 @@ absolute_file_name(File,Opts,TrueFileName) :-
nonvar(RelTo) nonvar(RelTo)
-> ->
'$dir_separator'(D), '$dir_separator'(D),
atom_concat([RelTo, D, File], ActualFile) atom_codes(DA,[D]),
atom_concat([RelTo, DA, File], ActualFile)
; ;
ActualFile = File ActualFile = File
), ),
@ -1126,7 +1128,7 @@ absolute_file_name(File,Opts,TrueFileName) :-
'$fetch_comp_status'(assert_all) :- '$fetch_comp_status'(assert_all) :-
'$nb_getval'('$assert_all',on, fail), !. '$nb_getval'('$assert_all',on, fail), !.
'$fetch_comp_status'(source) :- '$fetch_comp_status'(source) :-
'$access_yap_flags'(11,1). '$access_yap_flags'(11,1), !.
'$fetch_comp_status'(compact). '$fetch_comp_status'(compact).
make :- make :-

View File

@ -52,8 +52,8 @@
source_mode(Old, New), source_mode(Old, New),
'$prepare_restore_hidden'(Old,New). '$prepare_restore_hidden'(Old,New).
'$convert_true_off_mod3'(true, off, _). '$convert_true_off_mod3'(true, off, _) :- !.
'$convert_true_off_mod3'(false, on, _). '$convert_true_off_mod3'(false, on, _) :- !.
'$convert_true_off_mod3'(X, _, M) :- '$convert_true_off_mod3'(X, _, M) :-
'$do_error'(domain_error(module_decl_options,hidden(X)),M). '$do_error'(domain_error(module_decl_options,hidden(X)),M).
@ -654,6 +654,8 @@ export_list(Module, List) :-
'$convert_for_export'(all, Exports, _Module, _ContextModule, Tab, Exports, _) :- '$convert_for_export'(all, Exports, _Module, _ContextModule, Tab, Exports, _) :-
'$simple_conversion'(Exports, Tab). '$simple_conversion'(Exports, Tab).
'$convert_for_export'([], Exports, Module, ContextModule, Tab, MyExports, Goal) :-
'$clean_conversion'([], Exports, Module, ContextModule, Tab, MyExports, Goal).
'$convert_for_export'([P1|Ps], Exports, Module, ContextModule, Tab, MyExports, Goal) :- '$convert_for_export'([P1|Ps], Exports, Module, ContextModule, Tab, MyExports, Goal) :-
'$clean_conversion'([P1|Ps], Exports, Module, ContextModule, Tab, MyExports, Goal). '$clean_conversion'([P1|Ps], Exports, Module, ContextModule, Tab, MyExports, Goal).
'$convert_for_export'(except(Excepts), Exports, Module, ContextModule, Tab, MyExports, Goal) :- '$convert_for_export'(except(Excepts), Exports, Module, ContextModule, Tab, MyExports, Goal) :-