Next: , Up: Invocation   [Contents][Index]


9.1 Invocation overview

mmc is invoked as

mmc [options] arguments

Arguments can be either module names or file names. Arguments ending in ‘.m’ are assumed to be file names, while other arguments are assumed to be module names. The compiler will convert module names to file names by looking up the module name in the module-name-to-file-name map in the Mercury.modules file it if exists. (It can be created using a command such as mmc -f *.m.) It Mercury.modules does not exist, then the compiler will search for a module named e.g. ‘foo.bar.baz’ in the files foo.bar.baz.m, bar.baz.m, and baz.m, in that order.

Options are either short (single-letter) options preceded by a single ‘-’, or long options preceded by ‘--’. Options are case-sensitive. We call options that do not take arguments flags. Single-letter flags may be grouped with a single ‘-’, e.g. ‘-vVc’. Single-letter flags may be negated by appending another trailing ‘-’, e.g. ‘-v-’. (You cannot both group and negate single-letter flags at the same time.) Long flags may be negated by preceding them with ‘no-’, e.g. ‘--no-verbose’.