YAP 7.1.0
Module Interface Predicates


Detailed Description

Class Documentation

◆ reexport/1

class reexport/1


properties: directive

◆ reexport/2

class reexport/2

reexport(+F, +Decls )

properties: directive

allow a module to use and export predicates from another module

Export all predicates defined in list F as if they were defined in the current module

Export predicates defined in file F according to Decls The declarations should be of the form:

list of predicate declarations to be exported Each declaration may be a predicate indicator or of the form `_PI_as‘ _NewName_’', meaning that the predicate with indicator PI is to be exported under name NewName

`except`( _List_)

In this case, all predicates not in List are exported Moreover, if _PI_as_NewName_ is found, the predicate with indicator PI is to be exported under name NewName as before

Re-exporting predicates must be used with some care Please, take into account the following observations:

The reexport declarations must be the first declarations to follow the module declaration

  • It is possible to use both reexport and use_module, but all predicates reexported are automatically available for use in the current module
  • In order to obtain efficient execution, YAP compiles dependencies between re-exported predicates In practice, this means that changing a reexport declaration and then just recompiling the file may result in incorrect execution