11.3.195 set_module/1

Synopsis

set_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, must be nonvar

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.

Calling set_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
type_error

Examples

See Also

ref-mod, ref-mod-tyi.


Send feedback on this subject.