4.11.13 Obtaining Information about Loaded Modules

The built-in predicate current_predicate/2 can be used to find all the currently loaded module, and where they were loaded from.

current_module(?M)
M is the name of a current module
current_module(?M,?F)
F is the name of the file in which M's module declaration appears

Send feedback on this subject.