rework the help text printing

Thomas Charles CONWAY conway at cs.mu.OZ.AU
Tue Jul 28 16:13:49 AEST 1998


Hi

For whoever to review.

-- 
Thomas Conway <conway at cs.mu.oz.au>
Nail here [] for new monitor.  )O+


The text for the help messages in the compiler was harder than necessary
to maintain, and certainly lead to larger code than necessary, so this
change addresses that.

compiler/options.m:
	replace the looonnnggg conjunctions of calls to io__write_string
	for writing the help text with single calls to write_tabbed_lines
	which takes a list of lines which it writes - each with a preceeding
	tab and a following newline.

	The diff is very boring, but I used diff to make sure that the output
	is exactly the same as before (modulo the version string at the start).

cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing bytecode/test
cvs diff: Diffing compiler
Index: compiler/options.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/options.m,v
retrieving revision 1.237
diff -u -r1.237 options.m
--- options.m	1998/07/27 01:04:48	1.237
+++ options.m	1998/07/28 05:59:05
@@ -1215,310 +1215,314 @@
 
 options_help_warning -->
 	io__write_string("\nWarning Options:\n"),
-	io__write_string("\t-w, --inhibit-warnings\n"),
-	io__write_string("\t\tDisable all warning messages.\n"),
-	io__write_string("\t--halt-at-warn\n"),
-	io__write_string("\t\tThis option causes the compiler to treat all \n"),
-	io__write_string("\t\twarnings as if they were errors.  This means that\n"),
-	io__write_string("\t\tif any warning is issued, the compiler will not\n"),
-	io__write_string("\t\tgenerate code --- instead, it will return a\n"),
-	io__write_string("\t\tnon-zero exit status.\n"),
-	io__write_string("\t--halt-at-syntax-errors\n"),
-	io__write_string("\t\tThis option causes the compiler to halt immediately\n"),
-	io__write_string("\t\tafter syntax checking and not do any semantic checking\n"),
-	io__write_string("\t\tif it finds any syntax errors in the program.\n"),
-	io__write_string("\t--no-warn-singleton-variables\n"),
-	io__write_string("\t\tDon't warn about variables which only occur once.\n"),
-	io__write_string("\t--no-warn-overlapping-scopes\n"),
-	io__write_string("\t\tDon't warn about variables which occur in overlapping scopes.\n"),
-	io__write_string("\t--no-warn-det-decls-too-lax\n"),
-	io__write_string("\t\tDon't warn about determinism declarations\n"),
-	io__write_string("\t\twhich could have been stricter.\n"),
-	io__write_string("\t--no-warn-nothing-exported\n"),
-	io__write_string("\t\tDon't warn about modules which export nothing.\n"),
-	io__write_string("\t--warn-unused-args\n"),
-	io__write_string("\t\tWarn about predicate arguments which are not used.\n"),
-	io__write_string("\t--warn-interface-imports\n"),
-	io__write_string("\t\tWarn about modules imported in the interface, but\n"),
-	io__write_string("\t\twhich are not used in the interface.\n"),
-	io__write_string("\t--no-warn-missing-opt-files\n"),
-	io__write_string("\t\tDisable warnings about `.opt' files which cannot be opened.\n"),
-	io__write_string("\t--no-warn-missing-trans-opt-deps\n"),
-	io__write_string("\t\tDisable warnings produced when the information required\n"),
-	io__write_string("\t\tto allow `.trans_opt' files to be read when creating other\n"),
-	io__write_string("\t\t`.trans_opt' files has been lost.  The information can be\n"),
-	io__write_string("\t\trecreated by running `mmake <mainmodule>.depend'\n"),
-
-	io__write_string("\t--warn-non-stratification\n"),
-	io__write_string("\t\tWarn about possible non-stratification in the module.\n"),
-	io__write_string("\t\tNon-stratification occurs when a predicate/function can call\n"),
-	io__write_string("\t\titself negatively through some path along its call graph.\n"),
-	io__write_string("\t--no-warn-simple-code\n"),
-	io__write_string("\t\tDisable warnings about constructs which are so\n"),
-	io__write_string("\t\tsimple that they are likely to be programming errors.\n"),
-	io__write_string("\t--warn-duplicate-calls\n"),
-	io__write_string("\t\tWarn about multiple calls to a predicate with the\n"),
-	io__write_string("\t\tsame input arguments.\n"),
-	io__write_string("\t--no-warn-missing-module-name\n"),
-	io__write_string("\t\tDisable warnings for modules that do no start with\n"),
-	io__write_string("\t\ta `:- module' declaration.\n"),
-	io__write_string("\t--no-warn-wrong-module-name\n"),
-	io__write_string("\t\tDisable warnings for modules whose `:- module'\n"),
-	io__write_string("\t\tdeclaration does not match the module's file name.\n").
+	write_tabbed_lines([
+		"-w, --inhibit-warnings",
+		"\tDisable all warning messages.",
+		"--halt-at-warn",
+		"\tThis option causes the compiler to treat all ",
+		"\twarnings as if they were errors.  This means that",
+		"\tif any warning is issued, the compiler will not",
+		"\tgenerate code --- instead, it will return a",
+		"\tnon-zero exit status.",
+		"--halt-at-syntax-errors",
+		"\tThis option causes the compiler to halt immediately",
+		"\tafter syntax checking and not do any semantic checking",
+		"\tif it finds any syntax errors in the program.",
+		"--no-warn-singleton-variables",
+		"\tDon't warn about variables which only occur once.",
+		"--no-warn-overlapping-scopes",
+		"\tDon't warn about variables which occur in overlapping scopes.",
+		"--no-warn-det-decls-too-lax",
+		"\tDon't warn about determinism declarations",
+		"\twhich could have been stricter.",
+		"--no-warn-nothing-exported",
+		"\tDon't warn about modules which export nothing.",
+		"--warn-unused-args",
+		"\tWarn about predicate arguments which are not used.",
+		"--warn-interface-imports",
+		"\tWarn about modules imported in the interface, but",
+		"\twhich are not used in the interface.",
+		"--no-warn-missing-opt-files",
+		"\tDisable warnings about `.opt' files which cannot be opened.",
+		"--no-warn-missing-trans-opt-deps",
+		"\tDisable warnings produced when the information required",
+		"\tto allow `.trans_opt' files to be read when creating other",
+		"\t`.trans_opt' files has been lost.  The information can be",
+		"\trecreated by running `mmake <mainmodule>.depend'",
+		"--warn-non-stratification",
+		"\tWarn about possible non-stratification in the module.",
+		"\tNon-stratification occurs when a predicate/function can call",
+		"\titself negatively through some path along its call graph.",
+		"--no-warn-simple-code",
+		"\tDisable warnings about constructs which are so",
+		"\tsimple that they are likely to be programming errors.",
+		"--warn-duplicate-calls",
+		"\tWarn about multiple calls to a predicate with the",
+		"\tsame input arguments.",
+		"--no-warn-missing-module-name",
+		"\tDisable warnings for modules that do no start with",
+		"\ta `:- module' declaration.",
+		"--no-warn-wrong-module-name",
+		"\tDisable warnings for modules whose `:- module'",
+		"\tdeclaration does not match the module's file name."
+	]).
 
 :- pred options_help_verbosity(io__state::di, io__state::uo) is det.
 
 options_help_verbosity -->
 	io__write_string("\nVerbosity Options:\n"),
-	io__write_string("\t-v, --verbose\n"),
-	io__write_string("\t\tOutput progress messages at each stage in the compilation.\n"),
-	io__write_string("\t-V, --very_verbose\n"),
-	io__write_string("\t\tOutput very verbose progress messages.\n"),
-	io__write_string("\t-E, --verbose-error-messages\n"),
-	io__write_string("\t\tExplain error messages.  Asks the compiler to give you a more\n"),
-	io__write_string("\t\tdetailed explanation of any errors it finds in your program.\n"),
-	io__write_string("\t-S, --statistics\n"),
-	io__write_string("\t\tOutput messages about the compiler's time/space usage.\n"),
-	io__write_string("\t\tAt the moment this option implies `--no-trad-passes', so you get\n"),
-	io__write_string("\t\tinformation at the boundaries between phases of the compiler.\n"),
-	io__write_string("\t-T, --debug-types\n"),
-	io__write_string("\t\tOutput detailed debugging traces of the type checking.\n"),
-	io__write_string("\t-N, --debug-modes\n"),
-	io__write_string("\t\tOutput detailed debugging traces of the mode checking.\n"),
-	io__write_string("\t--debug-det, --debug-determinism\n"),
-	io__write_string("\t\tOutput detailed debugging traces of determinism analysis.\n"),
-	io__write_string("\t--debug-opt\n"),
-	io__write_string("\t\tOutput detailed debugging traces of the optimization process.\n"),
-	io__write_string("\t--debug-vn <n>\n"),
-	io__write_string("\t\tOutput detailed debugging traces of the value numbering\n"),
-	io__write_string("\t\toptimization pass. The different bits in the number\n"),
-	io__write_string("\t\targument of this option control the printing of\n"),
-	io__write_string("\t\tdifferent types of tracing messages.\n"),
-	io__write_string("\t--debug-pd\n"),
-	io__write_string("\t\tOutput detailed debugging traces of the partial\n"),
-	io__write_string("\t\tdeduction and deforestation process.\n").
+	write_tabbed_lines([
+		"-v, --verbose",
+		"\tOutput progress messages at each stage in the compilation.",
+		"-V, --very_verbose",
+		"\tOutput very verbose progress messages.",
+		"-E, --verbose-error-messages",
+		"\tExplain error messages.  Asks the compiler to give you a more",
+		"\tdetailed explanation of any errors it finds in your program.",
+		"-S, --statistics",
+		"\tOutput messages about the compiler's time/space usage.",
+		"\tAt the moment this option implies `--no-trad-passes', so you get",
+		"\tinformation at the boundaries between phases of the compiler.",
+		"-T, --debug-types",
+		"\tOutput detailed debugging traces of the type checking.",
+		"-N, --debug-modes",
+		"\tOutput detailed debugging traces of the mode checking.",
+		"--debug-det, --debug-determinism",
+		"\tOutput detailed debugging traces of determinism analysis.",
+		"--debug-opt",
+		"\tOutput detailed debugging traces of the optimization process.",
+		"--debug-vn <n>",
+		"\tOutput detailed debugging traces of the value numbering",
+		"\toptimization pass. The different bits in the number",
+		"\targument of this option control the printing of",
+		"\tdifferent types of tracing messages.",
+		"--debug-pd",
+		"\tOutput detailed debugging traces of the partial",
+		"\tdeduction and deforestation process."
+	]).
 
 :- pred options_help_output(io__state::di, io__state::uo) is det.
 
 options_help_output -->
 	io__write_string("\nOutput Options:\n"),
