[ Modules | Reference Manual | Alphabetic Index ]

# get_module_info(+Module, ?What, -Info)

Retrieves information about a loaded module.

Module
  Atom.
What
  An atom.
Info
  A variable.

## Description

This utility can retrieve information about any module that is currently loaded into the system. The information that can be requested is:

raw_interface (list of export/1 and reexport/1)
  this returns a list of all the export and reexport directives that occurred in the definition of the module and thus comprise the module's interface.
interface (list of export/1)
  Like raw_interface, but all reexports are replaced by the actual exports which result from them.
imports (list of modules)
  a list of the modules that have been imported as a whole.
locked (on/off)
  indicates whether the module is locked or unlocked.

### Modes and Determinism

- get_module_info(+, -, -) is nondet
- get_module_info(+, +, -) is semidet

### Exceptions

(4) instantiation fault
  Module is not instantiated.
(5) type error
  Module is not an atom.
(80) not a module
  Module is not a loaded module.

## Examples

    [eclipse 1]: get_module_info(lists, X,Y).

    X = raw_interface
    Y = [export maplist / 3, export checklist / 2, ...]

    X = interface
    Y = [export reverse / 2, export subtract / 3, ...]

    X = imports
    Y = [eclipse_language]     More? (;)

    X = locked
    Y = off
    yes.

## See Also

import / 1, export / 1, reexport / 1, document : icompile / 1, document : icompile / 2, lock / 0, lock_pass / 1, unlock / 2