module/1

Synopsis

module(+ModuleName)

Changes the type-in module (see ref-mod-tyi) to ModuleName. Thus subsequent top-level goals use ModuleName as their source module.

Arguments


ModuleName atom
the name of a module

Description

If ModuleName is not a current module, a warning message is printed, but the type-in module is changed nonetheless.

ModuleName does not become a current module until predicates are loaded into it.

Calling module/1 from a command embedded in a file that is being loaded does not affect the loading of clauses from that file. It only affects subsequent goals that are typed at top level.

Exceptions


instantiation_error

See also

module/2, current_module/[1,2]