-	io__write_string("\tThese options are mutually exclusive.\n"),
-	io__write_string("\tOnly the first one specified will apply.\n"),
-	io__write_string("\tIf none of these options are specified, the default action\n"),
-	io__write_string("\tis to link the named modules to produce an executable.\n\n"),
-	io__write_string("\t-M, --generate-dependencies\n"),
-	io__write_string("\t\tOutput `Make'-style dependencies for the module\n"),
-	io__write_string("\t\tand all of its dependencies to `<module>.dep'.\n"),
-	io__write_string("\t--generate-module-order\n"),
-	io__write_string("\t\tOutput the strongly connected components of the module\n"),
-	io__write_string("\t\tdependency graph in top-down order to `<module>.order'.\n"),
-	io__write_string("\t\tImplies --generate-dependencies.\n"),
-	io__write_string("\t-i, --make-int, --make-interface\n"),
-	io__write_string("\t\tWrite the module interface to `<module>.int',\n"),
-	io__write_string("\t\tand write the short interface to `<module>.int2'\n"),
-	io__write_string("\t\tThis option should only be used by mmake.\n"),
-	io__write_string("\t--make-priv-int, --make-private-interface\n"),
-	io__write_string("\t\tWrite the private interface to `<module>.int0'.\n"),
-	io__write_string("\t\tThis option should only be used by mmake.\n"),
-	io__write_string("\t--make-short-int, --make-short-interface\n"),
-	io__write_string("\t\tWrite the unqualified short interface to `<module>.int3'.\n"),
-	io__write_string("\t\tThis option should only be used by mmake.\n"),
-	io__write_string("\t--make-opt-int, --make-optimization-interface\n"),
-	io__write_string("\t\tWrite inter-module optimization information to\n"),
-	io__write_string("\t\t`<module>.opt'.\n"),
-	io__write_string("\t\tThis option should only be used by mmake.\n"),
-	io__write_string("\t--make-trans-opt\n"),
-	io__write_string("\t--make-transitive-optimization-interface\n"),
-	io__write_string("\t\tOutput transitive optimization information\n"),
-	io__write_string("\t\tinto the `<module>.trans_opt' file.\n"),
-	io__write_string("\t\tThis option should only be used by mmake.\n"),
-	io__write_string("\t-G, --convert-to-goedel\n"),
-	io__write_string("\t\tConvert to Goedel. Output to file `<module>.loc'.\n"),
-	io__write_string("\t\tNote that some Mercury language constructs cannot\n"),
-	io__write_string("\t\t(easily) be translated into Goedel.\n"),
-	io__write_string("\t-P, --convert-to-mercury\n"),
-	io__write_string("\t\tConvert to Mercury. Output to file `<module>.ugly'\n"),
-	io__write_string("\t\tThis option acts as a Mercury ugly-printer.\n"),
-	io__write_string("\t-t, --typecheck-only\n"),
-	io__write_string("\t\tJust check that the code is syntactically correct and\n"),
-	io__write_string("\t\ttype-correct. Don't check modes or determinism,\n"),
-	io__write_string("\t\tand don't generate any code.\n"),
-	io__write_string("\t-e, --errorcheck-only\n"),
-	io__write_string("\t\tCheck the module for errors, but do not generate any code.\n"),
-	io__write_string("\t-C, --compile-to-c\n"),
-	io__write_string("\t\tGenerate C code in `<module>.c', but not object code.\n"),
-	io__write_string("\t-c, --compile-only\n"),
-	io__write_string("\t\tGenerate C code in `<module>.c' and object code in `<module>.o'\n"),
-	io__write_string("\t\tbut do not attempt to link the named modules.\n"),
-	io__write_string("\t\t--output-grade-string\n"),
-	io__write_string("\t\tCompute the grade of the library to link with based on\n"),
-	io__write_string("\t\tthe command line options, and print it to the standard\n"),
-	io__write_string("\t\toutput.\n").
+	write_tabbed_lines([
+		"These options are mutually exclusive.",
+		"Only the first one specified will apply.",
+		"If none of these options are specified, the default action",
+		"is to link the named modules to produce an executable.\n",
+		"-M, --generate-dependencies",
+		"\tOutput `Make'-style dependencies for the module",
+		"\tand all of its dependencies to `<module>.dep'.",
+		"--generate-module-order",
+		"\tOutput the strongly connected components of the module",
+		"\tdependency graph in top-down order to `<module>.order'.",
+		"\tImplies --generate-dependencies.",
+		"-i, --make-int, --make-interface",
+		"\tWrite the module interface to `<module>.int',",
+		"\tand write the short interface to `<module>.int2'",
+		"\tThis option should only be used by mmake.",
+		"--make-priv-int, --make-private-interface",
+		"\tWrite the private interface to `<module>.int0'.",
+		"\tThis option should only be used by mmake.",
+		"--make-short-int, --make-short-interface",
+		"\tWrite the unqualified short interface to `<module>.int3'.",
+		"\tThis option should only be used by mmake.",
+		"--make-opt-int, --make-optimization-interface",
+		"\tWrite inter-module optimization information to",
+		"\t`<module>.opt'.",
+		"\tThis option should only be used by mmake.",
+		"--make-trans-opt",
+		"--make-transitive-optimization-interface",
+		"\tOutput transitive optimization information",
+		"\tinto the `<module>.trans_opt' file.",
+		"\tThis option should only be used by mmake.",
+		"-G, --convert-to-goedel",
+		"\tConvert to Goedel. Output to file `<module>.loc'.",
+		"\tNote that some Mercury language constructs cannot",
+		"\t(easily) be translated into Goedel.",
+		"-P, --convert-to-mercury",
+		"\tConvert to Mercury. Output to file `<module>.ugly'",
+		"\tThis option acts as a Mercury ugly-printer.",
+		"-t, --typecheck-only",
+		"\tJust check that the code is syntactically correct and",
+		"\ttype-correct. Don't check modes or determinism,",
+		"\tand don't generate any code.",
+		"-e, --errorcheck-only",
+		"\tCheck the module for errors, but do not generate any code.",
+		"-C, --compile-to-c",
+		"\tGenerate C code in `<module>.c', but not object code.",
+		"-c, --compile-only",
+		"\tGenerate C code in `<module>.c' and object code in `<module>.o'",
+		"\tbut do not attempt to link the named modules.",
+		"\t--output-grade-string",
+		"\tCompute the grade of the library to link with based on",
+		"\tthe command line options, and print it to the standard",
+		"\toutput."
+	]).
 
 :- pred options_help_aux_output(io__state::di, io__state::uo) is det.
 
 options_help_aux_output -->
 	io__write_string("\n Auxiliary Output Options:\n"),
-	io__write_string("\t--no-assume-gmake\n"),
-	io__write_string("\t\tWhen generating `.dep' files, generate Makefile\n"),
-	io__write_string("\t\tfragments that use only the features of standard make;\n"),
-	io__write_string("\t\tdo not assume the availability of GNU Make extensions.\n"),
-	io__write_string("\t--trace {minimum, interfaces, all, default}\n"),
-	io__write_string("\t\tGenerate code that includes the specified level\n"), 
-	io__write_string("\t\tof execution tracing.\n"),
-	io__write_string("\t\tSee the [XXX not yet written!] chapter of the\n"),
-	io__write_string("\t\tMercury User's Guide for details.\n"),
-	io__write_string("\t--generate-bytecode\n"),
-	io__write_string("\t\tOutput a bytecode form of the module for use\n"),
-	io__write_string("\t\tby an experimental debugger.\n"),
-	io__write_string("\t--generate-prolog\n"),
-	io__write_string("\t\tConvert the program to Prolog. Output to file `<module>.pl'\n"),
-	io__write_string("\t\tor `<module>.nl' (depending on the dialect).\n"),
-	io__write_string("\t--prolog-dialect {sicstus,nu}\n"),
-	io__write_string("\t\tTarget the named dialect if generating Prolog code.\n"),
-	io__write_string("\t-l, --line-numbers\n"),
-	io__write_string("\t\tOutput line numbers in the generated code.\n"),
-	io__write_string("\t\tOnly works with the `-G' and `-P' options.\n"),
-	io__write_string("\t--auto-comments\n"),
-	io__write_string("\t\tOutput comments in the `<module>.c' file.\n"),
-	io__write_string("\t\t(The code may be easier to understand if you also\n"),
-	io__write_string("\t\tuse the `--no-llds-optimize' option.)\n"),
-	io__write_string("\t--show-dependency-graph\n"),
-	io__write_string("\t\tWrite out the dependency graph to `<module>.dependency_graph'.\n"),
-	io__write_string("\t-d <n>, --dump-hlds <stage number or name>\n"),
-	io__write_string("\t\tDump the HLDS (intermediate representation) after\n"),
-	io__write_string("\t\tthe specified stage to `<module>.hlds_dump.<num>-<name>'.\n"),
-	io__write_string("\t\tStage numbers range from 1-99.\n"),
-	io__write_string("\t\tMultiple dump options accumulate.\n"),
-	io__write_string("\t-D, --verbose-dump-hlds <fields>\n"),
-	io__write_string("\t\tWith `--dump-hlds', include extra detail in the dump.\n"),
-	io__write_string("\t\tEach type of detail is included in the dump if its\n"),
-	io__write_string("\t\tcorresponding letter occurs in the option argument\n"),
-	io__write_string("\t\t(see the Mercury User's Guide for details).\n").
+	write_tabbed_lines([
+		"--no-assume-gmake",
+		"\tWhen generating `.dep' files, generate Makefile",
+		"\tfragments that use only the features of standard make;",
+		"\tdo not assume the availability of GNU Make extensions.",
+		"--trace {minimum, interfaces, all, default}",
+		"\tGenerate code that includes the specified level", 
+		"\tof execution tracing.",
+		"\tSee the [XXX not yet written!] chapter of the",
+		"\tMercury User's Guide for details.",
+		"--generate-bytecode",
+		"\tOutput a bytecode form of the module for use",
+		"\tby an experimental debugger.",
+		"--generate-prolog",
+		"\tConvert the program to Prolog. Output to file `<module>.pl'",
+		"\tor `<module>.nl' (depending on the dialect).",
+		"--prolog-dialect {sicstus,nu}",
+		"\tTarget the named dialect if generating Prolog code.",
+		"-l, --line-numbers",
+		"\tOutput line numbers in the generated code.",
+		"\tOnly works with the `-G' and `-P' options.",
+		"--auto-comments",
+		"\tOutput comments in the `<module>.c' file.",
+		"\t(The code may be easier to understand if you also",
+		"\tuse the `--no-llds-optimize' option.)",
+		"--show-dependency-graph",
+		"\tWrite out the dependency graph to `<module>.dependency_graph'.",
+		"-d <n>, --dump-hlds <stage number or name>",
+		"\tDump the HLDS (intermediate representation) after",
+		"\tthe specified stage to `<module>.hlds_dump.<num>-<name>'.",
+		"\tStage numbers range from 1-99.",
+		"\tMultiple dump options accumulate.",
+		"-D, --verbose-dump-hlds <fields>",
+		"\tWith `--dump-hlds', include extra detail in the dump.",
+		"\tEach type of detail is included in the dump if its",
+		"\tcorresponding letter occurs in the option argument",
+		"\t(see the Mercury User's Guide for details)."
+	]).
 
 :- pred options_help_semantics(io__state::di, io__state::uo) is det.
 
 options_help_semantics -->
 	io__write_string("\nLanguage semantics options:\n"),
 	io__write_string("(See the Mercury language reference manual for detailed explanations.)\n"),
