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