The predicate close_module is used to close a module that is present in the clausebase. The single argument is the internal name of the module. If the active module is closed then module that was opened just before the module being closed is made the current active module.
see also: active_module/1 check_singleton/1 consult/0 consult/1 consult/3 create_module/1 create_module/2 ensure_loaded/1 include/1 module/3 module_name/2 modules open_module/0 open_module/1 open_module/3 open_module_search/3 open_standard_module/2 save_module/1 save_module/2 save_module/3 set_active_module/0 set_active_module/1 this_module/3
| Examples | |
| close_module(m23). | closes the module |
| close_module(module1). | if there is not a module with the name module1 then an existence_error(module, A) exception is thrown |
| Exceptions | |
| The argument is a variable | an instantiation_error exception is thrown |
| The argument Arg is not an atom | a type_error(atom, Arg) exception is thrown |
| No module with the specified Name exists | an existence_error(module, Name) exception is thrown. |
| the module to close is the system module | a permission_error(close_module, system) exception is thrown |
| clauses of the module are used for proving of the current goal | a permission_error(close_module, system) exception is thrown |