Module Type | Module Heading | Purpose |
program module | MODULE | main module |
definition module | DEFINITION MODULE | interface definition |
implementation module | IMPLEMENTATION MODULE | implementation of an definition |
When successfully processed by the compiler, an object file is generated for program modules and implementation modules, and a so called symbol file for definition modules. Later, if a module is given in an import list or an implementation is being compiled, the associated symbol file is necessary to check module clients and implementors against the interface.
Because of these compilation dependencies it is not convenient to call the compiler ``by hand''. Some Modula-2 compilers provide a built-in environment which supports the compilation in the correct order. Under UNIX, however, a more flexible and open approach is appropiate: