module/[2,3] [declaration]:- module(+ModuleName, +PublicPred).
:- module(+ModuleName, +PublicPred, +Options).
Declares the file in which the declaration appears to be a module-file named ModuleName, with public predicates PublicPred. Must appear as the first term in the file.
List of predicate specifications of the form Name/Arity.
A list of zero or more options of the form:
hidden(Boolean)false (the default) or true. In the
latter case, tracing of the predicates of the module is
disabled (although spypoints can be set), and no source
information is generated at compile time.
The definition of a module is not limited to a single file, because a module-file may contain commands to load other files. If myfile, a module-file for ModuleName, contains an embedded command to load yourfile and if yourfile is not itself a module-file, then all the predicates in yourfile are loaded into module ModuleName.
If the export list is not properly specified, there will be a warning or error message at compile time.
instantiation_errortype_errorcontext_errorA module declaration from the Prolog library:
:- module(varnumbers, [
numbervars/1,
varnumbers/2,
varnumbers/3
],[
hidden(true)
]).