Previous: , Up: Mmc arguments   [Contents][Index]


2.1.3 File name and module name arguments

Non-option arguments can be either file names (if they end in ‘.m’) or modules names (if they don’t).

The compiler can convert module names to file names in one of two ways. In the absence of a file named Mercury.modules in the current directory, it relies on each module being stored in a file whose name is just the module name followed by ‘.m’. For a module named e.g. foo.bar.baz, it expects to find it in foo.bar.baz.m.

If any program of the program does not meet this requirement, then users must create a Mercury.modules file, which contains a map from module names to file names. This can be created using a command such as mmc -f *.m if that all the modules of the program are in the current directory. (see Options that give the compiler its overall task). In the presence of the Mercury.modules file, the compiler will of course get the file name corresponding to a module name by looking up the module name in this file.