-	io__write_string("\t--no-reorder-conj\n"),
-	io__write_string("\t\tExecute conjunctions left-to-right except where the modes imply\n"),
-	io__write_string("\t\tthat reordering is unavoidable.\n"),
-	io__write_string("\t--no-reorder-disj\n"),
-	io__write_string("\t\tExecute disjunctions strictly left-to-right.\n"),
-	io__write_string("\t--fully-strict\n"),
-	io__write_string("\t\tDon't optimize away loops or calls to error/1.\n"),
-	io__write_string("\t--infer-types\n"),
-	io__write_string("\t\tIf there is no type declaration for a predicate or function,\n"),
-	io__write_string("\t\ttry to infer the type, rather than just reporting an error.\n"),
-	io__write_string("\t--infer-modes\n"),
-	io__write_string("\t\tIf there is no mode declaration for a predicate,\n"),
-	io__write_string("\t\ttry to infer the modes, rather than just reporting an error.\n"),
-
-	io__write_string("\t--no-infer-det, --no-infer-determinism\n"),
-	io__write_string("\t\tIf there is no determinism declaration for a procedure,\n"),
-	io__write_string("\t\tdon't try to infer the determinism, just report an error.\n"),
-	io__write_string("\t--type-inference-iteration-limit <n>\n"),
-	io__write_string("\t\tPerform at most <n> passes of type inference (default: 60).\n"),
-	io__write_string("\t--mode-inference-iteration-limit <n>\n"),
-	io__write_string("\t\tPerform at most <n> passes of mode inference (default: 30).\n").
+	write_tabbed_lines([
+		"--no-reorder-conj",
+		"\tExecute conjunctions left-to-right except where the modes imply",
+		"\tthat reordering is unavoidable.",
+		"--no-reorder-disj",
+		"\tExecute disjunctions strictly left-to-right.",
+		"--fully-strict",
+		"\tDon't optimize away loops or calls to error/1.",
+		"--infer-types",
+		"\tIf there is no type declaration for a predicate or function,",
+		"\ttry to infer the type, rather than just reporting an error.",
+		"--infer-modes",
+		"\tIf there is no mode declaration for a predicate,",
+		"\ttry to infer the modes, rather than just reporting an error.",
+
+		"--no-infer-det, --no-infer-determinism",
+		"\tIf there is no determinism declaration for a procedure,",
+		"\tdon't try to infer the determinism, just report an error.",
+		"--type-inference-iteration-limit <n>",
+		"\tPerform at most <n> passes of type inference (default: 60).",
+		"--mode-inference-iteration-limit <n>",
+		"\tPerform at most <n> passes of mode inference (default: 30)."
+	]).
 
 
 :- pred options_help_termination(io__state::di, io__state::uo) is det.
 
 options_help_termination -->
 	io__write_string("\nTermination Analysis Options:\n"),
-	io__write_string("\t--enable-term, --enable-termination\n"),
-	io__write_string("\t\tAnalyse each predicate to discover if it terminates.\n"),
-	io__write_string("\t--chk-term, --check-term, --check-termination\n"),
-	io__write_string("\t\tEnable termination analysis, and emit warnings for some\n"),
-	io__write_string("\t\tpredicates or functions that cannot be proved to terminate.  In\n"),
-	io__write_string("\t\tmany cases where the compiler is unable to prove termination\n"),
-	io__write_string("\t\tthe problem is either a lack of information about the\n"),
-	io__write_string("\t\ttermination properties of other predicates, or because language\n"),
-	io__write_string("\t\tconstructs (such as higher order calls) were used which could\n"),
-	io__write_string("\t\tnot be analysed.  In these cases the compiler does not emit a\n"),
-	io__write_string("\t\twarning of non-termination, as it is likely to be spurious.\n"),
-	io__write_string("\t--verb-chk-term, --verb-check-term, --verbose-check-termination\n"),
-	io__write_string("\t\tEnable termination analysis, and emit warnings for all\n"),
-	io__write_string("\t\tpredicates or functions that cannot be proved to terminate.\n"),
-	io__write_string("\t--term-single-arg <n>, --termination-single-argument-analysis <n>\n"),
-	io__write_string("\t\tWhen performing termination analysis, try analyzing\n"),
-	io__write_string("\t\trecursion on single arguments in strongly connected\n"),
-	io__write_string("\t\tcomponents of the call graph that have up to <n> procedures.\n"),
-	io__write_string("\t\tSetting this limit to zero disables single argument analysis.\n"),
-	io__write_string("\t--termination-norm {simple, total, num-data-elems}\n"),
-	io__write_string("\t\tThe norm defines how termination analysis measures the size\n"),
-	io__write_string("\t\tof a memory cell. The `simple' norm says that size is always\n"),
-	io__write_string("\t\tone.  The `total' norm says that it is the number of words\n"),
-	io__write_string("\t\tin the cell.  The `num-data-elems' norm says that it is the\n"),
-	io__write_string("\t\tnumber of words in the cell that contain something other\n"),
-	io__write_string("\t\tthan pointers to cells of the same type.\n"),
-	io__write_string("\t--term-err-limit <n>, --termination-error-limit <n>\n"),
-	io__write_string("\t\tPrint at most <n> reasons for any single termination error\n"),
-	io__write_string("\t\t(default: 3).\n"),
-	io__write_string("\t--term-path-limit <n>, --termination-path-limit <n>\n"),
-	io__write_string("\t\tPerform termination analysis only on predicates\n"),
-	io__write_string("\t\twith at most <n> paths (default: 256).\n").
+	write_tabbed_lines([
+		"--enable-term, --enable-termination",
+		"\tAnalyse each predicate to discover if it terminates.",
+		"--chk-term, --check-term, --check-termination",
+		"\tEnable termination analysis, and emit warnings for some",
+		"\tpredicates or functions that cannot be proved to terminate.  In",
+		"\tmany cases where the compiler is unable to prove termination",
+		"\tthe problem is either a lack of information about the",
+		"\ttermination properties of other predicates, or because language",
+		"\tconstructs (such as higher order calls) were used which could",
+		"\tnot be analysed.  In these cases the compiler does not emit a",
+		"\twarning of non-termination, as it is likely to be spurious.",
+		"--verb-chk-term, --verb-check-term, --verbose-check-termination",
+		"\tEnable termination analysis, and emit warnings for all",
+		"\tpredicates or functions that cannot be proved to terminate.",
+		"--term-single-arg <n>, --termination-single-argument-analysis <n>",
+		"\tWhen performing termination analysis, try analyzing",
+		"\trecursion on single arguments in strongly connected",
+		"\tcomponents of the call graph that have up to <n> procedures.",
+		"\tSetting this limit to zero disables single argument analysis.",
+		"--termination-norm {simple, total, num-data-elems}",
+		"\tThe norm defines how termination analysis measures the size",
+		"\tof a memory cell. The `simple' norm says that size is always",
+		"\tone.  The `total' norm says that it is the number of words",
+		"\tin the cell.  The `num-data-elems' norm says that it is the",
+		"\tnumber of words in the cell that contain something other",
+		"\tthan pointers to cells of the same type.",
+		"--term-err-limit <n>, --termination-error-limit <n>",
+		"\tPrint at most <n> reasons for any single termination error",
+		"\t(default: 3).",
+		"--term-path-limit <n>, --termination-path-limit <n>",
+		"\tPerform termination analysis only on predicates",
+		"\twith at most <n> paths (default: 256)."
+	]).
 
 
 :- pred options_help_compilation_model(io__state::di, io__state::uo) is det.
 
 options_help_compilation_model -->
 	io__write_string("\nCompilation model options:\n"),
