next up previous index
Next: Mode Declarations Up: The Compiler Previous: Libraries

Module Compilation

One source file can contain several modules and one module may spread over several filesgif. The module structure is controlled by the module/1 or module_interface/1 directive which tells the compiler that all subsequent input up to the end of file or another module directive will be part of the given module.

When it encounters the module_interface/1 directive, the compiler first erases previous contents of this module, if there was any, before starting to compile predicates into it. This means that if the contents of a module has to be generated incrementally, the module directive cannot be used because the previous contents of the module would be destroyed. In this case the predicate compile(File, Module) should be used.



Micha Meier
Mon Mar 4 12:11:45 MET 1996