MERCURY_OPTIONS= --deep-random-write=25 --deep-std-name --mdb-disable-progress gmake[3]: Entering directory '/home/mercury/testing/run/build/mercury-srcdist-rotd-2025-07-23/tests/warnings' /home/mercury/testing/run/build/mercury-srcdist-rotd-2025-07-23/stage2/scripts/mmc --generate-dependencies --grade asm_fast.gc.profdeep.stseg --mercury-linkage static --flags ../TESTS_FLAGS --flags ../WS_FLAGS --output-compile-error-lines 0 --color-diagnostics --infer-all help_text > help_text.dep_err 2>&1 gmake[3]: Leaving directory '/home/mercury/testing/run/build/mercury-srcdist-rotd-2025-07-23/tests/warnings' gmake[3]: Entering directory '/home/mercury/testing/run/build/mercury-srcdist-rotd-2025-07-23/tests/warnings' /home/mercury/testing/run/build/mercury-srcdist-rotd-2025-07-23/stage2/scripts/mmc --mercury-linkage static --flags ../TESTS_FLAGS --flags ../WS_FLAGS --output-compile-error-lines 0 --color-diagnostics --infer-all --help-priv help_text.m > help_text.err 2>&1 diff -u help_text.err_exp help_text.err \ > help_text.res || \ { cat help_text.res; exit 1; } --- help_text.err_exp 2025-07-23 21:26:29.000000000 +1000 +++ help_text.err 2025-07-24 05:10:12.921282073 +1000 @@ -2649,6 +2649,13 @@ Specify a single word option to be passed to the C# compiler. The word will be quoted when passed to the shell. + --mono-path-directory + --no-mono-path-directory + --mono-path-dir + --no-mono-path-dir + Specify a directory to add to the runtime library assembly search path + passed to the Mono CLR using the `MONO_PATH' environment variable. + Options for linking General options for linking gmake[3]: *** [/tmp/mmake.94oxO3:1042: help_text.runtest] Error 1 gmake[3]: Leaving directory '/home/mercury/testing/run/build/mercury-srcdist-rotd-2025-07-23/tests/warnings' ERROR OUTPUT Name: mmc - Melbourne Mercury Compiler Copyright (C) 1993-2012 The University of Melbourne Copyright (C) 2013-2025 The Mercury team Usage: mmc [] Arguments: Arguments ending in `.m' are assumed to be source file names. Arguments that do not end in `.m' are assumed to be module names. Arguments of the form `@file' are replaced with the contents of the file. Options: Help options -? -h --help Print a usage message. PRIVATE OPTION --help-priv Print a usage message, including private options. PRIVATE OPTION --help-texinfo Print the documentation of all options for the user guide. --version Print the compiler version. Options for modifying the command line --flags-file --flags Take options from the specified file, and handle them as if they were specified on the command line. --filenames-from-stdin Read in from standard input a newline-terminated module name or file name, compile that module or file, and repeat until reaching end-of-file. (This allows a program or user to interactively compile several modules without the overhead of creating a process for each one.) Options that give the compiler its overall task -f --generate-source-file-mapping Output to `Mercury.modules' the module-name-to-file-name mapping for the list of source files given as non-option arguments to mmc. This mapping is needed if either for some modules, the file name does not match the module name, or if some of the modules are outside the current directory. In such cases, the mapping must be generated before invoking any one of `mmc --generate-dependencies', `mmc --make', or `mmake depend'. -M --generate-dependencies Output `Make'-style dependencies for the given main module, and all the other modules in the program (i.e. all the other modules in this directory that the main module imports either directly or indirectly) to `.dep', to `.dv', and to the `.d' files of all the modules in the program. --generate-dependencies-ints Do the same job as --generate-dependencies, but also output `.int3', `.int0', `.int' and `.int2' files for all the modules in the program. --generate-dependency-file Output `Make'-style dependencies for the given module to `.d'. --make-short-interface --make-short-int Write to `.int3' a list of the types, insts, modes, typeclasses and instances defined in the interface section of the named module. The compiler uses these files to create `.int0', `.int' and `.int2' files. --make-private-interface --make-priv-int Write to `.int0' the list of the entities (including types, insts, modes, predicates and functions) defined in the given module that its submodules have access to. (This will include even entities that are *not* exported from the module.) Besides the code of the module itself, the inputs to this task are the `.int0' files of the given module's own ancestor modules, and the `.int3' files of the modules it imports directly or indirectly. Note that this command is unnecessary for modules that have no submodules. -i --make-interface --make-int Write to `.int' and to `.int2' a list of entities (including types, insts, modes, predicates and functions) that the given module exports for use by other modules. When generating code, the compiler reads the `.int' file of every directly imported module, and the `.int2' file of every indirectly imported module. (Each `.int2' file is a slightly shorter version of the corresponding `.int' file, because it is specialized for its intended use.) --make-optimization-interface --make-optimisation-interface --make-opt-int Write to `.opt' information about the semantically-private parts of the named module that can be useful when optimizing another module that imports this one. Note that `.opt' files are used by `--intermodule-optimization'. --make-transitive-optimization-interface --make-transitive-optimisation-interface --make-trans-opt Write to `.trans_opt' information about the named module that can be useful when optimizing another module that imports this one. The distinction from `.opt' files is that a `.trans_opt' file can include information not just from the source code of its module, but also from the `.opt' and `.trans_opt' files of other modules. Note that `.trans_opt' files are used by `--transitive-intermodule-optimization'. -t --typecheck-only Check the module's code only for syntax- and type errors. Do not execute any other semantic checks, and do not generate any code. (When converting Prolog code to Mercury, it can sometimes be useful to get the types right first and worry about modes second; this option supports that approach.) -e --errorcheck-only Check the module's code for syntax- and semantic errors, but do not generate any code. -C --target-code-only Generate target code (meaning C code in `.c', C# code in `.cs', or Java code in `.java'), but do not generate object code. -c --compile-only Generate C code in `.c' and object code in `.o', but do not attempt to link the object files. --generate-standalone-interface --no-generate-standalone-interface Output a stand-alone interface. Use as the basename of any files generated for the stand-alone-interface. (See the "Stand-alone interfaces" chapter of the Mercury User's Guide for further details.) -P --convert-to-mercury --convert-to-Mercury --pretty-print Output the code of the module to `.ugly' in a standard format. This option acts as a Mercury ugly-printer. (It would be a pretty-printer, except that comments are stripped, and nested if-then-elses are indented too much, so the result is rather ugly.) -x --make-xml-documentation --make-xml-doc Output an XML representation of all the declarations in the module to `.xml'. This XML file can then be transformed via a XSL transform into another documentation format. PRIVATE OPTION --make-analysis-registry There is no help text available. -m --make Treat the non-option arguments to `mmc' as files to make, rather than source files. Build or rebuild the specified files if they do not exist or are not up-to-date. Note that this option also enables `--use-subdirs'. -r --rebuild A variant of the `--make' option, with the difference being that it always rebuilds the target files, even if they are up-to-date. PRIVATE OPTION --invoked-by-mmc-make This option is only for internal use by the compiler. `mmc --make' passes it as the first argument when compiling a module. --output-grade-string Print to standard output the canonical string representing the currently selected grade. --output-grade-defines Print to standard output the C compiler flags that define the macros which specify the selected compilation grade. --output-stdlib-grades Print to standard output the list of compilation grades in which the Mercury standard library is available with this compiler. --output-stdlib-modules Print to standard output the names of the modules in the Mercury standard library. --output-libgrades --output-library-install-grades Print to standard output the list of compilation grades in which a library to be installed should be built. --output-target-arch Print to standard output the target architecture. --output-cc Print to standard output the command for invoking the C compiler. --output-c-compiler-type --output-cc-type Print to standard output the C compiler's type. --output-cflags Print to standard output the flags with which the C compiler will be invoked. --output-c-include-directory-flags --output-c-include-dir-flags Print to standard output the C compiler flags that specify which directories to search for C header files. This includes the C header files from the standard library. --output-link-command Print to standard output the link command used to create executables. --output-shared-lib-link-command Print to standard output the link command used to create shared libraries. --output-library-link-flags Print to standard output the flags that must be passed to the linker in order to link against the current set of libraries. This includes the Mercury standard library, as well as any other libraries specified via either the `--ml' or `-l' option. --output-csharp-compiler Print to standard output the command for invoking the C# compiler. --output-csharp-compiler-type Print to standard output the C# compiler's type. --output-java-class-directory --output-class-directory --output-java-class-dir --output-class-dir Print to standard output the name of the directory in which the compiler will place any generated Java class files. --output-optimization-options --output-opt-opts Print to standard output a list of the optimizations enabled at each optimization level. --output-optimization-options-upto --output-opt-opts-upto Print to standard output a list of the optimizations enabled at each optimization level up to the given maximum. Grade options Grades and grade components -s --grade Select the compilation model. This model, which Mercury calls a *grade*, specifies what properties the resulting executable or library should have. Properties such as `generates profiling data for `mprof' when executed'. and `can be debugged with the Mercury debugger'. As such, it controls decisions that must be made the same way in all the modules of a program. For example, it does not make sense to compile some modules of a program to C and some to Java; nor does it make sense to compile some modules to support profiling and some to not support profiling. The should consist of one of the base grades `none', `reg', `asm_fast', `hlc', `java', or `csharp', followed by zero or more of the grade modifiers in the following options. The names of all grade modifiers start with a period, so a complete grade name consists of a list of name components (the base grade and some grade modifiers) separated by periods. Note that not all combinations of components are allowed, and that the Mercury standard library will have been installed on your system in only a subset of the set of all possible grades. Attempting to build a program in a grade which has not been installed or to link together modules that have been compiled in different grades, will result in an error. Target options --target (grades: none, reg, asm_fast, hlc) --target (grades: csharp) --target (grades: java) Specify the target language: C, C# or Java. The default is C. Targets other than C imply `--high-level-code' (see below). --compile-to-c --compile-to-C An abbreviation for `--target c' `-target-code-only'. Generate C code in `.c', but do not generate object code. --java --Java An abbreviation for `--target java'. --java-only --Java-only An abbreviation for `--target java' `--target-code-only'. Generate Java code in `.java', but do not generate Java bytecode. --csharp --C# An abbreviation for `--target csharp'. --csharp-only --C#-only An abbreviation for `--target csharp' `--target-code-only'. Generate C# code in `.cs', but do not generate CIL bytecode. LLDS backend grade options --gcc-global-registers (grades: reg, asm_fast) --no-gcc-global-registers (grades: none) Specify whether to use GNU C's global register variables extension. This option is used only when targeting C with `--no-high-level-code'. --gcc-non-local-gotos (grades: asm_fast) --no-gcc-non-local-gotos (grades: none, reg) Specify whether to use GNU C's `labels as values' extension. This option is used only when targeting C with `--no-high-level-code'. --asm-labels (grades: asm_fast) --no-asm-labels (grades: none, reg) Specify whether GNU C's asm extensions for inline assembler labels. This option is used only when targeting C with `--no-high-level-code'. PRIVATE OPTION --no-use-float-registers Use float registers for argument passing. This option is used only when targeting C with `--no-high-level-code'. MLDS backend grade options -H (grades: hlc, csharp, java) --high-level-code --high-level-c --high-level-C --highlevel-code --highlevel-c --highlevel-C Use the MLDS backend, which generates idiomatic high-level-language code, rather than the LLDS backend, which generates assembly language code in C syntax. --c-debug-grade (grades: hlc) Require that all modules in the program be compiled to object code in a way that allows the program executable to be debuggable with debuggers for C, such as `gdb'. This option is intended mainly for the developers of Mercury, though it can also help to debug C code included in Mercury programs. This option is used only when targeting C. Debugging grade options Mdb debugging grade options --debug (grade modifier: `.debug') Enable Mercury-level debugging. See the "Debugging" chapter of the Mercury User's Guide for details. This option is supported only when targeting C with `--no-high-level-code'. --decl-debug (grade modifier: `.decldebug') Enable full support for declarative debugging. This allows subterm dependency tracking in the declarative debugger. See the "Debugging" chapter of the Mercury User's Guide for details. This option is supported only when targeting C with `--no-high-level-code'. Ssdb debugging grade options PRIVATE OPTION --source-to-source-debug (grade modifier: `.ssdebug') --ss-debug --ssdb Enable the source-to-source debugging transform. Profiling grade options Mprof profiling grade options -p (grade modifier: `.prof') --profiling Prepare the generated code for time profiling by Mercury's version of the standard Unix profiler `gprof', which is a tool called `mprof'. In `.prof' grades, the compiler will insert profiling hooks into the generated code (e.g. to count calls), and will also output the static call graph of the module to `.prof' for use by `mprof'. Please see the "Building profiled applications" section in the Mercury User's Guide for details. This option is supported only when targeting C. PRIVATE OPTION --time-profiling There is no help text available. --memory-profiling (grade modifier: `.memprof') Prepare the generated code for profiling of memory usage and retention by mprof. Please see the "Using mprof for profiling memory allocation" and "Using mprof for profiling memory retention" sections in the Mercury User's Guide for details. This option is supported only when targeting C. PRIVATE OPTION --profile-calls (grade modifier: `.profcalls') Similar to `--profiling', except that it only gathers call counts, not timing information. Useful on systems where time profiling is not supported, but not as useful as `--memory-profiling'. PRIVATE OPTION --profile-time (grade modifier: `.proftime') Similar to `--profiling', except that it only gathers timing information, not call counts. PRIVATE OPTION --profile-memory (grade modifier: `.profmem') Similar to `--memory-profiling', except that it only gathers memory usage information, not call counts. Deep profiling grade options --deep-profiling (grade modifier: `.profdeep') Prepare the generated code for deep profiling. The Mercury deep profiling tool `mdprof' (note the `d' in the name) associates much more context with each measurement than `mprof', making it much more suitable for handling polymorphic code and higher order code, both of which are much more common in typical Mercury code than in typical C code. This option is supported only when targeting C with `--no-high-level-code'. PRIVATE OPTION --profile-deep There is no help text available. PRIVATE OPTION --use-activation-counts There is no help text available. PRIVATE OPTION --no-use-zeroing-for-ho-cycles There is no help text available. PRIVATE OPTION --use-lots-of-ho-specialization There is no help text available. PRIVATE OPTION --deep-profile-tail-recursion There is no help text available. --no-coverage-profiling Do not gather deep profiling information that is useful only for coverage profiling. PRIVATE OPTION --coverage-profiling-via-calls Use calls to implement coverage points, not inline foreign code. PRIVATE OPTION --coverage-profiling-static Disable coverage profiling of ProcDynamics; cover only ProcStatics. This uses less memory, and may be faster. PRIVATE OPTION --no-profile-deep-coverage-after-goal Disable coverage points after goals. PRIVATE OPTION --no-profile-deep-coverage-branch-ite Disable coverage points at the beginning of then and else branches. PRIVATE OPTION --no-profile-deep-coverage-branch-switch Disable coverage points at the beginning of switch branches. PRIVATE OPTION --no-profile-deep-coverage-branch-disj Disable coverage points at the beginning of disjunction branches. PRIVATE OPTION --profile-deep-coverage-use-portcounts Use port counts to provide coverage information. PRIVATE OPTION --profile-deep-coverage-use-trivial Use simple goal properties for coverage information. --profile-for-feedback --profile-for-implicit-parallelism Select deep profiling options that are suitable for profiler directed implicit parallelism. `--profile-for-implicit-parallelism' is a deprecated synonym for this option. Complexity profiling grade options PRIVATE OPTION --experimental-complexity Enable experimental complexity analysis for the predicates listed in the given file. This option is supported only when targeting C with `--no-high-level-code'. PRIVATE OPTION --record-term-sizes-as-words (grade modifier: `.tsw') Augment each heap cell with its size in words. PRIVATE OPTION --record-term-sizes-as-cells (grade modifier: `.tsc') Augment each heap cell with its size in cells. Threadscope profiling grade options PRIVATE OPTION --threadscope (grade modifier: `.threadscope') Enable support for profiling parallel execution. using Threadscope. This option is supported only when targeting C in parallel grades with `--no-high-level-code', and only on some processors. See README.ThreadScope and the "Using threadscope" section for details. Optional feature grade options PRIVATE OPTION --pregenerated-dist There is no help text available. --garbage-collection {none, boehm, automatic} --gc {none, boehm, automatic} Specify which method of garbage collection to use. When targeting Java or C#, the only possible choice is `automatic', which means the garbage collector built into the target language. When targeting C, the usual choice is `boehm', which is Hans Boehm et al's conservative collector. The use of the Boehm collector is indicated by the `.gc' grade component. The other alternative when targeting C is `none', meaning there is no garbage collector. This works only for programs with very short runtimes. --stack-segments (grade modifier: `.stseg') Specify the use of dynamically sized stacks that are composed of small segments. This can help to avoid stack exhaustion at the cost of increased execution time. This option is supported only when targeting C with `--no-high-level-code'. PRIVATE OPTION --extend-stacks-when-needed Specify that code that increments the stack pointer must extend the stack on demand. This option is supported only when targeting C with `--no-high-level-code'. --use-trail (grade modifier: `.tr') Enable use of a trail. This is necessary for interfacing with constraint solvers, or for backtrackable destructive update. This option is supported only when targeting C. --single-precision-float (grade modifier: `.spf') --single-prec-float Use single precision floats so that, on 32-bit machines, floating point values don't need to be boxed. The default is to use double precision floats. This option is supported only when targeting C. --parallel (grade modifier: `.par') Enable parallel execution support for the low-level C grades. Enable concurrency (via pthreads) for the high-level C grades. --maybe-thread-safe {yes, no} Specify how the compiler should treat the `maybe_thread_safe' foreign code attribute. `yes' means that a foreign procedure with the `maybe_thread_safe' attribute is treated as if it has a `thread_safe' attribute. `no' means that the foreign procedure is treated as if it has a `not_thread_safe' attribute. The default is `no'. PRIVATE OPTION --use-minimal-model-stack-copy Enable the use of the standard form of minimal model tabling. PRIVATE OPTION --use-minimal-model-own-stacks Enable the use of an experimental form of minimal model tabling. PRIVATE OPTION --minimal-model-debug Enables extra data structures that assist in debugging minimal model tabling. PRIVATE OPTION --use-regions (grade modifier: `.rbmm') Enable support for region-based memory management. PRIVATE OPTION --no-use-alloc-regions Compute and use the exact set of regions that may be allocated into by a call. PRIVATE OPTION --use-regions-debug There is no help text available. PRIVATE OPTION --use-regions-profiling There is no help text available. Developer grade options --num-ptag-bits --num-tag-bits Use N primary tag bits. Note that the value of this option is normally autoconfigured; its use should never be needed except for cross-compilation to an architecture where autoconfiguration would yield a different value. PRIVATE OPTION --bits-per-word Reserved for use by the `mmc' script. PRIVATE OPTION --bytes-per-word Reserved for use by the `mmc' script. PRIVATE OPTION --unboxed-float Do not box floating point numbers. This assumes that a Mercury float will fit in a word. The C code must be compiled with `-UMR_BOXED_FLOAT'. It may also need to be compiled with `-DMR_USE_SINGLE_PREC_FLOAT', if double precision floats do not fit into a word. Note that the value of this option is normally autoconfigured; its use should never be needed except for cross-compilation. PRIVATE OPTION --unboxed-int64s Do not box 64-bit integer numbers. This assumes that word size of the target machine is at least 64-bits in size. The C code must be compiled with `-UMR_BOXED_INT64S'. Note that the value of this option is normally autoconfigured; its use should never be needed except for cross-compilation. PRIVATE OPTION --no-unboxed-no-tag-types Box no-tag types. (By default, no-tag types are unboxed.) Note that the value of this option is normally autoconfigured; its use should never be needed except for cross-compilation. PRIVATE OPTION --arg-pack-bits The number of bits in a word in which to pack constructor arguments. Note that the value of this option is normally autoconfigured; its use should never be needed except for cross-compilation. PRIVATE OPTION --pack-everything Tell decide_type_repn.m to pack everything that can be packed. PRIVATE OPTION --no-allow-direct-args Allow the direct arg optimization. PRIVATE OPTION --no-allow-double-word-fields Disallow storing a single constructor argument in two words. (This mainly applies to arguments that are double-precision floats or whose type is int64 or uint64. PRIVATE OPTION --allow-double-word-ints There is no help text available. PRIVATE OPTION --allow-packing-dummies There is no help text available. PRIVATE OPTION --allow-packing-ints There is no help text available. PRIVATE OPTION --allow-packing-chars There is no help text available. PRIVATE OPTION --allow-packing-local-sectags There is no help text available. PRIVATE OPTION --allow-packing-remote-sectags There is no help text available. PRIVATE OPTION --allow-packing-mini-types There is no help text available. PRIVATE OPTION --allow-packed-unify-compare There is no help text available. PRIVATE OPTION --sync-term-size-in-words --sync-term-size There is no help text available. Options that control inference --infer-all This option is an abbreviation for the combination of `--infer-types', `--infer-modes', and `--infer-det'. --infer-types If there is no type declaration for a predicate or function, try to infer its type, instead of just reporting an error. --infer-modes If there is no mode declaration for a predicate, try to infer its mode (or modes), instead of just reporting an error. --no-infer-determinism --no-infer-det If there is no determinism declaration for a procedure (a mode of a predicate or of a function), just report an error; do not try to infer its determinism. --type-inference-iteration-limit Perform at most passes of type inference (default: 60). --mode-inference-iteration-limit Perform at most passes of mode inference (default: 30). --allow-stubs Allow procedures to have no clauses. Any calls to such procedures will raise an exception at run-time. This option is sometimes useful during program development. (See also the documentation for the `--warn-stubs' option in the "Warning options" section.) Options specifying the intended semantics --strict-sequential This option is an abbreviation for the combination of `--no-reorder-conj', `--no-reorder-disj', and `--fully-strict'. --no-reorder-conj Execute conjunctions left-to-right. Do not reorder conjuncts, except where the modes require it (to put the producer of each variable before all its consumers). --no-reorder-disj Execute disjunctions strictly left-to-right; do not reorder disjuncts. --no-fully-strict Allow infinite loops, and goals whose determinism is erroneous, to be optimised away. Verbosity options -v --verbose Output progress messages at each stage in the compilation. -V --very-verbose Output very verbose progress messages. -S --statistics Output messages about the compiler's time/space usage at the boundaries between phases of the compiler. --no-verbose-make Disable messages about the progress of builds when using `mmc --make'. --output-compile-error-lines --no-output-compile-error-lines With `--make', output the first lines of the `.err' file after compiling a module (default: 100). Specifying `--no-output-compile-error-lines' removes the limit. PRIVATE OPTION --verbose-recompilation When using `--smart-recompilation', output messages explaining why a module needs to be recompiled. PRIVATE OPTION --find-all-recompilation-reasons Find all the reasons why a module needs to be recompiled, not just the first. Implies `--verbose-recompilation'. --verbose-commands Output each external command before it is run. Note that some commands will only be printed with `--verbose'. Diagnostics options Options that control diagnostics -E --verbose-error-messages --verbose-errors Some error messages have two versions: a standard version intended for experienced users, and a verbose version intended for new users. The default is to print the first version. This option tells the compiler to print the second version, which will offer a more detailed explanation of any errors it finds in your code. --reverse-error-order Print error messages in descending order of their line numbers, instead of the usual ascending order. This is useful if you want to work on the last errors in a file first. --max-error-line-width --no-max-error-line-width Set the maximum width of an error message line to characters (unless a long single word forces the line over this limit). Specifying `--no-max-error-line-width' removes the limit. --limit-error-contexts filename:minline1-maxline1,minline2-maxline2 --no-limit-error-contexts Print errors and warnings for the named file only when their line number is in one of the specified ranges. The minimum or maximum line number in each range may be omitted, in which case the range has no lower or upper bound respectively. Multiple `--limit-error-context' options accumulate. If more than one `--limit-error-context' option is given for the same file, only the last one will have an effect. If the file name and colon are missing, the limit will apply to all files. --error-files-in-subdir This option causes `mmc --make' to put `.err' files into the `Mercury' subdirectory instead of the current directory. (This option has no effect on `mmake'.) PRIVATE OPTION --std-int-file-not-written-msgs Standardize messages about interface files not being written by omitting any directory name components from file names. --typecheck-ambiguity-warn-limit Set the number of type assignments required to generate a warning about highly ambiguous overloading to . (Default: 50.) --typecheck-ambiguity-error-limit Set the number of type assignments required to generate an error about excessively ambiguous overloading to . If this limit is reached, the typechecker will not process the predicate or function any further. (Default: 3000.) Options that control color in diagnostics --color-diagnostics --colour-diagnostics Disable the use of colors in diagnostic messages. Please see the "Enabling the use of color" section in the Mercury User's Guide for the details. PRIVATE OPTION --no-config-default-color-diagnostics --no-config-default-colour-diagnostics The default value of the `--color-diagnostics' option, set by the configure script. --color-scheme --colour-scheme Specify the color scheme to use for diagnostics, if the use of color in diagnostics is enabled. For information about how the compiler uses colors in diagnostic messages, and about the syntax of color scheme specifications, please see the "Color schemes" section in the Mercury User's Guide. PRIVATE OPTION --color-scheme-envvar There is no help text available. PRIVATE OPTION --ignore-color-scheme-envvar Ignore the `--color-scheme-envvar' option. Warning options Warnings about possible incorrectness Warnings about possible module incorrectness --no-warn-nothing-exported Do not warn about modules which export nothing. --warn-unused-imports Warn about modules that are imported but not used. PRIVATE OPTION --no-warn-unused-interface-imports Warn about modules that are imported in the interface but not used there. --no-warn-interface-imports Do not warn about modules imported in the interface, but which are not used in the interface. --warn-interface-imports-in-parents Warn about modules that are imported in the interface of a parent module, but not used in the interface of that module. --no-warn-stdlib-shadowing Do not generate warnings for module names that either duplicate the name of a module in the Mercury standard library, or contain a subsequence of name components that do so. --warn-too-private-instances An instance declaration has to be private if it is for a private type class (meaning a type class that is not visible outside the current module), if some of its member types refer to private type constructors, or if its class constraints refer to private type classes or private type constructors. Such instances can only be relevant in the current module. Generate a warning if an instance declaration that can be relevant outside the current module is not exported. Warnings about possible inst incorrectness --no-warn-insts-without-matching-type Do not warn about insts that are not consistent with any of the types in scope. --warn-insts-with-functors-without-type Warn about insts that do specify functors, but do not specify what type they are for. Warnings about possible predicate incorrectness --no-warn-det-decls-too-lax Do not warn about determinism declarations which could be stricter. --no-warn-inferred-erroneous Do not warn about procedures whose determinism is inferred to be `erroneous', but whose determinism declarations are looser. --no-warn-unresolved-polymorphism Do not warn about unresolved polymorphism, which occurs when the type of a variable contains a type variable that is not bound to an actual type, even though it should be. --no-warn-stubs Do not warn about procedures for which there are no clauses. Note that this option is meaningful only if the `--allow-stubs' option is enabled. --no-warn-non-term-special-preds Do not warn about types that have user-defined equality or comparison predicates that cannot be proved to terminate. This option is meaningful only if termination analysis is enabled. --warn-non-stratification Warn about possible non-stratification of the predicates and/or functions in the module. Non-stratification occurs when a predicate or function can call itself through negation through some path in its call graph. Warnings about possible pragma incorrectness --no-warn-ambiguous-pragmas --no-warn-ambiguous-pragma Do not warn about pragmas that do not specify whether they are for a predicate or a function, even when there is both a predicate and a function with the given name and arity. --warn-potentially-ambiguous-pragmas --warn-potentially-ambiguous-pragma Warn about pragmas that do not specify whether they are for a predicate or a function. --no-warn-table-with-inline Do not warn about tabled procedures that also have a `pragma inline' declaration. (This combination does not work, because inlined copies of procedure bodies cannot be tabled.) Warnings about possible goal incorrectness --no-warn-singleton-variables --no-warn-singleton-vars Do not warn about variables which only occur once in a clause, but whose names do not start with an underscore. --no-warn-repeated-singleton-variables --no-warn-repeated-singleton-vars Do not warn about variables which occur more than once in a clause, but whose names do start with an underscore. --no-warn-unification-cannot-succeed Do not warn about unifications which cannot succeed. --no-warn-known-bad-format-calls Do not warn about calls to `string.format', `io.format', or `stream.string_writer.format' that contain mismatches between the format string and the supplied values. --no-warn-obsolete Do not warn about calls to predicates and functions that have been marked as obsolete. --no-warn-overlapping-scopes Do not warn about variables which occur in overlapping scopes. --no-warn-suspected-occurs-check-failure --no-warn-suspected-occurs-failure Do not warn about code that looks like it unifies a variable with a term that contains that same variable. Such code cannot succeed because it fails the test called the *occurs check*. --warn-suspicious-recursion Warn about recursive calls which are likely to have problems, such as leading to infinite recursion. --warn-unused-args Warn about predicate or function arguments which are not used. Warnings about missing files --no-warn-undefined-options-variables --no-warn-undefined-options-vars Do not warn about references to undefined variables in options files with `--make'. --no-warn-missing-opt-files Do not warn about `.opt' files which cannot be opened. --warn-missing-trans-opt-files Warn about `.trans_opt' files which cannot be opened. --no-warn-missing-trans-opt-deps Do not generate a warning when the information required to allow `.trans_opt' files to be read when creating other `.trans_opt' files has been lost. The information can be recreated by running `mmake .depend'. Warnings about possible performance issues --no-warn-accumulator-swaps Do not warn about argument order rearrangements done by `--introduce-accumulators'. --no-warn-unneeded-final-statevars Do not warn about `!:S' state variables in clause heads whose value will always be the same as `!.S'. --no-warn-unneeded-final-statevars-lambda Do not warn about `!:S' state variables in lambda expressions whose value will always be the same as `!.S'. --warn-obvious-non-tail-recursion Warn about recursive calls that are not tail calls even if they obviously cannot be tail calls, because they are followed by other recursive calls. PRIVATE OPTION --warn-non-tail-recursion-self Warn about any self recursive calls that are not tail recursive. PRIVATE OPTION --warn-non-tail-recursion-mutual Warn about any mutually recursive calls that are not tail recursive. --warn-non-tail-recursion {none,self,self-and-mutual} --no-warn-non-tail-recursion Specify when the compiler should warn about recursive calls that are not tail calls. Warnings about programming style Warnings about style issues with predicates --warn-dead-predicates --warn-dead-preds Warn about predicates and functions that have no procedures which are ever called. --warn-dead-procedures --warn-dead-procs Warn about procedures which are never called. --warn-can-fail-function Warn about functions that can fail. (Such functions should be replaced by semidet predicates.) --no-warn-unneeded-mode-specific-clause Do not warn about clauses that unnecessarily specify the modes of their arguments. Warnings about style issues with goals --no-warn-simple-code Do not warn about constructs which are so simple that they are likely to be programming errors. (One example is if-then-elses whose condition always succeeds.) --inform-ite-instead-of-switch Generate informational messages for if-then-elses that could be replaced by switches. --inform-incomplete-switch Generate informational messages for switches that do not cover all the function symbols that the switched-on variable could be bound to. --inform-incomplete-switch-threshold Have the `--inform-incomplete-switch' option generate its messages only for switches that *do* cover at least N% of the function symbols that the switched-on variable could be bound to. --warn-duplicate-calls Warn about multiple calls to a predicate or function with the same input arguments. --no-warn-redundant-coerce Do not warn about redundant type coercions, which occur when the type of the result of the `coerce' expression is the same as the type of its argument. --no-warn-state-var-shadowing Do not warn about one state variable shadowing another. --no-warn-unneeded-initial-statevars Do not warn about state variables in clause heads that could be ordinary variables. --no-warn-unneeded-initial-statevars-lambda Do not warn about state variables in the heads of lambda expressions that could be ordinary variables. --warn-implicit-stream-calls Warn about calls to I/O predicates that could take explicit stream arguments, but do not do so. --warn-unknown-format-calls Warn about calls to `string.format', `io.format' or `stream.string_writer.format' for which the compiler cannot tell whether there are any mismatches between the format string and the supplied values. --warn-suspicious-foreign-code Warn about possible errors in the bodies of foreign code pragmas. Note that since the compiler's ability to parse foreign language code is limited, some warnings reported by this option may be spurious, and some actual errors may not be detected at all. --warn-suspicious-foreign-procs Warn about possible errors in the bodies of foreign_proc pragmas. When enabled, the compiler attempts to determine whether the success indicator for a foreign procedure is correctly set, and whether the foreign procedure body contains operations that it should not contain, such as `return' statements in a C foreign procedure. Note that since the compiler's ability to parse foreign language code is limited, some warnings reported by this option may be spurious, and some actual errors may not be detected at all. Warnings about missing order --warn-unsorted-import-blocks --warn-unsorted-import-block Generate a warning if two `import_module' and/or `use_module' declarations occur on the same line, or if a sequence of such declarations on consecutive lines are not sorted on module name. --warn-inconsistent-pred-order-clauses --warn-inconsistent-pred-order Generate a warning if the order of the definitions does not match the order of the declarations for either the exported predicates and functions of the module, or for the nonexported predicates and functions of the module. Applies for definitions by Mercury clauses. --warn-inconsistent-pred-order-foreign-procs Generate a warning if the order of the definitions does not match the order of the declarations for either the exported predicates and functions of the module, or for the nonexported predicates and functions of the module. Applies for definitions by either Mercury clauses or foreign_proc pragmas. Warnings about missing contiguity --no-warn-non-contiguous-decls Do not generate a warning if the mode declarations of a predicate or function do not all immediately follow its `pred' or `func' declaration. --warn-non-contiguous-clauses Generate a warning if the clauses of a predicate or function are not contiguous. --warn-non-contiguous-foreign-procs Generate a warning if the clauses and foreign_procs of a predicate or function are not contiguous. --allow-non-contiguity-for --no-allow-non-contiguity-for Allow the clauses (or, with `--warn-non-contiguous-foreign-procs', the clauses and/or foreign_proc pragmas) of the named predicates and/or functions to be intermingled with each other, but not with those or any other predicates or functions. This option may be specified more than once, with each option value specifying a distinct set of predicates and/or function names that may be intermingled. Each name must uniquely specify a predicate or a function. Options that control warnings -w --inhibit-warnings Disable all warning messages. --inhibit-style-warnings Disable all warning messages about programming style. --warn-all-format-string-errors If a format string has more one than mismatch with the supplied values, generate a warning for all mismatches, not just the first. (The default is to report only the first, because later mismatches may be avalanche errors caused by earlier mismatches.) PRIVATE OPTION --no-warn-smart-recompilation Disable warnings from the smart recompilation system. --no-warn-up-to-date Do not warn if targets specified on the command line with `mmc --make' are already up-to-date. Options about halting for warnings --halt-at-warn This option causes the compiler to treat all warnings as if they were errors when intending to generate target code. This means that if the compiler issues any warnings, it will not generate target code; instead, it will return a non-zero exit status. --halt-at-warn-make-interface --halt-at-warn-make-int This option causes the compiler to treat all warnings as if they were errors when intending to generate an interface file (a `.int', `.int0', `.int2' or `.int3' file). This means that if the compiler issues any warnings at that time, it will not generate the interface file; instead, it will return a non-zero exit status. --halt-at-warn-make-opt This option causes the compiler to treat all warnings as if they were errors when intending to generate an optimization file (a `.opt' or `.trans_opt' file.) This means that if the compiler issues any warnings at that time, it will not generate the optimization file; instead, it will return a non-zero exit status. --halt-at-syntax-errors This option causes the compiler to halt immediately, without doing any semantic checking, if it finds any syntax errors in the program. --no-halt-at-invalid-interface This option operates when the compiler is invoked with the `--make--interface' option to generate `.int' and `.int2' files for one or more modules. In its default setting, `--halt-at-invalid-interface', it causes the compiler to check the consistency of those parts of each of those modules that are intended to end up in the `.int' and `.int2' files. If these checks find any problems, the compiler will print an error message for each problem, but will then stop. Users can prevent this stop, and thus allow the generation of invalid interface files, by specifying `--no-halt-at-invalid-interface'. (In this case, the problems in the invalid information files will be reported when compiling the modules that import them.) PRIVATE OPTION --halt-at-auto-parallel-failure This option causes the compiler to halt if it cannot perform an auto-parallelization requested by a feedback file. Options that request information --inform-inferred Do not print inferred types or modes. --no-inform-inferred-types Do not print inferred types. --no-inform-inferred-modes Do not print inferred modes. PRIVATE OPTION --inform-incomplete-color-scheme Report if either the value of the `--color-scheme' option, or the value of the `MERCURY_COLOR_SCHEME' environment variable, is incomplete, in that it does not specify a color for some role. --inform-suboptimal-packing Generate messages if the arguments of a data constructor could be packed more tightly if they were reordered. --show-pred-moveability --no-show-pred-moveability --show-pred-movability --no-show-pred-movability Write out a short report on the effect of moving the code of the named predicate or function (or the named several predicates and/or functions, if the option is given several times) to a new module. This includes listing the other predicates and/or functions that would have to be moved with them, and whether the move would cause unwanted coupling between the new module and the old. Options that ask for informational files --show-definitions --show-defns Write out a list of the types, insts, modes, predicates, functions, typeclasses and instances defined in the module to `.defns'. --show-definition-line-counts --show-defn-line-counts Write out a list of the predicates and functions defined in the module, together with the names of the files containing them and their approximate line counts, to `.defn_line_counts'. The list will be ordered on the names and arities of the predicates and functions. The line counts are only approximate because the compiler does not need, and therefore does not keep around, information such as the context of a line that contains only a close parenthesis ending a clause. --show-definition-extents --show-defn-extents Write out a list of the predicates and functions defined in the module, together with the approximate line numbers of their first and last lines, to `.defn_extents'. The list will be ordered on the starting line numbers of the predicates and functions. The line numbers are only approximate because the compiler does not need, and therefore does not keep around, information such as the context of a line that contains only a close parenthesis ending a clause. --show-local-call-tree Construct the local call tree of the predicates and functions defined in the module. Each node of this tree is a local predicate or function, and each node has edges linking it to the nodes of the other local predicates and functions it directly refers to. Write out to `.local_call_tree' a list of these nodes. Put these nodes into the order in which they are encountered by a depth-first left-to-right traversal of the bodies (as reordered by mode analysis), of the first procedure of each predicate or function, starting the traversal at the exported predicates and/or functions of the module. List the callees of each node in the same order. Write a flattened form of this call tree, containing just the predicates and functions in the same traversal order, to `.local_call_tree_order'. Construct another call tree of the predicates and functions defined in the module in which each entry lists not just the local predicates/functions directly referred to, but all directly or indirectly referenced predicates/functions, whether or not they are defined in the current module. The one restriction is that we consider only references that occur in the body of the current module. Write out this tree to `.local_call_full'. --show-local-type-representations --show-local-type-repns Write out information about the representations of all types defined in the module being compiled to `.type_repns'. --show-all-type-representations --show-all-type-repns Write out information about the representations of all types visible in the module being compiled to `.type_repns'. PRIVATE OPTION --show-developer-type-representations --show-developer-type-repns When writing out information about the representations of types, include information that is of interest to Mercury developers only. --show-dependency-graph Write out the dependency graph to `.dependency_graph'. --show-imports-graph --imports-graph If `--generate-dependencies' is specified, then write out the imports graph to `.imports_graph' in a format that can be processed by the `graphviz' tools. The graph will contain an edge from the node of module A to the node of module B if module A imports module B. Controlling trace goals --trace-flag --no-trace-flag Enable the trace goals that depend on the trace flag. Preparing code for mdb debugging --trace {minimum, shallow, deep, rep, default} Generate code that includes the specified level of execution tracing. See the Debugging chapter of the Mercury User's Guide for details. --exec-trace-tail-rec Generate TAIL events for self-tail-recursive calls instead of EXIT events. This allows these recursive calls to reuse their parent call's stack frame, but it also means that the debugger won't have access to the contents of the reused stack frames. --trace-optimized --trace-optimised Do not disable optimizations that can change the trace. PRIVATE OPTION --trace-prof Enable tracing of deep profiling service predicates. --event-set-file-name Get the specification of user-defined events from . PRIVATE OPTION --trace-table-io Enable the tabling of I/O actions, to allow the debugger to execute retry commands across I/O actions. PRIVATE OPTION --trace-table-io-only-retry Set up I/O tabling to support only retries across I/O actions, not the printing of actions or declarative debugging. This reduces the size of the I/O action table. PRIVATE OPTION --trace-table-io-states When tabling I/O actions, table the `io.state' arguments together with the others. This should be required iff values of type `io.state' actually contain information. PRIVATE OPTION --trace-table-io-require Require the tabling of I/O actions, i.e. generate an error if an I/O primitive does not have the `tabled_for_io' annotation. PRIVATE OPTION --trace-table-io-all Table all I/O actions even in the absence of annotations. If a primitive has no annotation specifying the type of tabling required, deduce it from the values of the other annotations. PRIVATE OPTION --suppress-trace suppress-items, Suppress the named aspects of the execution tracing system. --no-delay-death When the trace level is `deep', the compiler normally preserves the values of variables as long as possible, even beyond the point of their last use, in order to make them accessible from as many debugger events as possible. However, it will not do so if the user specifies `--no-delay-death'. This may be necessary if without it, the stack frames of some procedures grow too big. --delay-death-max-vars Delay the deaths of variables only when the number of variables in the procedure is no more than N. The default value is 1000. --stack-trace-higher-order Enable stack traces through predicates and functions with higher-order arguments, even if stack tracing is not supported in general. PRIVATE OPTION --force-disable-tracing Force tracing to be set to trace level none. This overrides all other tracing/grade options. Its main use is to turn off tracing in the browser directory, even for `.debug' and `.decldebug' grades. Preparing code for ssdb debugging PRIVATE OPTION --ssdb-trace {none, shallow, deep} The trace level to use for source to source debugging of the given module. PRIVATE OPTION --force-disable-ssdebug Disable the ssdebug transformation even in `.ssdebug' grades. Preparing code for mdprof profiling --profile-optimized --profile-optimised Do not disable optimizations that can distort deep profiles. Optimization options Overall control of optimizations PRIVATE OPTION --default-opt-level -O Set the default optimization level to . -O --optimization-level --optimisation-level --opt-level Set optimization level to . Optimization level -1 means no optimization while optimization level 6 means full optimization. The option `--output-optimization-options' lists the optimizations enabled at each level. Note that some options are not enabled automatically at *any* optimization level. These include options that are too new and experimental for large scale use, and options that generate speedups in some use cases, but slowdowns in others, require situation-specific consideration of their use. Likewise, if you want the compiler to perform intermodule optimizations, where the compiler exploits information about the non-public parts of the modules it imports (which it gets from their `.opt' files) for optimization purposes then you must enable that separately, partially because they affect the compilation process in ways that require special treatment by `mmake'. This goes double for *transitive* intermodule optimizations, where the compiler exploits information about the non-public parts of not just the modules it imports, but also from the modules that *they)* import, directly or indirectly. (It gets this info from the `.trans_opt' files of the directly or indirectly imported modules.) --optimize-space --optimise-space --opt-space Turn on optimizations that reduce code size, and turn off optimizations that significantly increase code size. Source-to-source optimizations --optimize-dead-procs --optimise-dead-procs Delete all procedures that are never called. --unneeded-code Remove goals from computation paths where their outputs are not needed, provided the semantics options allow the deletion or movement of the goal. --unneeded-code-copy-limit Specify the maximum number of places to which a goal may be copied when removing it from computation paths on which its outputs are not needed. A value of zero forbids goal movement and allows only goal deletion; a value of one prevents any increase in the size of the code. --optimize-unused-args --optimise-unused-args Delete unused arguments from predicates and functions. This will cause the compiler to generate more efficient code for many polymorphic predicates. --intermod-unused-args Delete unused arguments from predicates and functions even when the analysis required crosses module boundaries. This option implies `--optimize-unused-args' and `--intermodule-optimization'. --no-optimize-format-calls Do not optimize calls to `string.format', `io.format', and `stream.string_writer.format' at compile time. The default is to interpret the format string in such calls at compile time, replacing those calls with the sequence of more primitive operations required to implement them. --optimize-constant-propagation --optimise-constant-propagation Given calls to some frequently used library functions and predicates, mainly those that do arithmetic, evaluate them at compile time, if all their input arguments are constants. --optimize-duplicate-calls --optimise-duplicate-calls Given multiple calls to a predicate or function with the same input arguments, optimize away all but one. PRIVATE OPTION --excess-assign Remove assignment unifications whose only effect is to give another name to the same value. PRIVATE OPTION --no-allow-inlining Disallow all forms of inlining. --inlining Ask the compiler to inline procedures using its usual heuristics. PRIVATE OPTION --no-inline-builtins Normally, the compiler implements builtin operations (such as arithmetic) using inline code. With `--no-inline-builtins', the compiler will implement them as calls to out-of-line procedures. This latter is done by default when debugging, since this allows the execution of builtins to be traced. PRIVATE OPTION --inline-par-builtins With `--inline-par-builtins', the compiler implements the parallel builtin operations using inline code. With `--no-inline-par-builtins', it implements them as calls. --inline-single-use Inline procedures which are called only from one call site. --inline-simple Inline all simple procedures. --inline-simple-threshold With `--inline-simple', inline a procedure if its size is less than the given threshold. --intermod-inline-simple-threshold Similar to `--inline-simple-threshold', except used to determine which predicates should be included in `.opt' files. Note that changing this between writing the `.opt' file and compiling to C may cause link errors, and too high a value may result in reduced performance. --inline-compound-threshold Inline a procedure if its size (measured roughly in terms of the number of connectives in its internal form) less the assumed call cost, multiplied by the number of times it is called, is below the given threshold. --inline-call-cost Assume that the cost of a call is the given parameter. Used only in conjunction with `--inline-compound-threshold'. --inline-vars-threshold Don't inline a call if it would result in a procedure containing more than variables. Procedures containing large numbers of variables can cause slow compilation. --optimize-higher-order --optimise-higher-order Create specialized variants of higher-order predicates and functions for call sites where the values of the higher-order arguments are known. --type-specialization --type-specialisation Enable specialization of polymorphic predicates where the polymorphic types are known. --user-guided-type-specialization --user-guided-type-specialisation Enable specialization of polymorphic predicates for which there are `:- pragma type_spec' declarations. --higher-order-size-limit Set the maximum goal size of specialized versions created by `--optimize-higher-order' and `--type-specialization'. Goal size is measured as the number of calls, unifications and branched goals. --higher-order-arg-limit Set the maximum size of higher-order arguments to be specialized by `--optimize-higher-order' and `--type-specialization'. --loop-invariants Hoist loop invariant computations out of loops. --introduce-accumulators Attempt to make procedures tail recursive by introducing accumulator variables into them. --optimize-constructor-last-call --optimise-constructor-last-call Enable the optimization of almost-last calls that are followed only by constructor application. PRIVATE OPTION --optimize-constructor-last-call-accumulator --optimise-constructor-last-call-accumulator Enable the optimization via accumulators of almost-last calls that are followed only by constructor application. PRIVATE OPTION --optimize-constructor-last-call-null --optimise-constructor-last-call-null When `--optimize-constructor-last-call' is enabled, put NULL in uninitialized fields to prevent the garbage collector from looking at and following a random bit pattern. --no-split-switch-arms When a switch on a variable has an inner switch on that same variable inside one of its arms, the default is to split up that arm of the outer switch along the same lines, effectively inlining the inner switch. `--no-split-switch-arms' prevents this split. PRIVATE OPTION --merge-code-after-switch Merge the goal after a switch into the switch, if we can. Two cases in which we can are when that goal just tests the value of a variable set in the switch, and when that goal is a switch on the same variable. PRIVATE OPTION --from-ground-term-threshold Wrap a from_ground_term scope around the expanded, superhomogeneous form of a ground term that involves at least. the given number of function symbols. --no-const-struct By default, the compiler will gather constant ground structures in a separate table, with each such structure being stored in this table just once, even if it occurs in many different procedures. `--no-const-struct' prevents this behavior. --common-struct Replace two or more occurrences of the same term in a conjunction with just one copy. --optimize-saved-vars --optimise-saved-vars Minimize the number of variables saved across calls. PRIVATE OPTION --optimize-saved-vars-const --optimise-saved-vars-const Minimize the number of variables saved across calls by introducing duplicate copies of variables bound to constants in each interval between flushes where they are needed. PRIVATE OPTION --optimize-saved-vars-cell --optimise-saved-vars-cell Minimize the number of variables saved across calls by trying to use saved variables pointing to cells to reach the variables stored in those cells. PRIVATE OPTION --no-osv-loop There is no help text available. PRIVATE OPTION --no-osv-full-path There is no help text available. PRIVATE OPTION --no-osv-on-stack There is no help text available. PRIVATE OPTION --no-osv-cand-head There is no help text available. PRIVATE OPTION --osv-cvstore-cost There is no help text available. PRIVATE OPTION --osv-cvload-cost There is no help text available. PRIVATE OPTION --osv-fvstore-cost There is no help text available. PRIVATE OPTION --osv-fvload-cost There is no help text available. PRIVATE OPTION --osv-op-ratio There is no help text available. PRIVATE OPTION --osv-node-ratio There is no help text available. PRIVATE OPTION --osv-allpath-node-ratio There is no help text available. PRIVATE OPTION --osv-all-cand There is no help text available. --constraint-propagation Perform the constraint propagation transformation, which attempts to ensure that goals which can fail are executed as early as possible. --local-constraint-propagation Perform the constraint propagation transformation, but only rearrange goals within each procedure. Specialized versions of procedures will not be created. --deforestation Perform deforestation, which is a program transformation whose aims are to avoid the construction of intermediate data structures, and to avoid repeated traversals over data structures within a conjunction. --deforestation-depth-limit Specify a depth limit to prevent infinite loops in the deforestation algorithm. A value of -1 specifies no depth limit. The default is 4. PRIVATE OPTION --deforestation-cost-factor fudge-factor There is no help text available. --deforestation-vars-threshold Specify a rough limit on the number of variables in a procedure created by deforestation. A value of -1 specifies no limit. The default is 200. --deforestation-size-threshold Specify a rough limit on the size of a goal to be optimized by deforestation. A value of -1 specifies no limit. The default is 15. PRIVATE OPTION --untuple Expand out procedure arguments when the argument type is either a tuple, or a type with exactly one functor. This increases the cost of parameter passing, but reduces the cost of access to the individual fields of the tuple or functor. Which effect is greater will depend greatly on the relative frequency with which execution takes different program paths, which means that this transformation can cause slowdowns as well as speedups. This means that detailed profiling data is crucial for the proper use of this option. PRIVATE OPTION --tuple Try to find opportunities for procedures to pass some arguments to each other as a tuple rather than separately. This reduces the cost of parameter passing, but increases the cost of access to each of the old arguments. Which effect is greater will depend greatly on the relative frequency with which execution takes different program paths, which means that this transformation can cause slowdowns as well as speedups. This means that detailed profiling data is crucial for the proper use of this option. PRIVATE OPTION --tuple-trace-counts-file This option tells the compiler that the profiling data needed for the untupling and tupling transformations is available in the named trace counts summary file. The summary should be made from a sample run of the program you are compiling, compiled without optimizations. PRIVATE OPTION --tuple-costs-ratio A value of 110 for this parameter means the tupling transformation will transform a procedure if it thinks that procedure would be 10% worse, on average, than whatever transformed version of the procedure it has in mind. The default is 100. PRIVATE OPTION --tuple-min-args min-num-args The minimum number of input arguments that the tupling transformation will consider passing together as a tuple. This is mostly to speed up the compilation process by not pursuing (presumably) unfruitful searches. --delay-constructs --delay-construct Reorder goals to move construction unifications after primitive goals that can fail. PRIVATE OPTION --follow-code Move the code following a branched goal (if-then-else, disjunction, or switch) until the next call into each branch of that goal. Having a call as the goal just after the branched goal gives the LLDS code generator a consistent set of places into which each branch should store live variables. PRIVATE OPTION --always-specialize-in-dep-par-conjs When the transformation for handling dependent parallel conjunctions adds waits and/or signals around a call, create a specialized version of the called procedure, even if this is not profitable. PRIVATE OPTION --no-allow-some-paths-only-waits There is no help text available. PRIVATE OPTION --region-analysis Enable the analysis for region-based memory management. --no-generate-trail-ops-inline Normally, the compiler generates inline code for trailing operations. With `--no-generate-trail-ops-inline', the compiler will implement them using calls to those operations in the standard library. Experimental source-to-source optimizations PRIVATE OPTION --structure-sharing Perform structure sharing analysis. PRIVATE OPTION --structure-sharing-widening Perform widening when the set of structure sharing pairs becomes larger than . When n=0, widening is not enabled. (default: 0). PRIVATE OPTION --structure-reuse --ctgc Perform structure reuse analysis (Compile Time Garbage Collection). PRIVATE OPTION --structure-reuse-constraint {same_cons_id, within_n_cells_difference} --ctgc-constraint {same_cons_id, within_n_cells_difference} Constraint on the way we allow structure reuse. `same_cons_id' specifies that reuse is only allowed between terms of the same type and constructor. `within_n_cells_difference' states that reuse is allowed as long as the arities between the reused term and new term does not exceed a certain threshold. The threshold needs to be set using `--structure-reuse-constraint-arg'. (The default is `within_n_cells_difference' with the threshold being 0.) PRIVATE OPTION --structure-reuse-constraint-arg --ctgc-constraint-arg Specify the maximum difference in arities between the terms whose memory cells can be reused on the one hand, and the terms that need memory cells on the other hand. (default: 0) PRIVATE OPTION --structure-reuse-max-conditions Soft limit on the number of reuse conditions to accumulate for a procedure. (default: 10) PRIVATE OPTION --structure-reuse-repeat There is no help text available. PRIVATE OPTION --structure-reuse-free-cells Immediately free cells which are known to be dead but which cannot be reused. Optimizations during code generation --smart-indexing Implement switches using the fastest applicable implementation method, which may be e.g. binary search or a hash table. With `--no-smart-indexing', the default is to implement switches as simple if-then-else chains. PRIVATE OPTION --smart-atomic-indexing Generate smart switches on atomic types when appropriate. PRIVATE OPTION --smart-string-indexing Generate smart switches on strings when appropriate. PRIVATE OPTION --smart-tag-indexing Generate smart switches on discriminated union types when appropriate. PRIVATE OPTION --smart-float-indexing Generate smart switches on floats when appropriate. --dense-switch-req-density The jump table generated for an atomic switch must have at least this percentage of full slots (default: 25). --lookup-switch-req-density The jump table generated for an atomic switch in which all the outputs are constant terms must have at least this percentage of full slots (default: 25). --dense-switch-size The jump table generated for an atomic switch must have at least this many entries (default: 4). --lookup-switch-size The lookup table generated for an atomic switch must have at least this many entries (default: 4). --string-trie-switch-size --string-trie-size The trie generated for a string switch must have at least this many entries (default: 16). --string-hash-switch-size --string-switch-size The hash table generated for a string switch must have at least this many entries (default: 8). --string-binary-switch-size The binary search table generated for a string switch must have at least this many entries (default: 4). --tag-switch-size The number of alternatives in a tag switch must be at least this number (default: 3). PRIVATE OPTION --switch-single-rec-base-first In a switch with two arms, one a base case and one with a single recursive call, put the base case first. PRIVATE OPTION --no-switch-multi-rec-base-first In a switch with two arms, one a base case and one with multiple recursive calls, do not put the base case first. --static-ground-terms Enable the optimization of constructing constant ground terms at compile time and storing them as static constants. Note that auxiliary data structures created by the compiler for purposes such as debugging will always be created as static constants. --use-atomic-cells Use the atomic variants of the Boehm gc allocator calls when the memory cell to be allocated cannot contain pointers. PRIVATE OPTION --optimize-trail-usage Try to restrict trailing operations to those parts of the program that actually use the trail. Optimizations specific to high level code --mlds-optimize --mlds-optimise Enable the MLDS->MLDS optimization passes. --mlds-peephole Perform peephole optimization of the MLDS. --optimize-tailcalls --optimise-tailcalls Turn self-tailcalls into loops. --optimize-initializations --optimise-initializations Whenever possible, convert the first assignment to each local variable in the target code into an initializer on its declaration. Some target language compilers can generate faster code that way. PRIVATE OPTION --no-eliminate-unused-mlds-assigns Eliminate assignments to dead variables in the MLDS. --eliminate-local-variables --eliminate-local-vars Eliminate local variables with known values, where possible, by replacing occurrences of such variables with their values. Optimizations specific to low level code --try-switch-size The number of alternatives in a try/retry chain switch must be at least this number (default: 3). --binary-switch-size The number of alternatives in a binary search switch must be at least this number (default: 4). --middle-rec Enable the middle recursion optimization. --simple-neg Generate simplified code for simple negations. PRIVATE OPTION --no-allow-hijacks When appropriate, the compiler normally generates code that temporarily hijacks an existing nondet stack frame that probably belongs to another procedure invocation. `--no-allow-hijacks' tells the compiler to create a new nondet stack frame instead. --llds-optimize --llds-optimise Enable the LLDs->LLDS optimization passes. --optimize-repeat --optimise-repeat Iterate most LLDS->LLDS optimizations at most times (default: 3). --optimize-peep --optimise-peep Enable local peephole optimizations. PRIVATE OPTION --optimize-peep-mkword --optimise-peep-mkword Enable peephole optimizations of words created by mkword. --optimize-labels --optimise-labels Delete dead labels, and the unreachable code following them. PRIVATE OPTION --standardize-labels --standardise-labels Standardize internal labels in the generated code. --optimize-jumps --optimise-jumps Enable the short-circuiting of jumps to jumps. --optimize-fulljumps --optimise-fulljumps Enable the elimination of jumps to ordinary code. --checked-nondet-tailcalls Convert nondet calls into tail calls whenever possible, even when this requires a runtime check. This option tries to minimize stack consumption, possibly at the expense of speed. --pessimize-tailcalls Disable the optimization of tailcalls. This option tries to minimize code size at the expense of speed. --optimize-delay-slot --optimise-delay-slot Disable branch delay slot optimizations, This option is meaningful only if the target architecture has delay slots. --optimize-frames --optimise-frames Optimize the operations that maintain stack frames. --optimize-reassign --optimise-reassign Optimize away assignments to memory locations that already hold the to-be-assigned value. --use-local-vars Use local variables in C code blocks wherever possible. PRIVATE OPTION --local-var-access-threshold There is no help text available. --optimize-dups --optimise-dups Enable elimination of duplicate code within procedures. --optimize-proc-dups --optimise-proc-dups Enable elimination of duplicate procedures. --common-data Enable optimization of common data structures. --no-common-layout-data Disable optimization of common subsequences in layout structures. --layout-compression-limit Attempt to compress the layout structures used by the debugger only as long as the arrays involved have at most elements (default: 4000). PRIVATE OPTION --optimize-region-ops Try and restrict region operations to those parts of the program that actually use regions. --emit-c-loops Use C loop contstructs to implement loops. With `--no-emit-c-loops', use only gotos. --procs-per-c-function --procs-per-C-function Put the code for up to Mercury procedures in a single C function. The default value of is one. Increasing can produce slightly more efficient code, but makes compilation slower. --no-local-thread-engine-base Do not copy the thread-local Mercury engine base address into a local variable, even when this would be appropriate. This option is effective only in low-level parallel grades that do not use the GNU C global register variables extension. --inline-alloc Inline calls to `GC_malloc()'. This can improve performance a fair bit, but may significantly increase code size. This option is meaningful only if the selected garbage collector is boehm, and if the C compiler is gcc. --use-macro-for-redo-fail Emit the fail or redo macro instead of a branch to the fail or redo code in the runtime system. This produces slightly bigger but slightly faster code. Intermodule optimization Non-transitive intermodule optimization --intermodule-optimization --intermodule-optimisation --intermod-opt Perform inlining, higher-order specialization, and other optimizations using knowledge of the otherwise non-public data of directly imported modules. The compiler gets this data from the `.opt' files of the directly imported modules. This option must be set consistently throughout the compilation process, starting with `mmc --generate-dependencies'. --use-opt-files Perform inter-module optimization using any `.opt' files which are already built, e.g. those for the standard library, but do not build any others. --no-read-opt-files-transitively Only read the inter-module optimization information for directly imported modules, not the transitive closure of the imports. Transitive intermodule optimization --transitive-intermodule-optimization --transitive-intermodule-optimisation --trans-intermod-opt Perform inlining, higher-order specialization, and other optimizations using knowledge of the otherwise non-public data of both directly and indirectly imported modules. The compiler gets this data from the `.trans_opt' files of the directly and indirectly imported modules. This option must be set consistently throughout the compilation process, starting with `mmc --generate-dependencies'. Note that `--transitive-intermodule-optimization' works only with `mmake'; it does not work with `mmc --make'. --use-trans-opt-files Perform inter-module optimization using any `.trans_opt' files which are already built, e.g. those for the standard library, but do not build any others. --generate-module-order Output the strongly connected components of the module dependency graph in top-down order to `.order'. Effective only if `--generate-dependencies' is also specified. PRIVATE OPTION --trans-opt-deps-spec --no-trans-opt-deps-spec Specify a file to remove edges from the trans-opt dependency graph. Intermodule optimization to a fixpoint PRIVATE OPTION --intermodule-analysis Perform analyses such as termination analysis and unused argument elimination across module boundaries. This option is not yet fully implemented. PRIVATE OPTION --analysis-repeat Specify the maximum number of times to repeat analyses of suboptimal modules with `--intermodule-analysis' (default: 0). (This option works only with `mmc --make'.) PRIVATE OPTION --analysis-file-cache Enable caching of parsed analysis files. This may improve compile times with `--intermodule-analysis'. PRIVATE OPTION --analysis-file-cache-dir There is no help text available. Program analyses The termination analyser based on linear inequality constraints --enable-termination --enable-term Enable termination analysis, which analyses each mode of each predicate or function to see whether it terminates. The `terminates', `does_not_terminate', and `check_termination' pragmas have an effect only when termination analysis is enabled. Note that both `--intermodule-optimization' and `--transitive-intermodule-optimization' greatly improve the accuracy of the analysis. --check-termination --check-term --chk-term Enable termination analysis, and emit warnings for some predicates or functions that cannot be proved to terminate. In many cases where the compiler is unable to prove termination, the problem is either a lack of information about the termination properties of other predicates, or the use of language constructs (such as higher order calls) which are beyond the capabilities of the analyser. In these cases, the compiler does not emit a warning of non-termination, as it is likely to be spurious. --verbose-check-termination --verb-check-term --verb-chk-term Enable termination analysis, and emit warnings for all predicates or functions that cannot be proved to terminate. --termination-single-argument-analysis --term-single-arg When performing termination analysis, try analyzing recursion on single arguments in strongly connected components of the call graph that have up to the given number of procedures. Setting this limit to zero disables single argument analysis. --termination-norm {simple, total, num-data-elems} --term-norm {simple, total, num-data-elems} The norm defines how termination analysis measures the size of a memory cell. The `simple' norm says that size is always one. The `total' norm says that it is the number of words in the cell. The `num-data-elems' norm says that it is the number of words in the cell that contain something other than pointers to cells of the same type. --termination-error-limit --term-err-limit Print at most this number of reasons for any single termination error (default: 3). --termination-path-limit --term-path-limit Perform termination analysis only on predicates with at most this many paths (default: 256). The termination analyser based on convex constraints PRIVATE OPTION --enable-termination2 --enable-term2 Analyse each predicate to discover if it terminates. This uses an alternative termination analysis based on convex constraints. PRIVATE OPTION --check-termination2 --check-term2 --chk-term2 Enable the alternative termination analysis, and emit warnings for some predicates or functions that cannot be proven to terminate. In many cases where the compiler is unable to prove termination, the problem is either a lack of information about the termination properties of other predicates, or because language constructs (such as higher order calls) were used which could not be analysed. In these cases, the compiler does not emit a warning of non-termination, as it is likely to be spurious. PRIVATE OPTION --verbose-check-termination2 --verb-check-term2 --verb-chk-term2 Report more verbose errors from the alternative termination analysis algorithm PRIVATE OPTION --termination2-norm {simple, total, num-data-elems} --term2-norm {simple, total, num-data-elems} Tell the alternative termination analyser which norm to use. See the description of the `--termination-norm' option for a description of the different norms available. PRIVATE OPTION --termination2-widening-limit --term2-widening-limit Set the threshold for the number of iterations after which the argument size analyser invokes widening. PRIVATE OPTION --term2-argument-size-analysis-only --term2-arg-size-analysis-only --arg-size-analysis-only Perform argument size analysis on each SCC, but do not attempt to infer termination, PRIVATE OPTION --no-termination2-propagate-failure-constraints --no-term2-propagate-failure-constraints --no-term2-propagate-failure-constrs Make the argument analyser infer information about the sizes of any inputs to a goal in contexts where that goal fails. PRIVATE OPTION --termination2-maximum-matrix-size --term2-max-matrix-size Limit the sizes of constraints systems in the analyser to the given number of constraints. Use approximations of some constraint operations, such as projection, if this threshold is exceeded. This will speed up the analysis at the cost of reduced precision. Other program analyses --analyse-exceptions Enable exception analysis. which tries to identify procedures that will not throw an exception. Some optimizations can make use of this information. PRIVATE OPTION --analyse-local-closures --analyse-closures Enable closure analysis, which tries identify the possible values that higher-order valued variables can take. Some optimizations can make use of this information. --analyse-trail-usage Enable trail usage analysis, which tries to identify procedures that will not modify the trail. The compiler can use this information to reduce the overhead of trailing. --analyse-mm-tabling Identify those goals that do not call procedures that are evaluated using minimal model tabling. The compiler can use this information to reduce the overhead of minimal model tabling. Options that ask for modified output -n --line-numbers Put source line numbers into the generated code. The generated code may be in C, Java or C# (the usual cases), or in Mercury (with `--convert-to-mercury'). --no-line-numbers-around-foreign-code Do not put source line numbers into the generated target language file around inclusions of foreign language code. --line-numbers-for-c-headers Put source line numbers in the generated C header files. This can make it easier to track down any problems with C code in `foreign_decl' pragmas, but may cause unnecessary recompilations of other modules if any of these line numbers changes (e.g. because the location of a predicate declaration changes in the Mercury source file). PRIVATE OPTION --type-repns-for-humans Format type_repn items in automatically generated interface files to be more easily read by humans. --auto-comments Output comments in the generated target language file. This is primarily useful for trying to understand how the generated target language code relates to the source code, e.g.@: in order to debug the compiler. (The code may be easier to understand if you also use the `--no-llds-optimize' option.) PRIVATE OPTION --frameopt-comments Get frameopt.m to generate comments describing its operation. (The code may be easier to understand if you also use the `--no-llds-optimize' option.) Options for controlling mmc --make -k --keep-going With `--make', keep going as far as possible even if an error is detected. --order-make-by-timestamp Tell `mmc --make' to compile more recently modified source files first. --show-make-times Report run times for commands executed by `mmc --make'. -j --jobs With `--make', attempt to perform up to N jobs concurrently. --track-flags --track-options With `--make', keep track of the options used when compiling each module. If an option for a module is added or removed, `mmc --make' will then know to recompile the module even if the timestamp on the file itself has not changed. Warning options, verbosity options, and build system options are not tracked. --pre-link-command --no-pre-link-command Specify a command to run before linking with `mmc --make'. This can be used to compile C source files which rely on header files generated by the Mercury compiler. The command will be passed the names of all of the source files in the program or library, with the source file containing the main module given first. Options for target language compilation General options for compiling target language code --target-debug --c-debug --java-debug Enable debugging of the generated target code. If the target language is C, this has the same effect as `--c-debug' (see below). If the target language is C#, this causes the compiler to pass `/debug' to the C# compiler. --no-warn-target-code Disable warnings from the compiler (which may be e.g. gcc) that processes the target code generated by mmc. Options for compiling C code --cc compiler-name Specify which C compiler to use. PRIVATE OPTION --c-compiler-type {gcc,clang,msvc_x86,msvc_x64,unknown} There is no help text available. --c-optimize --c-optimise Enable optimizations by the C compiler. --c-include-directory --no-c-include-directory --c-include-dir --no-c-include-dir Append to the list of directories to be searched for C header files. Note that if you want to override this list, instead of appending to it, then you can set the `MERCURY_MC_ALL_C_INCL_DIRS' environment variable to a sequence of `--c-include-directory' options. --cflags < --no-cflags Specify options to be passed to the C compiler. These options will not be quoted when passed to the shell. --cflag