![]() |
YAP 7.1.0
|
module(+ M:atom,+ L:list ) More...
module(+ M:atom,+ L:list )
module(+ Module:atom, +ExportList:list)
properties: directive
the current file defines module M with exports L The list may include
The list L may include predicates imported from other modules If you want to fully reexport a module, or a sub-set, also consider reexport/1
Similar to module/2 , this directive defines the file where it appears in as a module file; it must be the first declaration in the file M must be an atom specifying the module name; L must be a list containing the module's public predicates specification, in the form [predicate_name/arity,...]
The last argument Options must be a list of options, which can be: +filename the filename for a module to import into the current module
false
, keep source code for current module, if true
, disableNote that predicates are normally exported using the directive module/2
The export/1
argument is meant to allow export from dynamically created modules The directive argument may also be a list of predicates
properties: directive
define a new module
This directive defines the file where it appears as a module file; it must be the first declaration in the file Module must be an atom specifying the module name; ExportList must be a list containing the module's public predicates specification, in the form [predicate_name/arity,...]
The ExportList can include operator declarations for operators that are exported by the module
The public predicates of a module file can be made accessible to other files through loading the source file, using the directives use_module/1 or use_module/2 , ensure_loaded/1 and the predicates consult/1 or reconsult/1 The non-public predicates of a module file are not supposed to be visible to other modules; they can, however, be accessed by prefixing the module name with the <tt>:/2 operator