This commit is contained in:
Vitor Santos Costa 2016-07-31 10:36:17 -05:00
parent f6a90c0cac
commit 71afcd0350

View File

@ -588,15 +588,16 @@ set_base_module(ExportingModule) :-
set_base_module(ExportingModule) :- set_base_module(ExportingModule) :-
atom(ExportingModule), !, atom(ExportingModule), !,
'$current_module'(Mod), '$current_module'(Mod),
retractall(prolg:'$parent_module'(Mod,_)), retractall(prolog:'$parent_module'(Mod,_)),
asserta(prolog:'$parent_module'(Mod,ExportingModule)). asserta(prolog:'$parent_module'(Mod,ExportingModule)).
set_base_module(ExportingModule) :- set_base_module(ExportingModule) :-
'$do_error'(type_error(atom,ExportingModule),set_base_module(ExportingModule)). '$do_error'(type_error(atom,ExportingModule),set_base_module(ExportingModule)).
/** /**
@pred import_module( +ImportingModule, +ExportingModule ) is det * @pred import_module( +ImportingModule, +ExportingModule ) is det
All exported predicates from _ExportingModule_ are automatically available to the * All exported predicates from _ExportingModule_
source module _ImportModule_. * are automatically available to the
* source module _ImportModule_.
This innovation was introduced by SWI-Prolog. By default, modules only This innovation was introduced by SWI-Prolog. By default, modules only
inherit from `prolog` and `user`. This extension allows predicates in inherit from `prolog` and `user`. This extension allows predicates in