-	io__write_string("\tThe following compilation options affect the generated\n"),
-	io__write_string("\tcode in such a way that the entire program must be\n"),
-	io__write_string("\tcompiled with the same setting of these options,\n"),
-	io__write_string("\tand it must be linked to a version of the Mercury\n"),
-	io__write_string("\tlibrary which has been compiled with the same setting.\n"),
-	io__write_string("\t-s <grade>, --grade <grade>\n"),
-	io__write_string("\t\tSelect the compilation model. The <grade> should be one of\n"),
-	io__write_string("\t\t`none', `reg', `jump', `asm_jump', `fast', `asm_fast',\n"),
-	io__write_string("\t\tor one of those with `.gc', `.prof', `.proftime',\n"),
-	io__write_string("\t\t`.profcalls', `.tr', `.sa', `.debug', and/or `.pic_reg'\n"),
-	io__write_string("\t\tappended (in that order).\n"),
-	io__write_string("\t\tDepending on your particular installation, only a subset\n"),
-	io__write_string("\t\tof these possible grades will have been installed.\n"),
-	io__write_string("\t\tAttempting to use a grade which has not been installed\n"),
-	io__write_string("\t\twill result in an error at link time.\n"),
-	io__write_string("\t--gcc-global-registers\t"),
-	io__write_string("\t(grades: reg, fast, asm_fast)\n"),
-	io__write_string("\t--no-gcc-global-registers"),
-	io__write_string("\t(grades: none, jump, asm_jump)\n"),
-	io__write_string("\t\tSpecify whether or not to use GNU C's\n"),
-	io__write_string("\t\tglobal register variables extension.\n"),
-	io__write_string("\t--gcc-non-local-gotos\t"),
-	io__write_string("\t(grades: jump, fast, asm_jump, asm_fast)\n"),
-	io__write_string("\t--no-gcc-non-local-gotos"),
-	io__write_string("\t(grades: none, reg)\n"),
-	io__write_string("\t\tSpecify whether or not to use GNU C's\n"),
-	io__write_string("\t\t""labels as values"" extension.\n"),
-	io__write_string("\t--asm-labels\t\t"),
-	io__write_string("\t(grades: asm_jump, asm_fast)\n"),
-	io__write_string("\t--no-asm-labels\t\t"),
-	io__write_string("\t(grades: none, reg, jump, fast)\n"),
-	io__write_string("\t\tSpecify whether or not to use GNU C's\n"),
-	io__write_string("\t\tasm extensions for inline assembler labels.\n"),
-	io__write_string("\t--gc {none, conservative, accurate}\n"),
-	io__write_string("\t--garbage-collection {none, conservative, accurate}\n"),
-	io__write_string("\t\t\t\t\t(`.gc' grades use `--gc conservative',\n"),
-	io__write_string("\t\t\t\t\tother grades use `--gc none'.)\n"),
-	io__write_string("\t\tSpecify which method of garbage collection to use\n"),
-	io__write_string("\t\t(default: conservative).  `accurate' GC is not yet implemented.\n"),
-	io__write_string("\t--use-trail\t\t"),
-	io__write_string("\t(grade modifier: `.tr')\n"),
-	io__write_string("\t\tEnable use of a trail.\n"),
-	io__write_string("\t\tThis is necessary for interfacing with constraint solvers,\n"),
-	io__write_string("\t\tor for backtrackable destructive update.\n"),
-	io__write_string("\t-p, --profiling, --time-profiling\n"),
-	io__write_string("\t\t\t\t\t(grade modifier: `.prof')\n"),
-	io__write_string("\t\tEnable time and call profiling.  Insert profiling hooks in the\n"),
-	io__write_string("\t\tgenerated code, and also output some profiling\n"),
-	io__write_string("\t\tinformation (the static call graph) to the file\n"),
-	io__write_string("\t\t`<module>.prof'.\n"),
-	io__write_string("\t--memory-profiling\t"),
-	io__write_string("\t(grade modifier: `.memprof')\n"),
-	io__write_string("\t\tEnable memory and call profiling.\n"),
+	write_tabbed_lines([
+		"The following compilation options affect the generated",
+		"code in such a way that the entire program must be",
+		"compiled with the same setting of these options,",
+		"and it must be linked to a version of the Mercury",
+		"library which has been compiled with the same setting.",
+		"-s <grade>, --grade <grade>",
+		"\tSelect the compilation model. The <grade> should be one of",
+		"\t`none', `reg', `jump', `asm_jump', `fast', `asm_fast',",
+		"\tor one of those with `.gc', `.prof', `.proftime',",
+		"\t`.profcalls', `.tr', `.sa', `.debug', and/or `.pic_reg'",
+		"\tappended (in that order).",
+		"\tDepending on your particular installation, only a subset",
+		"\tof these possible grades will have been installed.",
+		"\tAttempting to use a grade which has not been installed",
+		"\twill result in an error at link time.",
+		"--gcc-global-registers\t\t(grades: reg, fast, asm_fast)",
+		"--no-gcc-global-registers\t(grades: none, jump, asm_jump)",
+		"\tSpecify whether or not to use GNU C's",
+		"\tglobal register variables extension.",
+		"--gcc-non-local-gotos\t\t(grades: jump, fast, asm_jump, asm_fast)",
+		"--no-gcc-non-local-gotos\t(grades: none, reg)",
+		"\tSpecify whether or not to use GNU C's",
+		"\t""labels as values"" extension.",
+		"--asm-labels\t\t\t(grades: asm_jump, asm_fast)",
+		"--no-asm-labels\t\t\t(grades: none, reg, jump, fast)",
+		"\tSpecify whether or not to use GNU C's",
+		"\tasm extensions for inline assembler labels.",
+		"--gc {none, conservative, accurate}",
+		"--garbage-collection {none, conservative, accurate}",
+		"\t\t\t\t(`.gc' grades use `--gc conservative',",
+		"\t\t\t\tother grades use `--gc none'.)",
+		"\tSpecify which method of garbage collection to use",
+		"\t(default: conservative).  `accurate' GC is not yet implemented.",
+		"--use-trail\t\t\t(grade modifier: `.tr')",
+		"\tEnable use of a trail.",
+		"\tThis is necessary for interfacing with constraint solvers,",
+		"\tor for backtrackable destructive update.",
+		"-p, --profiling, --time-profiling",
+		"\t\t\t\t(grade modifier: `.prof')",
+		"\tEnable time and call profiling.  Insert profiling hooks in the",
+		"\tgenerated code, and also output some profiling",
+		"\tinformation (the static call graph) to the file",
+		"\t`<module>.prof'.",
+		"--memory-profiling\t\t(grade modifier: `.memprof')",
+		"\tEnable memory and call profiling.",
 /*****************
 XXX The following options are not documented,
 because they are currently not useful.
@@ -1529,41 +1533,34 @@
 so you can't combine the data from versions of
 your program compiled with different options.
 
-	io__write_string("\t--profile-calls\t\t"),
-	io__write_string("\t(grade modifier: `.profcalls')\n"),
-	io__write_string("\t\tSimilar to `--profiling', except that only gathers\n"),
-	io__write_string("\t\tcall counts, not timing information.\n"),
-	io__write_string("\t\tUseful on systems where time profiling is not supported,\n"),
-	io__write_string("\t\tbut not as useful as `--memory-profiling'.\n"),
-	io__write_string("\t--profile-time\t\t"),
-	io__write_string("\t(grade modifier: `.proftime')\n"),
-	io__write_string("\t\tSimilar to `--profiling', except that it only gathers\n"),
-	io__write_string("\t\ttiming information, not call counts.\n"),
-	io__write_string("\t--profile-memory\t\t"),
-	io__write_string("\t(grade modifier: `.profmem')\n"),
-	io__write_string("\t\tSimilar to `--memory-profiling', except that it only gathers\n"),
-	io__write_string("\t\tmemory usage information, not call counts.\n"),
+		"--profile-calls\t\t(grade modifier: `.profcalls')",
+		"\tSimilar to `--profiling', except that only gathers",
+		"\tcall counts, not timing information.",
+		"\tUseful on systems where time profiling is not supported,",
+		"\tbut not as useful as `--memory-profiling'.",
+		"--profile-time\t\t(grade modifier: `.proftime')",
+		"\tSimilar to `--profiling', except that it only gathers",
+		"\ttiming information, not call counts.",
+		"--profile-memory\t\t(grade modifier: `.profmem')",
+		"\tSimilar to `--memory-profiling', except that it only gathers",
+		"\tmemory usage information, not call counts.",
 ********************/
-	io__write_string("\t--debug\t\t\t"),
-	io__write_string("\t(grade modifier: `.debug')\n"),
-	io__write_string("\t\tEnable Mercury-level debugging.\n"),
-	io__write_string("\t\tSee the [XXX not yet written!] chapter of the\n"),
-	io__write_string("\t\tMercury User's Guide for details.\n"),
-	io__write_string("\t--pic-reg\t\t"),
-	io__write_string("\t(grade modifier: `.pic_reg')\n"),
-	io__write_string("\t[For Unix with intel x86 architecture only]\n"),
-	io__write_string("\t\tSelect a register usage convention that is compatible,\n"),
-	io__write_string("\t\twith position-independent code (gcc's `-fpic' option).\n"),
-	io__write_string("\t\tThis is necessary when using shared libraries on Intel x86\n"),
-	io__write_string("\t\tsystems running Unix.  On other systems it has no effect.\n"),
-	io__write_string("\t--tags {none, low, high}"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tSpecify whether to use the low bits or the high bits of \n"),
-	io__write_string("\t\teach word as tag bits (default: low).\n"),
-	% io__write_string("\t\t`--tags none' implies `--num-tag-bits 0'.\n"),
-	io__write_string("\t--num-tag-bits <n>\t"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tUse <n> tag bits.\n"),
+		"--debug\t\t\t\t(grade modifier: `.debug')",
+		"\tEnable Mercury-level debugging.",
+		"\tSee the [XXX not yet written!] chapter of the",
+		"\tMercury User's Guide for details.",
+		"--pic-reg\t\t\t(grade modifier: `.pic_reg')",
+		"[For Unix with intel x86 architecture only]",
+		"\tSelect a register usage convention that is compatible,",
+		"\twith position-independent code (gcc's `-fpic' option).",
+		"\tThis is necessary when using shared libraries on Intel x86",
+		"\tsystems running Unix.  On other systems it has no effect.",
+		"--tags {none, low, high}\t(This option is not for general use.)",
+		"\tSpecify whether to use the low bits or the high bits of ",
+		"\teach word as tag bits (default: low).",
+	% 	"\t\t`--tags none' implies `--num-tag-bits 0'.",
+		"--num-tag-bits <n>\t\t(This option is not for general use.)",
+		"\tUse <n> tag bits.",
 
 		% The --conf-low-tag-bits option is reserved for use
 		% by the `mmc' script; it is deliberately not documented.
@@ -1574,406 +1571,430 @@
 		% The --bytes-per-word option is intended for use
 		% by the `mmc' script; it is deliberately not documented.
 
-	io__write_string("\t--branch-delay-slot\t"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tAssume that branch instructions have a delay slot.\n"),
-	io__write_string("\t--num-real-r-regs <n>\t"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tAssume registers r1 up to r<n> are real general purpose\n"),
-	io__write_string("\t\tregisters.\n"),
-	io__write_string("\t--num-real-f-regs <n>\t"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tAssume registers f1 up to f<n> are real floating point\n"),
-	io__write_string("\t\tregisters.\n"),
-	io__write_string("\t--num-real-r-temps <n>\t"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tAssume that <n> non-float temporaries will fit into\n"),
-	io__write_string("\t\treal machine registers.\n"),
-	io__write_string("\t--num-real-f-temps <n>\t"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tAssume that <n> float temporaries will fit into\n"),
-	io__write_string("\t\treal machine registers.\n"),
-	io__write_string("\t--args {simple, compact}\n"),
-	io__write_string("\t--arg-convention {simple, compact}\n"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tUse the specified argument passing convention\n"),
-	io__write_string("\t\tin the generated low-level C code. With the `simple'\n"),
-	io__write_string("\t\tconvention, the <n>th argument is passed in or out\n"),
-	io__write_string("\t\tusing register r<n>. With the `compact' convention,\n"),
-	io__write_string("\t\tthe <n>th input argument is passed using register r<n>,\n"),
-	io__write_string("\t\tand the <n>th output argument is returned using\n"),
-	io__write_string("\t\tregister r<n>. The compact convention generally leads to\n"),
-	io__write_string("\t\tmore efficient code. Use of the simple convention requires the\n"),
-	io__write_string("\t\tC code to be compiled with -UCOMPACT_ARGS.\n"),
-
-	io__write_string("\t--no-type-layout\n"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tDon't output base_type_layout structures or references\n"),
-	io__write_string("\t\tto them. (The C code also needs to be compiled with\n"),
-	io__write_string("\t\t`-DNO_TYPE_LAYOUT').\n"),
+		"--branch-delay-slot\t\t(This option is not for general use.)",
+		"\tAssume that branch instructions have a delay slot.",
+		"--num-real-r-regs <n>\t\t(This option is not for general use.)",
+		"\tAssume registers r1 up to r<n> are real general purpose",
+		"\tregisters.",
+		"--num-real-f-regs <n>\t\t(This option is not for general use.)",
+		"\tAssume registers f1 up to f<n> are real floating point",
+		"\tregisters.",
+		"--num-real-r-temps <n>\t\t(This option is not for general use.)",
+		"\tAssume that <n> non-float temporaries will fit into",
+		"\treal machine registers.",
+		"--num-real-f-temps <n>\t\t(This option is not for general use.)",
+		"\tAssume that <n> float temporaries will fit into",
+		"\treal machine registers.",
+		"--args {simple, compact}",
+		"--arg-convention {simple, compact}",
+		"(This option is not for general use.)",
+		"\tUse the specified argument passing convention",
+		"\tin the generated low-level C code. With the `simple'",
+		"\tconvention, the <n>th argument is passed in or out",
+		"\tusing register r<n>. With the `compact' convention,",
+		"\tthe <n>th input argument is passed using register r<n>,",
+		"\tand the <n>th output argument is returned using",
+		"\tregister r<n>. The compact convention generally leads to",
+		"\tmore efficient code. Use of the simple convention requires the",
+		"\tC code to be compiled with -UCOMPACT_ARGS.",
+
+		"--no-type-layout",
+		"(This option is not for general use.)",
+		"\tDon't output base_type_layout structures or references",
+		"\tto them. (The C code also needs to be compiled with",
+		"\t`-DNO_TYPE_LAYOUT').",
 	
 		% This is a developer only option.
-%	io__write_string("\t--basic-stack-layout\n"),
-%	io__write_string("\t(This option is not for general use.)\n"),
-%	io__write_string("\t\tGenerate the simple stack_layout structures required\n"),
-%	io__write_string("\t\tfor stack traces.\n"),
+%		"--basic-stack-layout",
+%		"(This option is not for general use.)",
+%		"\tGenerate the simple stack_layout structures required",
+%		"\tfor stack traces.",
 
 		% This is a developer only option.
-%	io__write_string("\t--agc-stack-layout\n"),
-%	io__write_string("\t(This option is not for general use.)\n"),
-%	io__write_string("\t\tGenerate the stack_layout structures required for\n"),
-%	io__write_string("\t\taccurate garbage collection.\n"),
+%		"--agc-stack-layout",
+%		"(This option is not for general use.)",
+%		"\tGenerate the stack_layout structures required for",
+%		"\taccurate garbage collection.",
 %
 		% This is a developer only option.
-%	io__write_string("\t--procid-stack-layout\n"),
-%	io__write_string("\t(This option is not for general use.)\n"),
-%	io__write_string("\t\tGenerate the stack_layout structures required for\n"),
-%	io__write_string("\t\tlooking up procedure identification information.\n"),
+%		"--procid-stack-layout",
+%		"(This option is not for general use.)",
+%		"\tGenerate the stack_layout structures required for",
+%		"\tlooking up procedure identification information.",
 
 		% This is a developer only option.
-%	io__write_string("\t--trace-stack-layout\n"),
-%	io__write_string("\t(This option is not for general use.)\n"),
-%	io__write_string("\t\tGenerate the stack_layout structures required for\n"),
-%	io__write_string("\t\texecution tracing.\n"),
+%		"--trace-stack-layout",
+%		"(This option is not for general use.)",
+%		"\tGenerate the stack_layout structures required for",
+%		"\texecution tracing.",
 
 		% This is a developer only option.
-%	io__write_string("\t--typeinfo-liveness\n"),
-%	io__write_string("\t(This option is not for general use.)\n"),
-%	io__write_string("\t\tUse an alternate technique for calculating liveness.\n"),
-%	io__write_string("\t\tKeeps typeinfo variables around for as long as any data\n"),
-%	io__write_string("\t\tthat has a type that contains that type variable is live\n"),
+%		"--typeinfo-liveness",
+%		"(This option is not for general use.)",
+%		"\tUse an alternate technique for calculating liveness.",
+%		"\tKeeps typeinfo variables around for as long as any data",
+%		"\tthat has a type that contains that type variable is live",
 %
-	io__write_string("\t--unboxed-float\n"),
-	io__write_string("\t(This option is not for general use.)\n"),
-	io__write_string("\t\tDon't box floating point numbers.\n"),
-	io__write_string("\t\tThis assumes that a Mercury float will fit in a word.\n"),
-	io__write_string("\t\tThe C code needs to be compiled with `-UBOXED_FLOAT'.\n"),
-	io__write_string("\t\tIt may also need to be compiled with\n"),
-	io__write_string("\t\t`-DUSE_SINGLE_PREC_FLOAT', if double precision\n"),
-	io__write_string("\t\tfloats don't fit into a word.\n").
+		"--unboxed-float",
+		"(This option is not for general use.)",
+		"\tDon't box floating point numbers.",
+		"\tThis assumes that a Mercury float will fit in a word.",
+		"\tThe C code needs to be compiled with `-UBOXED_FLOAT'.",
+		"\tIt may also need to be compiled with",
+		"\t`-DUSE_SINGLE_PREC_FLOAT', if double precision",
+		"\tfloats don't fit into a word."
+	]).
 
 :- pred options_help_code_generation(io__state::di, io__state::uo) is det.
 
 options_help_code_generation -->
 	io__write_string("\nCode generation options:\n"),
-	io__write_string("\t--low-level-debug\n"),
-	io__write_string("\t\tEnables various low-level debugging stuff, that was in\n"),
-	io__write_string("\t\tthe distant past used to debug the low-level code generation.\n"),
-	io__write_string("\t\tYou don't want to use this option unless you are hacking\n"),
-	io__write_string("\t\tthe Mercury compiler itself (and probably not even then).\n"),
-	io__write_string("\t\tCauses the generated code to become VERY big and VERY\n"),
-	io__write_string("\t\tinefficient.  Slows down compilation a LOT.\n"),
-
-	io__write_string("\t--no-trad-passes\n"),
-	io__write_string("\t\tThe default `--trad-passes' completely processes each predicate\n"),
-	io__write_string("\t\tbefore going on to the next predicate.\n"),
-	io__write_string("\t\tThis option tells the compiler\n"),
-	io__write_string("\t\tto complete each phase of code generation on all predicates\n"),
-	io__write_string("\t\tbefore going on the next phase on all predicates.\n"),
-	% io__write_string("\t--no-polymorphism\n"),
-	% io__write_string("\t\tDon't handle polymorphic types.\n"),
-	% io__write_string("\t\t(Generates slightly more efficient code, but stops\n"),
-	% io__write_string("\t\tpolymorphism from working except in special cases.)\n"),
-	io__write_string("\t--no-reclaim-heap-on-nondet-failure\n"),
-	io__write_string("\t\tDon't reclaim heap on backtracking in nondet code.\n"),
-	io__write_string("\t--no-reclaim-heap-on-semidet-failure\n"),
-	io__write_string("\t\tDon't reclaim heap on backtracking in semidet code.\n"),
-	io__write_string("\t--no-reclaim-heap-on-failure\n"),
-	io__write_string("\t\tCombines the effect of the two options above.\n"),
-	io__write_string("\t--cc <compiler-name>\n"),
-	io__write_string("\t\tSpecify which C compiler to use.\n"),
-	io__write_string("\t--c-include-directory <dir>\n"),
-	io__write_string("\t\tSpecify the directory containing the Mercury C header files.\n"),
-	io__write_string("\t--cflags <options>\n"),
-	io__write_string("\t\tSpecify options to be passed to the C compiler.\n"),
+	write_tabbed_lines([
+		"--low-level-debug",
+		"\tEnables various low-level debugging stuff, that was in",
+		"\tthe distant past used to debug the low-level code generation.",
+		"\tYou don't want to use this option unless you are hacking",
+		"\tthe Mercury compiler itself (and probably not even then).",
+		"\tCauses the generated code to become VERY big and VERY",
+		"\tinefficient.  Slows down compilation a LOT.",
+
+		"--no-trad-passes",
+		"\tThe default `--trad-passes' completely processes each predicate",
+		"\tbefore going on to the next predicate.",
+		"\tThis option tells the compiler",
+		"\tto complete each phase of code generation on all predicates",
+		"\tbefore going on the next phase on all predicates.",
+	% 	"\t--no-polymorphism",
+	% 	"\t\tDon't handle polymorphic types.",
+	% 	"\t\t(Generates slightly more efficient code, but stops",
+	% 	"\t\tpolymorphism from working except in special cases.)",
+		"--no-reclaim-heap-on-nondet-failure",
+		"\tDon't reclaim heap on backtracking in nondet code.",
+		"--no-reclaim-heap-on-semidet-failure",
+		"\tDon't reclaim heap on backtracking in semidet code.",
+		"--no-reclaim-heap-on-failure",
+		"\tCombines the effect of the two options above.",
+		"--cc <compiler-name>",
+		"\tSpecify which C compiler to use.",
+		"--c-include-directory <dir>",
+		"\tSpecify the directory containing the Mercury C header files.",
+		"--cflags <options>",
+		"\tSpecify options to be passed to the C compiler.",
 		% The --cflags-for-regs and --cflags-for-gotos options
 		% are reserved for use by the `mmc' script;
 		% they are deliberately not documented.
 
-	io__write_string("\t--c-debug\n"),
-	io__write_string("\t\tEnable debugging of the generated C code.\n"),
-	io__write_string("\t\t(This has the same effect as `--cflags -g'.)\n"),
-
-	io__write_string("\t--fact-table-max-array-size <n>\n"),
-	io__write_string("\t\tSpecify the maximum number of elements in a single\n"),
-	io__write_string("\t\t`pragma fact_table' data array (default: 1024).\n"),
-	io__write_string("\t--fact-table-hash-percent-full <percentage>\n"),
-	io__write_string("\t\tSpecify how full the `pragma fact_table' hash tables should be\n"),
-	io__write_string("\t\tallowed to get.  Given as an integer percentage\n"),
-	io__write_string("\t\t(valid range: 1 to 100, default: 90).\n").
+		"--c-debug",
+		"\tEnable debugging of the generated C code.",
+		"\t(This has the same effect as `--cflags -g'.)",
+
+		"--fact-table-max-array-size <n>",
+		"\tSpecify the maximum number of elements in a single",
+		"\t`pragma fact_table' data array (default: 1024).",
+		"--fact-table-hash-percent-full <percentage>",
+		"\tSpecify how full the `pragma fact_table' hash tables should be",
+		"\tallowed to get.  Given as an integer percentage",
+		"\t(valid range: 1 to 100, default: 90)."
+	]).
 
 :- pred options_help_optimization(io__state::di, io__state::uo) is det.
 
 options_help_optimization -->
 	io__write_string("\nOptimization Options:\n"),
-	io__write_string("\t-O <n>, --opt-level <n>, --optimization-level <n>\n"),
-	io__write_string("\t\tSet optimization level to <n>.\n"),
-	io__write_string("\t\tOptimization level -1 means no optimization\n"),
-	io__write_string("\t\twhile optimization level 6 means full optimization.\n"),
-	% io__write_string("\t\tFor a full description of each optimization level,\n"),
-	% io__write_string("\t\tsee the Mercury User's Guide.\n"),
-	io__write_string("\t--opt-space, --optimize-space\n"),
-	io__write_string("\t\tTurn on optimizations that reduce code size\n"),
-	io__write_string("\t\tand turn off optimizations that significantly\n"),
-	io__write_string("\t\tincrease code size.\n"),
-	io__write_string("\t--intermodule-optimization\n"),
-	io__write_string("\t\tPerform inlining and higher-order specialization of\n"),
-	io__write_string("\t\tthe code for predicates imported from other modules.\n"),
-	io__write_string("\t\tThis option must be set throughout the compilation process.\n"),
-	io__write_string("\t--trans-intermod-opt\n"),
-	io__write_string("\t--transitive-intermodule-optimization\n"),
-	io__write_string("\t\tImport the transitive intermodule optimization data.\n"),
-	io__write_string("\t\tThis data is imported from `<module>.trans_opt' files.\n"),
-	io__write_string("\t--use-opt-files\n"),
-	io__write_string("\t\tPerform inter-module optimization using any\n"),
-	io__write_string("\t\t`.opt' files which are already built,\n"),
-	io__write_string("\t\te.g. those for the standard library, but do\n"),
-	io__write_string("\t\tnot build any others.\n"),
-	io__write_string("\t--use-trans-opt-files\n"),
-	io__write_string("\t\tPerform inter-module optimization using any\n"),
-	io__write_string("\t\t`.trans_opt' files which are already built,\n"),
-	io__write_string("\t\te.g. those for the standard library, but do\n"),
-	io__write_string("\t\tnot build any others.\n"),
-	io__write_string("\t--split-c-files\n"),
-	io__write_string("\t\tGenerate each C function in its own C file,\n"),
-	io__write_string("\t\tso that the linker will optimize away unused code.\n"),
-	io__write_string("\t\tThis option significantly increases compilation time,\n"),
-	io__write_string("\t\tlink time, and intermediate disk space requirements,\n"),
-	io__write_string("\t\tbut in return reduces the size of the final\n"),
-	io__write_string("\t\texecutable, typically by about 10-20%.\n"),
-	io__write_string("\t\tThis option is only useful with `--procs-per-c-function 1'.\n").
+	write_tabbed_lines([
+		"-O <n>, --opt-level <n>, --optimization-level <n>",
+		"\tSet optimization level to <n>.",
+		"\tOptimization level -1 means no optimization",
+		"\twhile optimization level 6 means full optimization.",
+	% 	"\t\tFor a full description of each optimization level,",
+	% 	"\t\tsee the Mercury User's Guide.",
+		"--opt-space, --optimize-space",
+		"\tTurn on optimizations that reduce code size",
+		"\tand turn off optimizations that significantly",
+		"\tincrease code size.",
+		"--intermodule-optimization",
+		"\tPerform inlining and higher-order specialization of",
+		"\tthe code for predicates imported from other modules.",
+		"\tThis option must be set throughout the compilation process.",
+		"--trans-intermod-opt",
+		"--transitive-intermodule-optimization",
+		"\tImport the transitive intermodule optimization data.",
+		"\tThis data is imported from `<module>.trans_opt' files.",
+		"--use-opt-files",
+		"\tPerform inter-module optimization using any",
+		"\t`.opt' files which are already built,",
+		"\te.g. those for the standard library, but do",
+		"\tnot build any others.",
+		"--use-trans-opt-files",
+		"\tPerform inter-module optimization using any",
+		"\t`.trans_opt' files which are already built,",
+		"\te.g. those for the standard library, but do",
+		"\tnot build any others.",
+		"--split-c-files",
+		"\tGenerate each C function in its own C file,",
+		"\tso that the linker will optimize away unused code.",
+		"\tThis option significantly increases compilation time,",
+		"\tlink time, and intermediate disk space requirements,",
+		"\tbut in return reduces the size of the final",
+		"\texecutable, typically by about 10-20%.",
+		"\tThis option is only useful with `--procs-per-c-function 1'."
+	]).
 
 :- pred options_help_hlds_hlds_optimization(io__state::di, io__state::uo)
 	is det.
 
 options_help_hlds_hlds_optimization -->
 	io__write_string("\n    High-level (HLDS -> HLDS) optimizations:\n"),
-	io__write_string("\t--no-inlining\n"),
-	io__write_string("\t\tDisable all forms of inlining.\n"),
-	io__write_string("\t--no-inline-simple\n"),
-	io__write_string("\t\tDisable the inlining of simple procedures.\n"),
-	io__write_string("\t--no-inline-single-use\n"),
-	io__write_string("\t\tDisable the inlining of procedures called only once.\n"),
-	io__write_string("\t--inline-compound-threshold <threshold>\n"),
-	io__write_string("\t\tInline a procedure if its size (measured roughly\n"),
-	io__write_string("\t\tin terms of the number of connectives in its internal form),\n"),
-	io__write_string("\t\tmultiplied by the number of times it is called,\n"),
-	io__write_string("\t\tis below the given threshold.\n"),
-	io__write_string("\t--inline-simple-threshold <threshold>\n"),
-	io__write_string("\t\tInline a procedure if its size is less than the\n"),
-	io__write_string("\t\tgiven threshold.\n"),
-	io__write_string("\t--intermod-inline-simple-threshold\n"),
-	io__write_string("\t\tSimilar to `--inline-simple-threshold', except used to\n"),
-	io__write_string("\t\tdetermine which predicates should be included in\n"),
-	io__write_string("\t\t`.opt' files. Note that changing this between writing\n"),
-	io__write_string("\t\tthe `.opt' file and compiling to C may cause link errors,\n"),
-	io__write_string("\t\tand too high a value may result in reduced performance.\n"),
-	io__write_string("\t--no-common-struct\n"),
-	io__write_string("\t\tDisable optimization of common term structures.\n"),
-	io__write_string("\t--no-common-goal\n"),
-	io__write_string("\t\tDisable optimization of common goals.\n"),
-	io__write_string("\t\tAt the moment this optimization\n"),
-	io__write_string("\t\tdetects only common deconstruction unifications.\n"),
-	io__write_string("\t\tDisabling this optimization reduces the class of predicates\n"),
-	io__write_string("\t\tthat the compiler considers to be deterministic.\n"),
-	% io__write_string("\t--constraint-propagation\n"),
-	% io__write_string("\t\tEnable the C-tranformation.  (Doesn't work.)\n"),
-	io__write_string("\t--prev-code\n"),
-	io__write_string("\t\tMigrate into the start of branched goals.\n"),
-	io__write_string("\t--no-follow-code\n"),
-	io__write_string("\t\tDon't migrate into the end of branched goals.\n"),
-	io__write_string("\t--excess-assign\n"),
-	io__write_string("\t\tRemove excess assignment unifications.\n"),
-	io__write_string("\t--optimize-duplicate-calls\n"),
-	io__write_string("\t\tOptimize away multiple calls to a predicate\n"),
-	io__write_string("\t\twith the same input arguments.\n"),
-	io__write_string("\t--optimize-saved-vars\n"),
-	io__write_string("\t\tReorder goals to minimize the number of variables\n"),
-	io__write_string("\t\tthat have to be saved across calls.\n"),
-	io__write_string("\t--optimize-unused-args\n"),
-	io__write_string("\t\tRemove unused predicate arguments.\n"),
-	io__write_string("\t\tThis will cause the compiler to generate more\n"),
-	io__write_string("\t\tefficient code for many polymorphic predicates.\n"),
-	io__write_string("\t--intermod-unused-args\n"),
-	io__write_string("\t\tPerform unused argument removal across module boundaries.\n"),
-	io__write_string("\t\tThis option implies `--optimize-unused-args' and\n"),
-	io__write_string("\t\t`--intermodule-optimization'.\n"),
-
-	io__write_string("\t--optimize-higher-order\n"),
-	io__write_string("\t\tEnable specialization higher-order predicates.\n"),
-	io__write_string("\t--optimize-constructor-last-call\n"),
-	io__write_string("\t\tEnable the optimization of ""last"" calls that are followed by\n"),
-	io__write_string("\t\tconstructor application.\n"),
-	io__write_string("\t--deforestation\n"),
-	io__write_string("\t\tEnable deforestation. Deforestation is a program\n"),
-	io__write_string("\t\ttransformation whose aim is to avoid the construction of\n"),
-	io__write_string("\t\tintermediate data structures and to avoid repeated traversals\n"),
-	io__write_string("\t\tover data structures within a conjunction.\n"),
-	io__write_string("\t--deforestation-depth-limit\n"),
-	io__write_string("\t\tSpecify a depth limit for the deforestation algorithm\n"),
-	io__write_string("\t\tin addition to the usual termination checks.\n"),
-	io__write_string("\t\tA value of -1 specifies no depth limit. The default is 4.\n"),
-	io__write_string("\t--deforestation-vars-threshold\n"),
-	io__write_string("\t\tSpecify a rough limit on the number of variables\n"),
-	io__write_string("\t\tin a procedure created by deforestation.\n"),
-	io__write_string("\t\tA value of -1 specifies no limit. The default is 200.\n").
+	write_tabbed_lines([
+		"--no-inlining",
+		"\tDisable all forms of inlining.",
+		"--no-inline-simple",
+		"\tDisable the inlining of simple procedures.",
+		"--no-inline-single-use",
+		"\tDisable the inlining of procedures called only once.",
+		"--inline-compound-threshold <threshold>",
+		"\tInline a procedure if its size (measured roughly",
+		"\tin terms of the number of connectives in its internal form),",
+		"\tmultiplied by the number of times it is called,",
+		"\tis below the given threshold.",
+		"--inline-simple-threshold <threshold>",
+		"\tInline a procedure if its size is less than the",
+		"\tgiven threshold.",
+		"--intermod-inline-simple-threshold",
+		"\tSimilar to `--inline-simple-threshold', except used to",
+		"\tdetermine which predicates should be included in",
+		"\t`.opt' files. Note that changing this between writing",
+		"\tthe `.opt' file and compiling to C may cause link errors,",
+		"\tand too high a value may result in reduced performance.",
+		"--no-common-struct",
+		"\tDisable optimization of common term structures.",
+		"--no-common-goal",
+		"\tDisable optimization of common goals.",
+		"\tAt the moment this optimization",
+		"\tdetects only common deconstruction unifications.",
+		"\tDisabling this optimization reduces the class of predicates",
+		"\tthat the compiler considers to be deterministic.",
+	% 	"\t--constraint-propagation",
+	% 	"\t\tEnable the C-tranformation.  (Doesn't work.)",
+		"--prev-code",
+		"\tMigrate into the start of branched goals.",
+		"--no-follow-code",
+		"\tDon't migrate into the end of branched goals.",
+		"--excess-assign",
+		"\tRemove excess assignment unifications.",
+		"--optimize-duplicate-calls",
+		"\tOptimize away multiple calls to a predicate",
+		"\twith the same input arguments.",
+		"--optimize-saved-vars",
+		"\tReorder goals to minimize the number of variables",
+		"\tthat have to be saved across calls.",
+		"--optimize-unused-args",
+		"\tRemove unused predicate arguments.",
+		"\tThis will cause the compiler to generate more",
+		"\tefficient code for many polymorphic predicates.",
+		"--intermod-unused-args",
+		"\tPerform unused argument removal across module boundaries.",
+		"\tThis option implies `--optimize-unused-args' and",
+		"\t`--intermodule-optimization'.",
+
+		"--optimize-higher-order",
+		"\tEnable specialization higher-order predicates.",
+		"--optimize-constructor-last-call",
+		"\tEnable the optimization of ""last"" calls that are followed by",
+		"\tconstructor application.",
+		"--deforestation",
+		"\tEnable deforestation. Deforestation is a program",
+		"\ttransformation whose aim is to avoid the construction of",
+		"\tintermediate data structures and to avoid repeated traversals",
+		"\tover data structures within a conjunction.",
+		"--deforestation-depth-limit",
+		"\tSpecify a depth limit for the deforestation algorithm",
+		"\tin addition to the usual termination checks.",
+		"\tA value of -1 specifies no depth limit. The default is 4.",
+		"--deforestation-vars-threshold",
+		"\tSpecify a rough limit on the number of variables",
+		"\tin a procedure created by deforestation.",
+		"\tA value of -1 specifies no limit. The default is 200."
+	]).
 	 
 :- pred options_help_hlds_llds_optimization(io__state::di, io__state::uo) is det.
 
 options_help_hlds_llds_optimization -->
 	io__write_string("\n    Medium-level (HLDS -> LLDS) optimizations:\n"),
-	io__write_string("\t--no-smart-indexing\n"),
-	io__write_string("\t\tGenerate switches as a simple if-then-else chains;\n"),
-	io__write_string("\t\tdisable string hashing and integer table-lookup indexing.\n"),
-	io__write_string("\t--dense-switch-req-density <percentage>\n"),
-	io__write_string("\t\tThe jump table generated for an atomic switch\n"),
-	io__write_string("\t\tmust have at least this percentage of full slots (default: 25).\n"),
-	io__write_string("\t--lookup-switch-req-density <percentage>\n"),
-	io__write_string("\t\tThe jump table generated for an atomic switch\n"),
-	io__write_string("\t\tin which all the outputs are constant terms\n"),
-	io__write_string("\t\tmust have at least this percentage of full slots (default: 25).\n"),
-	io__write_string("\t--dense-switch-size <n>\n"),
-	io__write_string("\t\tThe jump table generated for an atomic switch\n"),
-	io__write_string("\t\tmust have at least this many entries (default: 4).\n"),
-	io__write_string("\t--lookup-switch-size <n>\n"),
-	io__write_string("\t\tThe lookup table generated for an atomic switch\n"),
-	io__write_string("\t\tmust have at least this many entries (default: 4).\n"),
-	io__write_string("\t--string-switch-size <n>\n"),
-	io__write_string("\t\tThe hash table generated for a string switch\n"),
-	io__write_string("\t\tmust have at least this many entries (default: 8).\n"),
-	io__write_string("\t--tag-switch-size <n>\n"),
-	io__write_string("\t\tThe number of alternatives in a tag switch\n"),
-	io__write_string("\t\tmust be at least this number (default: 3).\n"),
-	io__write_string("\t--try-switch-size <n>\n"),
-	io__write_string("\t\tThe number of alternatives in a try/retry chain switch\n"),
-	io__write_string("\t\tmust be at least this number (default: 3).\n"),
-	io__write_string("\t--binary-switch-size <n>\n"),
-	io__write_string("\t\tThe number of alternatives in a binary search switch\n"),
-	io__write_string("\t\tmust be at least this number (default: 4).\n"),
-	io__write_string("\t--no-static-ground-terms\n"),
-	io__write_string("\t\tDisable the optimization of constructing constant ground terms\n"),
-	io__write_string("\t\tat compile time and storing them as static constants.\n"),
-	io__write_string("\t--no-middle-rec\n"),
-	io__write_string("\t\tDisable the middle recursion optimization.\n"),
-	io__write_string("\t--no-simple-neg\n"),
-	io__write_string("\t\tDon't generate simplified code for simple negations.\n"),
-	io__write_string("\t--no-follow-vars\n"),
-	io__write_string("\t\tDon't optimize the assignment of registers in branched goals.\n").
-%	io__write_string("\t--no-allow-hijacks\n"),
-%	io__write_string("\t\tDo not generate code in which a procedure hijacks\n"),
-%	io__write_string("\t\ta nondet stack frame that possibly belongs to\n"),
-%	io__write_string("\t\tanother procedure invocation\n").
+	write_tabbed_lines([
+		"--no-smart-indexing",
+		"\tGenerate switches as a simple if-then-else chains;",
+		"\tdisable string hashing and integer table-lookup indexing.",
+		"--dense-switch-req-density <percentage>",
+		"\tThe jump table generated for an atomic switch",
+		"\tmust have at least this percentage of full slots (default: 25).",
+		"--lookup-switch-req-density <percentage>",
+		"\tThe jump table generated for an atomic switch",
+		"\tin which all the outputs are constant terms",
+		"\tmust have at least this percentage of full slots (default: 25).",
+		"--dense-switch-size <n>",
+		"\tThe jump table generated for an atomic switch",
+		"\tmust have at least this many entries (default: 4).",
+		"--lookup-switch-size <n>",
+		"\tThe lookup table generated for an atomic switch",
+		"\tmust have at least this many entries (default: 4).",
+		"--string-switch-size <n>",
+		"\tThe hash table generated for a string switch",
+		"\tmust have at least this many entries (default: 8).",
+		"--tag-switch-size <n>",
+		"\tThe number of alternatives in a tag switch",
+		"\tmust be at least this number (default: 3).",
+		"--try-switch-size <n>",
+		"\tThe number of alternatives in a try/retry chain switch",
+		"\tmust be at least this number (default: 3).",
+		"--binary-switch-size <n>",
+		"\tThe number of alternatives in a binary search switch",
+		"\tmust be at least this number (default: 4).",
+		"--no-static-ground-terms",
+		"\tDisable the optimization of constructing constant ground terms",
+		"\tat compile time and storing them as static constants.",
+		"--no-middle-rec",
+		"\tDisable the middle recursion optimization.",
+		"--no-simple-neg",
+		"\tDon't generate simplified code for simple negations.",
+		"--no-follow-vars",
+		"\tDon't optimize the assignment of registers in branched goals."
+%		"--no-allow-hijacks",
+%		"\tDo not generate code in which a procedure hijacks",
+%		"\ta nondet stack frame that possibly belongs to",
+%		"\tanother procedure invocation\n".
+	]).
 
 :- pred options_help_llds_llds_optimization(io__state::di, io__state::uo) is det.
 
 options_help_llds_llds_optimization -->
 	io__write_string("\n    Low-level (LLDS -> LLDS) optimizations:\n"),
-	io__write_string("\t--no-llds-optimize\n"),
-	io__write_string("\t\tDisable the low-level optimization passes.\n"),
-	io__write_string("\t--optimize-dead-procs\n"),
-	io__write_string("\t\tEnable dead predicate elimination.\n"),
-	io__write_string("\t--no-optimize-peep\n"),
-	io__write_string("\t\tDisable local peephole optimizations.\n"),
-	io__write_string("\t--no-optimize-jumps\n"),
-	io__write_string("\t\tDisable elimination of jumps to jumps.\n"),
-	io__write_string("\t--no-optimize-fulljumps\n"),
-	io__write_string("\t\tDisable elimination of jumps to ordinary code.\n"),
-	io__write_string("\t--no-optimize-labels\n"),
-	io__write_string("\t\tDisable elimination of dead labels and code.\n"),
-	io__write_string("\t--optimize-dups\n"),
-	io__write_string("\t\tEnable elimination of duplicate code.\n"),
-%%%	io__write_string("\t--optimize-copyprop\n"),
-%%%	io__write_string("\t\tEnable the copy propagation optimization.\n"),
-	io__write_string("\t--optimize-value-number\n"),
-	io__write_string("\t\tPerform value numbering on extended basic blocks.\n"),
-	io__write_string("\t--no-optimize-frames\n"),
-	io__write_string("\t\tDisable stack frame optimizations.\n"),
-	io__write_string("\t--no-optimize-delay-slot\n"),
-	io__write_string("\t\tDisable branch delay slot optimizations.\n"),
-	io__write_string("\t--optimize-repeat <n>\n"),
-	io__write_string("\t\tIterate most optimizations at most <n> times (default: 3).\n"),
-	io__write_string("\t--optimize-vnrepeat <n>\n"),
-	io__write_string("\t\tIterate value numbering at most <n> times (default: 1).\n"),
-	io__write_string("\t--pred-value-number\n"),
-	io__write_string("\t\tExtend value numbering to entire predicates.\n").
+	write_tabbed_lines([
+		"--no-llds-optimize",
+		"\tDisable the low-level optimization passes.",
+		"--optimize-dead-procs",
+		"\tEnable dead predicate elimination.",
+		"--no-optimize-peep",
+		"\tDisable local peephole optimizations.",
+		"--no-optimize-jumps",
+		"\tDisable elimination of jumps to jumps.",
+		"--no-optimize-fulljumps",
+		"\tDisable elimination of jumps to ordinary code.",
+		"--no-optimize-labels",
+		"\tDisable elimination of dead labels and code.",
+		"--optimize-dups",
+		"\tEnable elimination of duplicate code.",
+%%%		"--optimize-copyprop",
+%%%		"\tEnable the copy propagation optimization.",
+		"--optimize-value-number",
+		"\tPerform value numbering on extended basic blocks.",
+		"--no-optimize-frames",
+		"\tDisable stack frame optimizations.",
+		"--no-optimize-delay-slot",
+		"\tDisable branch delay slot optimizations.",
+		"--optimize-repeat <n>",
+		"\tIterate most optimizations at most <n> times (default: 3).",
+		"--optimize-vnrepeat <n>",
+		"\tIterate value numbering at most <n> times (default: 1).",
+		"--pred-value-number",
+		"\tExtend value numbering to entire predicates."
+	]).
 
 :- pred options_help_output_optimization(io__state::di, io__state::uo) is det.
 
 options_help_output_optimization -->
 	io__write_string("\n    Output-level (LLDS -> C) optimizations:\n"),
-	io__write_string("\t--use-macro-for-redo-fail\n"),
-	io__write_string("\t\tEmit the fail or redo macro instead of a branch\n"),
-	io__write_string("\t\tto the fail or redo code in the runtime system.\n"),
-	io__write_string("\t\tThis produces slightly bigger but slightly faster code.\n"),
-	io__write_string("\t--no-emit-c-loops\n"),
-	io__write_string("\t\tUse only gotos, don't emit C loop constructs.\n"),
-	io__write_string("\t--procs-per-c-function <n>\n"),
-	io__write_string("\t\tPut the code for up to <n> Mercury\n"),
-	io__write_string("\t\tprocedures in a single C function.  The default\n"),
-	io__write_string("\t\tvalue of <n> is one.  Increasing <n> can produce\n"),
-	io__write_string("\t\tslightly more efficient code, but makes compilation slower.\n"),
-	io__write_string("\t--everything-in-one-c-function\n"),
-	io__write_string("\t\tThis option has the effect of putting the code for all\n"),
-	io__write_string("\t\tthe Mercury procedures in a single C function,\n"),
-	io__write_string("\t\twhich produces the most efficient code but tends to\n"),
-	io__write_string("\t\tseverely stress the C compiler on large modules.\n").
+	write_tabbed_lines([
+		"--use-macro-for-redo-fail",
+		"\tEmit the fail or redo macro instead of a branch",
+		"\tto the fail or redo code in the runtime system.",
+		"\tThis produces slightly bigger but slightly faster code.",
+		"--no-emit-c-loops",
+		"\tUse only gotos, don't emit C loop constructs.",
+		"--procs-per-c-function <n>",
+		"\tPut the code for up to <n> Mercury",
+		"\tprocedures in a single C function.  The default",
+		"\tvalue of <n> is one.  Increasing <n> can produce",
+		"\tslightly more efficient code, but makes compilation slower.",
+		"--everything-in-one-c-function",
+		"\tThis option has the effect of putting the code for all",
+		"\tthe Mercury procedures in a single C function,",
+		"\twhich produces the most efficient code but tends to",
+		"\tseverely stress the C compiler on large modules."
+	]).
 
 :- pred options_help_object_optimization(io__state::di, io__state::uo) is det.
 
 options_help_object_optimization -->
 	io__write_string("\n    Object-level (C -> object code) optimizations:\n"),
-	io__write_string("\t\tNote that if you are using Mmake, you need to pass these\n"),
-	io__write_string("\t\toptions to `mgnuc' rather than to `mmc'.\n"),
-	io__write_string("\t--no-c-optimize\n"),
-	io__write_string("\t\tDon't enable the C compiler's optimizations.\n"),
-	io__write_string("\t--inline-alloc\n"),
-	io__write_string("\t\tInline calls to GC_malloc().\n"),
-	io__write_string("\t\tThis can improve performance a fair bit,\n"),
-	io__write_string("\t\tbut may significantly increase code size.\n"),
-	io__write_string("\t\tThis option has no effect if `--gc conservative'\n"),
-	io__write_string("\t\tis not set or if the C compiler is not GNU C.\n").
+	write_tabbed_lines([
+		"\tNote that if you are using Mmake, you need to pass these",
+		"\toptions to `mgnuc' rather than to `mmc'.",
+		"--no-c-optimize",
+		"\tDon't enable the C compiler's optimizations.",
+		"--inline-alloc",
+		"\tInline calls to GC_malloc().",
+		"\tThis can improve performance a fair bit,",
+		"\tbut may significantly increase code size.",
+		"\tThis option has no effect if `--gc conservative'",
+		"\tis not set or if the C compiler is not GNU C."
+	]).
 
 :- pred options_help_link(io__state::di, io__state::uo) is det.
 
 options_help_link -->
 	io__write_string("\nLink Options:\n"),
-	io__write_string("\t-o <filename>, --output-file <filename>\n"),
-	io__write_string("\t\tSpecify the name of the final executable.\n"),
-	io__write_string("\t\t(The default executable name is the same as the name\n"),
-	io__write_string("\t\tof the first module on the command line.)\n"),
-	io__write_string("\t--link-flags <options>\n"),
-	io__write_string("\t\tSpecify options to be passed to the linker.\n"),
-	io__write_string("\t-L <directory>, --library-directory <directory>\n"),
-	io__write_string("\t\tAppend <directory> to the list of directories in which\n"),
-	io__write_string("\t\tto search for libraries.\n"),
-	io__write_string("\t-l <library>, --library <library>\n"),
-	io__write_string("\t\tLink with the specified library.\n"),
-	io__write_string("\t--link-object <object-file>\n"),
-	io__write_string("\t\tLink with the specified object file.\n").
+	write_tabbed_lines([
+		"-o <filename>, --output-file <filename>",
+		"\tSpecify the name of the final executable.",
+		"\t(The default executable name is the same as the name",
+		"\tof the first module on the command line.)",
+		"--link-flags <options>",
+		"\tSpecify options to be passed to the linker.",
+		"-L <directory>, --library-directory <directory>",
+		"\tAppend <directory> to the list of directories in which",
+		"\tto search for libraries.",
+		"-l <library>, --library <library>",
+		"\tLink with the specified library.",
+		"--link-object <object-file>",
+		"\tLink with the specified object file."
+	]).
 
 :- pred options_help_misc(io__state::di, io__state::uo) is det.
 
 options_help_misc -->
 	io__write_string("\nMiscellaneous Options:\n"),
-	% io__write_string("\t-H <n>, --heap-space <n>\n"),
-	% io__write_string("\t\tPre-allocate <n> kilobytes of heap space.\n"),
-	% io__write_string("\t\tThis option is now obsolete.  In the past it\n"),
-	% io__write_string("\t\twas used to avoid NU-Prolog's\n"),
-	% io__write_string("\t\t\t""Panic: growing stacks has required shifting the heap""\n"),
-	% io__write_string("\t\tmessage.\n"),
-
-	io__write_string("\t-I <dir>, --search-directory <dir>\n"),
-	io__write_string("\t\tAdd <dir> to the list of directories to be searched for \n\t\timported modules.\n"),
-	io__write_string("\t--intermod-directory <dir>\n"),
-	io__write_string("\t\tAdd <dir> to the list of directories to be\n"),
-	io__write_string("\t\tsearched for `.opt' files.\n"),
-	io__write_string("\t--no-use-search-directories-for-intermod\n"),
-	io__write_string("\t\tDon't add arguments to `--search-directory' to the list\n"),
-	io__write_string("\t\tof directories to search for `.opt' files - use only the\n"),
-	io__write_string("\t\tdirectories given by `--intermod-directory'.\n"),
-	io__write_string("\t--use-subdirs\n"),
-	io__write_string("\t\tGenerate intermediate files in a `Mercury' subdirectory,\n"),
-	io__write_string("\t\trather than generating them in the current directory.\n").
+	write_tabbed_lines([
+	% 	"\t-H <n>, --heap-space <n>",
+	% 	"\t\tPre-allocate <n> kilobytes of heap space.",
+	% 	"\t\tThis option is now obsolete.  In the past it",
+	% 	"\t\twas used to avoid NU-Prolog's",
+	% 	"\t\t\t""Panic: growing stacks has required shifting the heap""",
+	% 	"\t\tmessage.",
+
+		"-I <dir>, --search-directory <dir>",
+		"\tAdd <dir> to the list of directories to be searched for \n\t\timported modules.",
+		"--intermod-directory <dir>",
+		"\tAdd <dir> to the list of directories to be",
+		"\tsearched for `.opt' files.",
+		"--no-use-search-directories-for-intermod",
+		"\tDon't add arguments to `--search-directory' to the list",
+		"\tof directories to search for `.opt' files - use only the",
+		"\tdirectories given by `--intermod-directory'.",
+		"--use-subdirs",
+		"\tGenerate intermediate files in a `Mercury' subdirectory,",
+		"\trather than generating them in the current directory."
+	]).
+
+:- pred write_tabbed_lines(list(string), io__state, io__state).
+:- mode write_tabbed_lines(in, di, uo) is det.
+
+write_tabbed_lines([]) --> [].
+write_tabbed_lines([Str|Strs]) -->
+	io__write_char('\t'),
+	io__write_string(Str),
+	io__write_char('\n'),
+	write_tabbed_lines(Strs).
 
 :- end_module options.
 
cvs diff: Diffing compiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/exceptions
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/Togl-1.2
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing profiler
cvs diff: Diffing runtime
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing scripts
cvs diff: Diffing tools
cvs diff: Diffing trial
cvs diff: Diffing util



More information about the developers mailing list