Reputation: 18940
For some reason, in my Prolog module I want to be able to consult a file, but like if it was consulted from another module (e.g. user).
Say I have a file named myfile.pl
containing:
foo(1).
Normally, if in module mymodule I execute consult(myfile)
, what I have is a new predicate mymodule:foo/1
.
I would like to be able to consult the file from module mymodule but the resulting predicate be like user:foo/1
.
Is this possible?
Upvotes: 0
Views: 96
Reputation: 18663
Did you tried to call consult(user:myfile)
from within your mymodule module?
Upvotes: 1