next up previous
Next: Compatibility of the Up: Using Modules Previous: Dynamic Modules

Module Handling Predicates

This section gives the predicate definitions for the remaining built-in predicates that handle modules.

:- module( +Module, +PublicList)

  This directive can only be used as the first term of a source file. It declares the file to be a module file, defining Module and exporting the predicates of PublicList. PublicList is a list of name/arity pairs.
module_transparent +Preds

  Preds is a comma separated list of name/arity pairs (like dynamic/1). Each goal associated with a transparent declared predicate will inherit the context module from its parent goal.
context_module( -Module)

  Unify Module with the context module of the current goal. context_module/1 itself is transparent.
export( +Head)

  Add a predicate to the public list of the context module. This implies the predicate will be imported into another module if this module is imported with use_module/[1,2]. Note that predicates are normally exported using the directive module/2. export/1 is meant to handle export from dynamically created modules.
export_list( +Module, ?Exports)

  Unifies Exports with a list of terms. Each term has the name and arity of a public predicate of Module. The order of the terms in Exports is not defined. See also predicate_property/2.



Passani Luca
Tue Nov 14 08:58:33 MET 1995