Merge pull request #1049 from pmoura/add_preliminary_current_module_predicate_definition

Add preliminary current_module/1 predicate definition requiring a bound argument
This commit is contained in:
Mark Thom
2021-09-30 09:19:09 -06:00
committed by GitHub

View File

@@ -8,7 +8,8 @@
prolog_load_context/2,
strip_module/3,
use_module/1,
use_module/2
use_module/2,
current_module/1
]).
@@ -465,6 +466,14 @@ use_module(Module, Exports) :-
; use_module(Module, Exports, Evacuable)
).
current_module(Module) :-
( var(Module) ->
instantiation_error(current_module/1)
; \+ atom(Module) ->
type_error(atom, Module, current_module/1)
; '$module_exists'(Module)
).
%% If use_module is invoked in an existing load context, use its
%% directory. Otherwise, use the relative path of Path.