- <sect1>
+ <sect1 id="flag-reference">
<title>Flag reference</title>
+ <para>This section is a quick-reference for GHC's command-line
+ flags. For each flag, we also list its static/dynamic status (see
+ <xref linkend="static-dynamic-flags">), and the flag's opposite
+ (if available).</para>
+
<sect2>
<title>Help and verbosity options (<xref linkend="options-help">)</title>
</thead>
<tbody>
<row>
- <entry><option>-cpp</option></entry>
- <entry>Run the C pre-processor on the Haskell source</entry>
- <entry>dynamic</entry>
- <entry>-</entry>
- </row>
- <row>
<entry><option>-E</option></entry>
<entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
<entry>static</entry>
<entry>static</entry>
<entry>-</entry>
</row>
- <row>
- <entry><option>-fasm</option></entry>
- <entry>Use the native code generator</entry>
- <entry>dynamic</entry>
- <entry>-fvia-C</entry>
- </row>
- <row>
- <entry><option>-fvia-C</option></entry>
- <entry>Compile via C</entry>
- <entry>dynamic</entry>
- <entry>-fasm</entry>
- </row>
</tbody>
</tgroup>
</informaltable>
</thead>
<tbody>
<row>
+ <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
+ <entry>set the suffix to use for intermediate C files</entry>
+ <entry>static</entry>
+ <entry>-</entry>
+ </row>
+ <row>
+ <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
+ <entry>set directory for interface files</entry>
+ <entry>static</entry>
+ <entry>-</entry>
+ </row>
+ <row>
<entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
<entry>set the suffix to use for interface files</entry>
<entry>static</entry>
</thead>
<tbody>
<row>
- <entry><option>-ohi</option> <replaceable>file</replaceable></entry>
- <entry>Put the interface file in <replaceable>file</replaceable></entry>
- <entry>static</entry>
- <entry>-</entry>
- </row>
- <row>
<entry><option>-ddump-hi</option></entry>
<entry>Dump the new interface to stdout</entry>
<entry>dynamic</entry>
<entry><option>-no-recomp</option></entry>
<entry>Turn off recompilation checking</entry>
<entry>static</entry>
- <entry>-recomp</entry>
+ <entry><option>-recomp</option></entry>
</row>
</tbody>
</tgroup>
</sect2>
<sect2>
- <title>Packages (<xref linkend="packages">)</title>
+ <title>Interactive-mode options (<xref linkend="ghci-dot-files">)</title>
+
<informaltable>
<tgroup cols=3 align=left colsep=1 rowsep=1>
<thead>
- <row>
+ <row>
<entry>Flag</entry>
<entry>Description</entry>
<entry>Static/Dynamic</entry>
</thead>
<tbody>
<row>
- <entry><option>--add-package</option></entry>
- <entry>Install a new package</entry>
+ <entry><option>-ignore-dot-ghci</option></entry>
+ <entry>Disable reading of <filename>.ghci</filename> files</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
- <entry><option>--delete-package</option> <replaceable>name</replaceable></entry>
- <entry>Delete package entry <replaceable>name</replaceable></entry>
+ <entry><option>-read-dot-ghci</option></entry>
+ <entry>Enable reading of <filename>.ghci</filename> files</entry>
<entry>static</entry>
<entry>-</entry>
</row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
+
+ <sect2>
+ <title>Packages (<xref linkend="packages">)</title>
+ <informaltable>
+ <tgroup cols=3 align=left colsep=1 rowsep=1>
+ <thead>
+ <row>
+ <entry>Flag</entry>
+ <entry>Description</entry>
+ <entry>Static/Dynamic</entry>
+ <entry>Reverse</entry>
+ </row>
+ </thead>
+ <tbody>
<row>
- <entry><option>--list-packages</option></entry>
- <entry>List installed packages</entry>
+ <entry><option>-package</option> <replaceable>name</replaceable></entry>
+ <entry>Use package <replaceable>name</replaceable></entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
- <entry><option>-package</option> <replaceable>name</replaceable></entry>
- <entry>Use package <replaceable>name</replaceable></entry>
+ <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
+ <entry>Load more packages from <replaceable>file</replaceable></entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-W</option></entry>
<entry>enable normal warnings</entry>
- <entry>static</entry>
+ <entry>dynamic</entry>
<entry><option>-w</option></entry>
</row>
<row>
<entry><option>-w</option></entry>
<entry>disable all warnings</entry>
- <entry>static</entry>
+ <entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-Wall</option></entry>
<entry>enable all warnings</entry>
- <entry>static</entry>
+ <entry>dynamic</entry>
<entry><option>-w</option></entry>
</row>
</row>
<row>
+ <entry><option>-fwarn-misc</option></entry>
+ <entry>enable miscellaneous warnings</entry>
+ <entry>dynamic</entry>
+ <entry><option>-fno-warn-misc</option></entry>
+ </row>
+
+ <row>
<entry><option>-fwarn-missing-fields</option></entry>
<entry>warn when fields of a record are uninitialised</entry>
<entry>dynamic</entry>
<row>
<entry><option>-fliberate-case-threshold</option></entry>
- <entry>Tweak the liberate-case optimisation</entry>
+ <entry>Tweak the liberate-case optimisation (default: 10)</entry>
<entry>static</entry>
<entry><option>-fno-liberate-case-threshold</option></entry>
</row>
</row>
<row>
+ <entry><option>-fmax-worker-args</option></entry>
+ <entry>If a worker has that many arguments, none will be
+ unpacked anymore (default: 10)</entry>
+ <entry>static</entry>
+ <entry>-</entry>
+ </row>
+
+ <row>
<entry><option>-fmax-simplifier-iterations</option></entry>
<entry>Set the max iterations for the simplifier</entry>
<entry>static</entry>
</row>
<row>
- <entry><option>-funfolding-interface-threshold</option></entry>
- <entry>Tweak unfolding settings</entry>
- <entry>static</entry>
- <entry><option>-fno-unfolding-interface-threshold</option></entry>
- </row>
-
- <row>
<entry><option>-funfolding-update-in-place</option></entry>
<entry>Tweak unfolding settings</entry>
<entry>static</entry>
</thead>
<tbody>
<row>
+ <entry><option>-cpp</option></entry>
+ <entry>Run the C pre-processor on Haskell source files</entry>
+ <entry>dynamic</entry>
+ <entry>-</entry>
+ </row>
+ <row>
<entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
<entry>Define a symbol in the C pre-processor</entry>
<entry>dynamic</entry>
</sect2>
<sect2>
+ <title>Code generation options (<xref linkend="options-codegen">)</title>
+
+ <informaltable>
+ <tgroup cols=3 align=left colsep=1 rowsep=1>
+ <thead>
+ <row>
+ <entry>Flag</entry>
+ <entry>Description</entry>
+ <entry>Static/Dynamic</entry>
+ <entry>Reverse</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><option>-fasm</option></entry>
+ <entry>Use the native code generator</entry>
+ <entry>dynamic</entry>
+ <entry>-fvia-C</entry>
+ </row>
+ <row>
+ <entry><option>-fvia-C</option></entry>
+ <entry>Compile via C</entry>
+ <entry>dynamic</entry>
+ <entry>-fasm</entry>
+ </row>
+ <row>
+ <entry><option>-fno-code</option></entry>
+ <entry>Omit code generation</entry>
+ <entry>static</entry>
+ <entry>-</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
+
+ <sect2>
<title>Linking options (<xref linkend="options-linker">)</title>
<informaltable>
<entry>-</entry>
</row>
<row>
- <entry><option>-mlong-calls</option></entry>
- <entry>(HPPA only) enable long call support</entry>
- <entry>static</entry>
- <entry>-</entry>
- </row>
- <row>
<entry><option>-monly-[32]-regs</option></entry>
<entry>(x86 only) give some registers back to the C compiler</entry>
<entry>dynamic</entry>
</row>
<row>
<entry><option>-ddump-foreign</option></entry>
- <entry>Dump FFI-related output</entry>
+ <entry>Dump <literal>foreign export</literal> stubs</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
<entry>-</entry>
</row>
<row>
- <entry><option>-dshow-passes</option></entry>
- <entry>(equivalent to <option>-v2</option>)</entry>
- <entry>dynamic</entry>
- <entry>-</entry>
- </row>
- <row>
<entry><option>-ddump-rn-trace</option></entry>
<entry>Trace renamer</entry>
<entry>dynamic</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
+ <row>
+ <entry><option>-unreg</option></entry>
+ <entry>Enable unregisterised compilation</entry>
+ <entry>static</entry>
+ <entry>-</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
</row>
<row>
<entry><option>-fno-method-sharing</option></entry>
- <entry>???</entry>
+ <entry>Don't share specialisations of overloaded functions</entry>
<entry>static</entry>
<entry>-</entry>
</row>
, ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
, ( "Rghc-timing" , NoArg (enableTimingStats) )
- , ( "unreg" , NoArg (addNoDups v_Ways WayUnreg) )
+ -Bdir
-->
<!-- Emacs stuff: