save_modules(+Modules, +File)

Saves all predicates in Modules in QOF format to File.


Modules atom or list of atom
An atom representing a current module, or a list of such atoms representing a list of modules.
File file_spec
An atom representing a filename


save_modules/2 saves the current definitions of all predicates in a module, or list of modules, in QOF format into a file. The modules imported by the saved modules are recorded as dependencies in the QOF file. The foreign files loaded into that module are also recorded as foreign dependencies in the QOF file. The QOF file produced can be loaded into a development system (using load_files/1) or it can be linked using qld.

When multiple modules are saved into a file, loading that file will import only the first of those modules into the module in which the load occurred.


Modules or File is not bound.
Modules is not a valid list of module names, or a single module name, or File is not a valid file specification
File is not writable
A given module is not a current module.

See Also:

load_files/1, save_predicates/2, save_program/1, volatile/1