Improve the correlation betweens documented and existent options
[ghc-hetmet.git] / docs / users_guide / flags.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2   <sect1 id="flag-reference">
3     <title>Flag reference</title>
4
5     <para>This section is a quick-reference for GHC's command-line
6     flags.  For each flag, we also list its static/dynamic status (see
7     <xref linkend="static-dynamic-flags"/>), and the flag's opposite
8     (if available).</para>
9
10     <sect2>
11       <title>Help and verbosity options</title>
12
13       <para><xref linkend="options-help"/></para>
14
15       <informaltable>
16         <tgroup cols="4" align="left" colsep="1" rowsep="1">
17           <thead>
18             <row>
19               <entry>Flag</entry>
20               <entry>Description</entry>
21               <entry>Static/Dynamic</entry>
22               <entry>Reverse</entry>
23             </row>
24           </thead>
25           <tbody>
26             <row>
27               <entry><option>-?</option></entry>
28               <entry>help</entry>
29               <entry>mode</entry>
30               <entry>-</entry>
31             </row>
32             <row>
33               <entry><option>-help</option></entry>
34               <entry>help</entry>
35               <entry>mode</entry>
36               <entry>-</entry>
37             </row>
38             <row>
39               <entry><option>-n</option></entry>
40               <entry>do a dry run</entry>
41               <entry>dynamic</entry>
42               <entry>-</entry>
43             </row>
44             <row>
45               <entry><option>-v</option></entry>
46               <entry>verbose mode (equivalent to <option>-v3</option>)</entry>
47               <entry>dynamic</entry>
48               <entry>-</entry>
49             </row>
50             <row>
51               <entry><option>-v</option><replaceable>n</replaceable></entry>
52               <entry>set verbosity level</entry>
53               <entry>dynamic</entry>
54               <entry>-</entry>
55             </row>
56             <row>
57               <entry><option>-V</option></entry>
58               <entry>display GHC version</entry>
59               <entry>mode</entry>
60               <entry>-</entry>
61             </row>
62             <row>
63               <entry><option>&ndash;&ndash;version</option></entry>
64               <entry>display GHC version</entry>
65               <entry>mode</entry>
66               <entry>-</entry>
67             </row>
68             <row>
69               <entry><option>&ndash;&ndash;numeric-version</option></entry>
70               <entry>display GHC version (numeric only)</entry>
71               <entry>mode</entry>
72               <entry>-</entry>
73             </row>
74             <row>
75               <entry><option>&ndash;&ndash;print-libdir</option></entry>
76               <entry>display GHC library directory</entry>
77               <entry>mode</entry>
78               <entry>-</entry>
79             </row>
80             <row>
81               <entry><option>-ferror-spans</option></entry>
82               <entry>output full span in error messages</entry>
83               <entry>static</entry>
84               <entry>-</entry>
85             </row>
86             <row>
87               <entry><option>-H</option><replaceable>size</replaceable></entry>
88               <entry>Set the minimum heap size to <replaceable>size</replaceable></entry>
89               <entry>static</entry>
90               <entry>-</entry>
91             </row>
92             <row>
93               <entry><option>-Rghc-timing</option></entry>
94               <entry>Summarise timing stats for GHC (same as <literal>+RTS -tstderr</literal>)</entry>
95               <entry>static</entry>
96               <entry>-</entry>
97             </row>
98           </tbody>
99         </tgroup>
100       </informaltable>
101
102     </sect2>
103     <sect2>
104       <title>Which phases to run</title>
105       
106       <para><xref linkend="options-order"/></para>
107
108       <informaltable>
109         <tgroup cols="4" align="left" colsep="1" rowsep="1">
110           <thead>
111             <row>
112               <entry>Flag</entry>
113               <entry>Description</entry>
114               <entry>Static/Dynamic</entry>
115               <entry>Reverse</entry>
116             </row>
117           </thead>
118           <tbody>
119             <row>
120               <entry><option>-E</option></entry>
121               <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
122               <entry>mode</entry>
123               <entry>-</entry>
124             </row>
125             <row>
126               <entry><option>-C</option></entry>
127               <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
128               <entry>mode</entry>
129               <entry>-</entry>
130             </row>
131             <row>
132               <entry><option>-S</option></entry>
133               <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
134               <entry>mode</entry>
135               <entry>-</entry>
136             </row>
137             <row>
138               <entry><option>-c</option></entry>
139               <entry>Do not link</entry>
140               <entry>dynamic</entry>
141               <entry>-</entry>
142             </row>
143             <row>
144               <entry><option>-x</option> <replaceable>suffix</replaceable></entry>
145               <entry>Override default behaviour for source files</entry>
146               <entry>static</entry>
147               <entry>-</entry>
148             </row>
149           </tbody>
150         </tgroup>
151       </informaltable>
152     </sect2>
153
154      <sect2>
155       <title>Alternative modes of operation</title>
156       
157       <para><xref linkend="modes"/></para>
158
159       <informaltable>
160         <tgroup cols="4" align="left" colsep="1" rowsep="1">
161           <thead>
162             <row>
163               <entry>Flag</entry>
164               <entry>Description</entry>
165               <entry>Static/Dynamic</entry>
166               <entry>Reverse</entry>
167             </row>
168           </thead>
169           <tbody>
170             <row>
171               <entry><option>--interactive</option></entry>
172               <entry>Interactive mode - normally used by just running <command>ghci</command></entry>
173               <entry>mode</entry>
174               <entry>-</entry>
175             </row>
176             <row>
177               <entry><option>--make</option></entry>
178               <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>.</entry>
179               <entry>mode</entry>
180               <entry>-</entry>
181             </row>
182             <row>
183               <entry><option>-e <replaceable>expr</replaceable></option></entry>
184               <entry>Evaluate <replaceable>expr</replaceable></entry>
185               <entry>mode</entry>
186               <entry>-</entry>
187             </row>
188             <row>
189               <entry><option>-M</option></entry>
190               <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>.</entry>
191               <entry>mode</entry>
192               <entry>-</entry>
193             </row>
194           </tbody>
195         </tgroup>
196       </informaltable>
197     </sect2>
198
199     <sect2>
200       <title>Redirecting output</title>
201       
202       <para><xref linkend="options-output"/></para>
203
204       <informaltable>
205         <tgroup cols="4" align="left" colsep="1" rowsep="1">
206           <thead>
207             <row>
208               <entry>Flag</entry>
209               <entry>Description</entry>
210               <entry>Static/Dynamic</entry>
211               <entry>Reverse</entry>
212             </row>
213           </thead>
214           <tbody>
215             <row>
216               <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
217               <entry>set the suffix to use for intermediate C files</entry>
218               <entry>dynamic</entry>
219               <entry>-</entry>
220             </row>
221             <row>
222               <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
223               <entry>set directory for interface files</entry>
224               <entry>dynamic</entry>
225               <entry>-</entry>
226             </row>
227             <row>
228               <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
229               <entry>set the suffix to use for interface files</entry>
230               <entry>dynamic</entry>
231               <entry>-</entry>
232             </row>
233             <row>
234               <entry><option>-o</option> <replaceable>filename</replaceable></entry>
235               <entry>set output filename</entry>
236               <entry>dynamic</entry>
237               <entry>-</entry>
238             </row>
239             <row>
240               <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
241               <entry>set output directory</entry>
242               <entry>dynamic</entry>
243               <entry>-</entry>
244             </row>
245             <row>
246               <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
247               <entry>set the filename in which to put the interface</entry>
248               <entry>dynamic</entry>
249               <entry></entry>
250             </row>
251             <row>
252               <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
253               <entry>set the output file suffix</entry>
254               <entry>dynamic</entry>
255               <entry>-</entry>
256             </row>
257             <row>
258               <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
259               <entry>redirect FFi stub files</entry>
260               <entry>dynamic</entry>
261               <entry>-</entry>
262             </row>
263           </tbody>
264         </tgroup>
265       </informaltable>
266     </sect2>
267
268     <sect2>
269       <title>Keeping intermediate files</title>
270       
271       <para><xref linkend="keeping-intermediates"/></para>
272       
273       <informaltable>
274         <tgroup cols="4" align="left" colsep="1" rowsep="1">
275           <thead>
276             <row>
277               <entry>Flag</entry>
278               <entry>Description</entry>
279               <entry>Static/Dynamic</entry>
280               <entry>Reverse</entry>
281             </row>
282           </thead>
283           <tbody>
284             <row>
285               <entry><option>-keep-hc-file</option></entry>
286               <entry>retain intermediate <literal>.hc</literal> files</entry>
287               <entry>dynamic</entry>
288               <entry>-</entry>
289             </row>
290             <row>
291               <entry><option>-keep-s-file</option></entry>
292               <entry>retain intermediate <literal>.s</literal> files</entry>
293               <entry>dynamic</entry>
294               <entry>-</entry>
295             </row>
296             <row>
297               <entry><option>-keep-raw-s-file</option></entry>
298               <entry>retain intermediate <literal>.raw_s</literal> files</entry>
299               <entry>dynamic</entry>
300               <entry>-</entry>
301             </row>
302             <row>
303               <entry><option>-keep-tmp-files</option></entry>
304               <entry>retain all intermediate temporary files</entry>
305               <entry>dynamic</entry>
306               <entry>-</entry>
307             </row>
308           </tbody>
309         </tgroup>
310       </informaltable>
311     </sect2>
312
313     <sect2>
314       <title>Temporary files</title>
315       
316       <para><xref linkend="temp-files"/></para>
317
318       <informaltable>
319         <tgroup cols="4" align="left" colsep="1" rowsep="1">
320           <thead>
321             <row>
322               <entry>Flag</entry>
323               <entry>Description</entry>
324               <entry>Static/Dynamic</entry>
325               <entry>Reverse</entry>
326             </row>
327           </thead>
328           <tbody>
329             <row>
330               <entry><option>-tmpdir</option></entry>
331               <entry>set the directory for temporary files</entry>
332               <entry>dynamic</entry>
333               <entry>-</entry>
334             </row>
335           </tbody>
336         </tgroup>
337       </informaltable>
338     </sect2>
339
340     <sect2>
341       <title>Finding imports</title>
342
343       <para><xref linkend="search-path"/></para>
344
345       <informaltable>
346         <tgroup cols="4" align="left" colsep="1" rowsep="1">
347           <thead>
348             <row>
349               <entry>Flag</entry>
350
351               <entry>Description</entry>
352               <entry>Static/Dynamic</entry>
353               <entry>Reverse</entry>
354             </row>
355           </thead>
356           <tbody>
357             <row>
358               <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
359               <entry>add <replaceable>dir</replaceable>,
360                   <replaceable>dir2</replaceable>, etc. to import path</entry>
361               <entry>dynamic</entry>
362               <entry>-</entry>
363             </row>
364             <row>
365               <entry><option>-i</option></entry>
366               <entry>Empty the import directory list</entry>
367               <entry>dynamic</entry>
368               <entry>-</entry>
369             </row>
370           </tbody>
371         </tgroup>
372       </informaltable>
373     </sect2>
374
375     <sect2>
376       <title>Interface file options</title>
377
378       <para><xref linkend="hi-options"/></para>
379
380       <informaltable>
381         <tgroup cols="4" align="left" colsep="1" rowsep="1">
382           <thead>
383             <row>
384               <entry>Flag</entry>
385
386               <entry>Description</entry>
387               <entry>Static/Dynamic</entry>
388               <entry>Reverse</entry>
389             </row>
390           </thead>
391           <tbody>
392             <row>
393               <entry><option>-ddump-hi</option></entry>
394               <entry>Dump the new interface to stdout</entry>
395               <entry>dynamic</entry>
396               <entry>-</entry>
397             </row>
398             <row>
399               <entry><option>-ddump-hi-diffs</option></entry>
400               <entry>Show the differences vs. the old interface</entry>
401               <entry>dynamic</entry>
402               <entry>-</entry>
403             </row>
404             <row>
405               <entry><option>-ddump-minimal-imports</option></entry>
406               <entry>Dump a minimal set of imports</entry>
407               <entry>dynamic</entry>
408               <entry>-</entry>
409             </row>
410             <row>
411               <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
412               <entry>Read the interface in
413               <replaceable>file</replaceable> and dump it as text to
414               <literal>stdout</literal>.</entry>
415               <entry>mode</entry>
416               <entry>-</entry>
417             </row>
418           </tbody>
419         </tgroup>
420       </informaltable>
421     </sect2>
422     
423     <sect2>
424       <title>Recompilation checking</title>
425
426       <para><xref linkend="recomp"/></para>
427
428       <informaltable>
429         <tgroup cols="4" align="left" colsep="1" rowsep="1">
430           <thead>
431             <row>
432               <entry>Flag</entry>
433
434               <entry>Description</entry>
435               <entry>Static/Dynamic</entry>
436               <entry>Reverse</entry>
437             </row>
438           </thead>
439           <tbody>
440             <row>
441               <entry><option>-fforce-recomp</option></entry>
442               <entry>Turn off recompilation checking; implied by any
443               <option>-ddump-X</option> option</entry>
444               <entry>dynamic</entry>
445               <entry><option>-fno-force-recomp</option></entry>
446             </row>
447           </tbody>
448         </tgroup>
449       </informaltable>
450     </sect2>
451
452     <sect2>
453       <title>Interactive-mode options</title>
454       
455       <para><xref linkend="ghci-dot-files"/></para>
456
457       <informaltable>
458         <tgroup cols="4" align="left" colsep="1" rowsep="1">
459           <thead>
460             <row>
461               <entry>Flag</entry>
462               <entry>Description</entry>
463               <entry>Static/Dynamic</entry>
464               <entry>Reverse</entry>
465             </row>
466           </thead>
467           <tbody>
468             <row>
469               <entry><option>-ignore-dot-ghci</option></entry>
470               <entry>Disable reading of <filename>.ghci</filename> files</entry>
471               <entry>static</entry>
472               <entry>-</entry>
473             </row>
474             <row>
475               <entry><option>-read-dot-ghci</option></entry>
476               <entry>Enable reading of <filename>.ghci</filename> files</entry>
477               <entry>static</entry>
478               <entry>-</entry>
479             </row>
480           </tbody>
481         </tgroup>
482       </informaltable>
483     </sect2>
484
485     <sect2>
486       <title>Packages</title>
487
488       <para><xref linkend="packages"/></para>
489
490       <informaltable>
491         <tgroup cols="4" align="left" colsep="1" rowsep="1">
492           <thead>
493             <row>
494               <entry>Flag</entry>
495               <entry>Description</entry>
496               <entry>Static/Dynamic</entry>
497               <entry>Reverse</entry>
498             </row>
499           </thead>
500           <tbody>
501             <row>
502               <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
503               <entry>Compile to be part of package <replaceable>P</replaceable></entry>
504               <entry>dynamic</entry>
505               <entry>-</entry>
506             </row>
507             <row>
508               <entry><option>-package</option> <replaceable>P</replaceable></entry>
509               <entry>Expose package <replaceable>P</replaceable></entry>
510               <entry>dynamic</entry>
511               <entry>-</entry>
512             </row>
513             <row>
514               <entry><option>-hide-all-packages</option></entry>
515               <entry>Hide all packages by default</entry>
516               <entry>static</entry>
517               <entry>-</entry>
518             </row>
519             <row>
520               <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
521               <entry>Hide package <replaceable>P</replaceable></entry>
522               <entry>dynamic</entry>
523               <entry>-</entry>
524             </row>
525             <row>
526               <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
527               <entry>Ignore package <replaceable>P</replaceable></entry>
528               <entry>dynamic</entry>
529               <entry>-</entry>
530             </row>
531             <row>
532               <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
533               <entry>Load more packages from <replaceable>file</replaceable></entry>
534               <entry>dynamic</entry>
535               <entry>-</entry>
536             </row>
537             <row>
538               <entry><option>-no-user-package-conf</option></entry>
539               <entry>Don't load the user's package config file.</entry>
540               <entry>dynamic</entry>
541               <entry>-</entry>
542             </row>
543           </tbody>
544         </tgroup>
545       </informaltable>
546     </sect2>
547
548     <sect2>
549       <title>Language options</title>
550
551       <para><xref linkend="options-language"/></para>
552
553       <informaltable>
554         <tgroup cols="4" align="left" colsep="1" rowsep="1">
555           <thead>
556             <row>
557               <entry>Flag</entry>
558               <entry>Description</entry>
559               <entry>Static/Dynamic</entry>
560               <entry>Reverse</entry>
561             </row>
562           </thead>
563           <tbody>
564             <row>
565               <entry><option>-fallow-overlapping-instances</option></entry>
566               <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
567               <entry>dynamic</entry>
568               <entry><option>-fno-allow-overlapping-instances</option></entry>
569             </row>
570             <row>
571               <entry><option>-fallow-incoherent-instances</option></entry>
572               <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.  
573               Implies <option>-fallow-overlapping-instances</option> </entry>
574               <entry>dynamic</entry>
575               <entry><option>-fno-allow-incoherent-instances</option></entry>
576             </row>
577             <row>
578               <entry><option>-fallow-undecidable-instances</option></entry>
579               <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
580               <entry>dynamic</entry>
581               <entry><option>-fno-allow-undecidable-instances</option></entry>
582             </row>
583             <row>
584               <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
585               <entry>set the <link linkend="undecidable-instances">limit for context reduction</link></entry>
586               <entry>dynamic</entry>
587               <entry><option>20</option></entry>
588             </row>
589             <row>
590               <entry><option>-farrows</option></entry>
591               <entry>Enable <link linkend="arrow-notation">arrow
592               notation</link> extension</entry>
593               <entry>dynamic</entry>
594               <entry><option>-fno-arrows</option></entry>
595             </row>
596             <row>
597               <entry><option>-ffi</option> or <option>-fffi</option></entry>
598               <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
599               <option>-fglasgow-exts</option>)</entry>
600               <entry>dynamic</entry>
601               <entry><option>-fno-ffi</option></entry>
602             </row>
603             <row>
604               <entry><option>-fgenerics</option></entry>
605               <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
606               <entry>dynamic</entry>
607               <entry><option>-fno-fgenerics</option></entry>
608             </row>
609             <row>
610               <entry><option>-fglasgow-exts</option></entry>
611               <entry>Enable most language extensions</entry>
612               <entry>dynamic</entry>
613               <entry><option>-fno-glasgow-exts</option></entry>
614             </row>
615             <row>
616               <entry><option>-fimplicit-params</option></entry>
617               <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
618               Implied by <option>-fglasgow-exts</option>.</entry>
619               <entry>dynamic</entry>
620               <entry><option>-fno-implicit-params</option></entry>
621             </row>
622             <row>
623               <entry><option>-firrefutable-tuples</option></entry>
624               <entry>Make tuple pattern matching irrefutable</entry>
625               <entry>dynamic</entry>
626               <entry><option>-fno-irrefutable-tuples</option></entry>
627             </row>
628             <row>
629               <entry><option>-fno-implicit-prelude</option></entry>
630               <entry>Don't implicitly <literal>import Prelude</literal></entry>
631               <entry>dynamic</entry>
632               <entry><option>-fimplicit-prelude</option></entry>
633             </row>
634             <row>
635               <entry><option>-fno-monomorphism-restriction</option></entry>
636               <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
637               <entry>dynamic</entry>
638               <entry><option>-fmonomorphism-restriction</option></entry>
639             </row>
640             <row>
641               <entry><option>-fno-mono-pat-binds</option></entry>
642               <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
643               <entry>dynamic</entry>
644               <entry><option>-fmono-pat-binds</option></entry>
645             </row>
646             <row>
647               <entry><option>-fextended-default-rules</option></entry>
648               <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
649               <entry>dynamic</entry>
650               <entry><option>-fno-extended-default-rules</option></entry>
651             </row>
652             <row>
653               <entry><option>-fscoped-type-variables</option></entry>
654               <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
655               Implied by <option>-fglasgow-exts</option>.</entry>
656               <entry>dynamic</entry>
657               <entry><option>-fno-scoped-type-variables</option></entry>
658             </row>
659             <row>
660               <entry><option>-fth</option></entry>
661               <entry>Enable <link linkend="template-haskell">Template Haskell</link>. 
662                 No longer implied by <option>-fglasgow-exts</option>.</entry>
663               <entry>dynamic</entry>
664               <entry><option>-fno-th</option></entry>
665             </row>
666             <row>
667               <entry><option>-fbang-patterns</option></entry>
668               <entry>Enable <link linkend="sec-bang-patterns">bang patterns</link>.</entry>
669               <entry>dynamic</entry>
670               <entry><option>-fno-bang-patterns</option></entry>
671             </row>
672           </tbody>
673         </tgroup>
674       </informaltable>
675     </sect2>
676
677     <sect2>
678       <title>Warnings</title>
679       
680       <para><xref linkend="options-sanity"/></para>
681
682     <informaltable>
683       <tgroup cols="4" align="left" colsep="1" rowsep="1">
684         <thead>
685           <row>
686             <entry>Flag</entry>
687             <entry>Description</entry>
688             <entry>Static/Dynamic</entry>
689             <entry>Reverse</entry>
690           </row>
691         </thead>
692         <tbody>
693           <row>
694             <entry><option>-W</option></entry>
695             <entry>enable normal warnings</entry>
696             <entry>dynamic</entry>
697             <entry><option>-w</option></entry>
698           </row>
699           <row>
700             <entry><option>-w</option></entry>
701             <entry>disable all warnings</entry>
702             <entry>dynamic</entry>
703             <entry>-</entry>
704           </row>
705           <row>
706             <entry><option>-Wall</option></entry>
707             <entry>enable all warnings</entry>
708             <entry>dynamic</entry>
709             <entry><option>-w</option></entry>
710           </row>
711           <row>
712             <entry><option>-Werror</option></entry>
713             <entry>make warnings fatal</entry>
714             <entry>dynamic</entry>
715             <entry></entry>
716           </row>
717
718           <row>
719             <entry><option>-fwarn-deprecations</option></entry>
720             <entry>warn about uses of functions &amp; types that are deprecated</entry>
721             <entry>dynamic</entry>
722             <entry><option>-fno-warn-deprecations</option></entry>
723           </row>
724
725           <row>
726             <entry><option>-fwarn-duplicate-exports</option></entry>
727             <entry>warn when an entity is exported multiple times</entry>
728             <entry>dynamic</entry>
729             <entry><option>-fno-warn-duplicate-exports</option></entry>
730           </row>
731
732           <row>
733             <entry><option>-fwarn-hi-shadowing</option></entry>
734             <entry>warn when a <literal>.hi</literal> file in the
735             current directory shadows a library</entry>
736             <entry>dynamic</entry>
737             <entry><option>-fno-warn-hi-shadowing</option></entry>
738           </row>
739
740           <row>
741             <entry><option>-fwarn-incomplete-patterns</option></entry>
742             <entry>warn when a pattern match could fail</entry>
743             <entry>dynamic</entry>
744             <entry><option>-fno-warn-incomplete-patterns</option></entry>
745           </row>
746
747           <row>
748             <entry><option>-fwarn-incomplete-record-updates</option></entry>
749             <entry>warn when a record update could fail</entry>
750             <entry>dynamic</entry>
751             <entry><option>-fno-warn-incomplete-record-updates</option></entry>
752           </row>
753
754           <row>
755             <entry><option>-fwarn-missing-fields</option></entry>
756             <entry>warn when fields of a record are uninitialised</entry>
757             <entry>dynamic</entry>
758             <entry><option>-fno-warn-missing-fields</option></entry>
759           </row>
760
761           <row>
762             <entry><option>-fwarn-missing-methods</option></entry>
763             <entry>warn when class methods are undefined</entry>
764             <entry>dynamic</entry>
765             <entry><option>-fno-warn-missing-methods</option></entry>
766           </row>
767
768           <row>
769             <entry><option>-fwarn-missing-signatures</option></entry>
770             <entry>warn about top-level functions without signatures</entry>
771             <entry>dynamic</entry>
772             <entry><option>-fno-warn-missing-signatures</option></entry>
773           </row>
774
775           <row>
776             <entry><option>-fwarn-name-shadowing</option></entry>
777             <entry>warn when names are shadowed</entry>
778             <entry>dynamic</entry>
779             <entry><option>-fno-warn-name-shadowing</option></entry>
780           </row>
781
782           <row>
783             <entry><option>-fwarn-orphans</option></entry>
784             <entry>warn when the module contains "orphan" instance declarations
785             or rewrite rules</entry>
786             <entry>dynamic</entry>
787             <entry><option>-fno-warn-orphans</option></entry>
788           </row>
789
790           <row>
791             <entry><option>-fwarn-overlapping-patterns</option></entry>
792             <entry>warn about overlapping patterns</entry>
793             <entry>dynamic</entry>
794             <entry><option>-fno-warn-overlapping-patterns</option></entry>
795           </row>
796
797           <row>
798             <entry><option>-fwarn-simple-patterns</option></entry>
799             <entry>warn about lambda-patterns that can fail</entry>
800             <entry>dynamic</entry>
801             <entry><option>-fno-warn-simple-patterns</option></entry>
802           </row>
803
804           <row>
805             <entry><option>-fwarn-type-defaults</option></entry>
806             <entry>warn when defaulting happens</entry>
807             <entry>dynamic</entry>
808             <entry><option>-fno-warn-type-defaults</option></entry>
809           </row>
810
811           <row>
812             <entry><option>-fwarn-unused-binds</option></entry>
813             <entry>warn about bindings that are unused</entry>
814             <entry>dynamic</entry>
815             <entry><option>-fno-warn-unused-binds</option></entry>
816           </row>
817
818           <row>
819             <entry><option>-fwarn-unused-imports</option></entry>
820             <entry>warn about unnecessary imports</entry>
821             <entry>dynamic</entry>
822             <entry><option>-fno-warn-unused-imports</option></entry>
823           </row>
824
825           <row>
826             <entry><option>-fwarn-unused-matches</option></entry>
827             <entry>warn about variables in patterns that aren't used</entry>
828             <entry>dynamic</entry>
829             <entry><option>-fno-warn-unused-matches</option></entry>
830           </row>
831
832           </tbody>
833         </tgroup>
834       </informaltable>
835
836     </sect2>
837     <sect2>
838       <title>Optimisation levels</title>
839
840       <para><xref linkend="options-optimise"/></para>
841
842       <informaltable>
843         <tgroup cols="4" align="left" colsep="1" rowsep="1">
844           <thead>
845             <row>
846               <entry>Flag</entry>
847               <entry>Description</entry>
848               <entry>Static/Dynamic</entry>
849               <entry>Reverse</entry>
850             </row>
851           </thead>
852           <tbody>
853             <row>
854               <entry><option>-O</option></entry>
855               <entry>Enable default optimisation (level 1)</entry>
856               <entry>dynamic</entry>
857               <entry><option>-O0</option></entry>
858             </row>
859             <row>
860               <entry><option>-O</option><replaceable>n</replaceable></entry>
861               <entry>Set optimisation level <replaceable>n</replaceable></entry>
862               <entry>dynamic</entry>
863               <entry><option>-O0</option></entry>
864             </row>
865           </tbody>
866         </tgroup>
867       </informaltable>
868               
869     </sect2>
870     <sect2>
871       <title>Individual optimisations</title>
872
873       <para><xref linkend="options-f"/></para>
874
875       <informaltable>
876         <tgroup cols="4" align="left" colsep="1" rowsep="1">
877           <thead>
878             <row>
879               <entry>Flag</entry>
880               <entry>Description</entry>
881               <entry>Static/Dynamic</entry>
882               <entry>Reverse</entry>
883             </row>
884           </thead>
885           <tbody>
886             <row>
887               <entry><option>-fcase-merge</option></entry>
888               <entry>Enable case-merging</entry>
889               <entry>dynamic</entry>
890               <entry><option>-fno-case-merge</option></entry>
891             </row>
892
893             <row>
894               <entry><option>-fdicts-strict</option></entry>
895               <entry>Make dictionaries strict</entry>
896               <entry>static</entry>
897               <entry><option>-fno-dicts-strict</option></entry>
898             </row>
899
900             <row>
901               <entry><option>-fdo-eta-reduction</option></entry>
902               <entry>Enable eta-reduction</entry>
903               <entry>dynamic</entry>
904               <entry><option>-fno-do-eta-reduction</option></entry>
905             </row>
906
907             <row>
908               <entry><option>-fdo-lambda-eta-expansion</option></entry>
909               <entry>Enable lambda eta-reduction</entry>
910               <entry>dynamic</entry>
911               <entry><option>-fno-do-lambda-eta-expansion</option></entry>
912             </row>
913
914             <row>
915               <entry><option>-fexcess-precision</option></entry>
916               <entry>Enable excess intermediate precision</entry>
917               <entry>dynamic</entry>
918               <entry><option>-fno-excess-precision</option></entry>
919             </row>
920
921             <row>
922               <entry><option>-frules-off</option></entry>
923               <entry>Switch off all rewrite rules (including rules
924               generated by automatic specialisation of overloaded functions)</entry>
925               <entry>static</entry>
926               <entry><option>-frules-off</option></entry>
927             </row>
928
929             <row>
930               <entry><option>-fignore-asserts</option></entry>
931               <entry>Ignore assertions in the source</entry>
932               <entry>dynamic</entry>
933               <entry><option>-fno-ignore-asserts</option></entry>
934             </row>
935
936             <row>
937               <entry><option>-fignore-interface-pragmas</option></entry>
938               <entry>Ignore pragmas in interface files</entry>
939               <entry>dynamic</entry>
940               <entry><option>-fno-ignore-interface-pragmas</option></entry>
941             </row>
942
943             <row>
944               <entry><option>-fliberate-case-threshold</option></entry>
945               <entry>Tweak the liberate-case optimisation (default: 10)</entry>
946               <entry>static</entry>
947               <entry><option>-fno-liberate-case-threshold</option></entry>
948             </row>
949
950             <row>
951               <entry><option>-fomit-interface-pragmas</option></entry>
952               <entry>Don't generate interface pragmas</entry>
953               <entry>dynamic</entry>
954               <entry><option>-fno-omit-interface-pragmas</option></entry>
955             </row>
956
957             <row>
958               <entry><option>-fmax-worker-args</option></entry>
959               <entry>If a worker has that many arguments, none will be
960                 unpacked anymore (default: 10)</entry>
961               <entry>static</entry>
962               <entry>-</entry>
963             </row>
964
965             <row>
966               <entry><option>-fmax-simplifier-iterations</option></entry>
967               <entry>Set the max iterations for the simplifier</entry>
968               <entry>dynamic</entry>
969               <entry>-</entry>
970             </row>
971
972             <row>
973               <entry><option>-fno-state-hack</option></entry>
974               <entry>Turn off the "state hack" whereby any lambda with a real-world state token
975               as argument is considered to be single-entry.  Hence OK to inline things inside it.</entry>
976               <entry>static</entry>
977               <entry>-</entry>
978             </row>
979
980             <row>
981               <entry><option>-fno-cse</option></entry>
982               <entry>Turn off common sub-expression</entry>
983               <entry>dynamic</entry>
984               <entry>-</entry>
985             </row>
986
987             <row>
988               <entry><option>-fno-full-laziness</option></entry>
989               <entry>Turn off full laziness (floating bindings outwards).</entry>
990               <entry>dynamic</entry>
991               <entry>-ffull-laziness</entry>
992             </row>
993
994             <row>
995               <entry><option>-fno-pre-inlining</option></entry>
996               <entry>Turn off pre-inlining</entry>
997               <entry>static</entry>
998               <entry>-</entry>
999             </row>
1000
1001             <row>
1002               <entry><option>-fno-strictness</option></entry>
1003               <entry>Turn off strictness analysis</entry>
1004               <entry>dynamic</entry>
1005               <entry>-</entry>
1006             </row>
1007
1008             <row>
1009               <entry><option>-funbox-strict-fields</option></entry>
1010               <entry>Flatten strict constructor fields</entry>
1011               <entry>dynamic</entry>
1012               <entry><option>-fno-unbox-strict-fields</option></entry>
1013             </row>
1014
1015             <row>
1016               <entry><option>-funfolding-creation-threshold</option></entry>
1017               <entry>Tweak unfolding settings</entry>
1018               <entry>static</entry>
1019               <entry><option>-fno-unfolding-creation-threshold</option></entry>
1020             </row>
1021
1022             <row>
1023               <entry><option>-funfolding-fun-discount</option></entry>
1024               <entry>Tweak unfolding settings</entry>
1025               <entry>static</entry>
1026               <entry><option>-fno-unfolding-fun-discount</option></entry>
1027             </row>
1028
1029             <row>
1030               <entry><option>-funfolding-keeness-factor</option></entry>
1031               <entry>Tweak unfolding settings</entry>
1032               <entry>static</entry>
1033               <entry><option>-fno-unfolding-keeness-factor</option></entry>
1034             </row>
1035
1036             <row>
1037               <entry><option>-funfolding-update-in-place</option></entry>
1038               <entry>Tweak unfolding settings</entry>
1039               <entry>static</entry>
1040               <entry><option>-fno-unfolding-update-in-place</option></entry>
1041             </row>
1042
1043             <row>
1044               <entry><option>-funfolding-use-threshold</option></entry>
1045               <entry>Tweak unfolding settings</entry>
1046               <entry>static</entry>
1047               <entry><option>-fno-unfolding-use-threshold</option></entry>
1048             </row>
1049           </tbody>
1050         </tgroup>
1051       </informaltable>
1052     </sect2>
1053
1054     <sect2>
1055       <title>Profiling options</title>
1056       
1057       <para><xref linkend="profiling"/></para>
1058
1059       <informaltable>
1060         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1061           <thead>
1062             <row>
1063               <entry>Flag</entry>
1064               <entry>Description</entry>
1065               <entry>Static/Dynamic</entry>
1066               <entry>Reverse</entry>
1067             </row>
1068           </thead>
1069           <tbody>
1070             <row>
1071               <entry><option>-auto</option></entry>
1072               <entry>Auto-add <literal>_scc_</literal>s to all
1073               exported functions</entry>
1074               <entry>static</entry>
1075               <entry><option>-no-auto</option></entry>
1076             </row>
1077             <row>
1078               <entry><option>-auto-all</option></entry>
1079               <entry>Auto-add <literal>_scc_</literal>s to all
1080               top-level functions</entry>
1081               <entry>static</entry>
1082               <entry><option>-no-auto-all</option></entry>
1083             </row>
1084             <row>
1085               <entry><option>-caf-all</option></entry>
1086               <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1087               <entry>static</entry>
1088               <entry><option>-no-caf-all</option></entry>
1089             </row>
1090             <row>
1091               <entry><option>-prof</option></entry>
1092               <entry>Turn on profiling</entry>
1093               <entry>static</entry>
1094               <entry>-</entry>
1095             </row>
1096             <row>
1097               <entry><option>-ticky</option></entry>
1098               <entry>Turn on ticky-ticky profiling</entry>
1099               <entry>static</entry>
1100               <entry>-</entry>
1101             </row>
1102           </tbody>
1103         </tgroup>
1104       </informaltable>
1105     </sect2>
1106
1107     <sect2>
1108       <title>Haskell pre-processor options</title>
1109
1110       <para><xref linkend="pre-processor"/></para>
1111
1112       <informaltable>
1113         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1114           <thead>
1115             <row>
1116               <entry>Flag</entry>
1117               <entry>Description</entry>
1118               <entry>Static/Dynamic</entry>
1119               <entry>Reverse</entry>
1120             </row>
1121           </thead>
1122           <tbody>
1123             <row>
1124               <entry><option>-F</option></entry>
1125               <entry>
1126                   Enable the use of a pre-processor
1127                   (set with <option>-pgmF</option>)
1128               </entry>
1129               <entry>dynamic</entry>
1130               <entry>-</entry>
1131             </row>
1132           </tbody>
1133         </tgroup>
1134       </informaltable>
1135     </sect2>
1136
1137     <sect2>
1138       <title>C pre-processor options</title>
1139
1140       <para><xref linkend="c-pre-processor"/></para>
1141
1142       <informaltable>
1143         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1144           <thead>
1145             <row>
1146               <entry>Flag</entry>
1147               <entry>Description</entry>
1148               <entry>Static/Dynamic</entry>
1149               <entry>Reverse</entry>
1150             </row>
1151           </thead>
1152           <tbody>
1153             <row>
1154               <entry><option>-cpp</option></entry>
1155               <entry>Run the C pre-processor on Haskell source files</entry>
1156               <entry>dynamic</entry>
1157               <entry>-</entry>
1158             </row>
1159             <row>
1160               <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1161               <entry>Define a symbol in the C pre-processor</entry>
1162               <entry>dynamic</entry>
1163               <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1164             </row>
1165             <row>
1166               <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1167               <entry>Undefine a symbol in the C pre-processor</entry>
1168               <entry>dynamic</entry>
1169               <entry>-</entry>
1170             </row>
1171             <row>
1172               <entry><option>-I</option><replaceable>dir</replaceable></entry>
1173               <entry>Add <replaceable>dir</replaceable> to the
1174               directory search list for <literal>#include</literal> files</entry>
1175               <entry>dynamic</entry>
1176               <entry>-</entry>
1177             </row>
1178           </tbody>
1179         </tgroup>
1180       </informaltable>
1181     </sect2>
1182
1183     <sect2>
1184       <title>C compiler options</title>
1185
1186       <para><xref linkend="options-C-compiler"/></para>
1187       <informaltable>
1188         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1189           <thead>
1190             <row>
1191               <entry>Flag</entry>
1192               <entry>Description</entry>
1193               <entry>Static/Dynamic</entry>
1194               <entry>Reverse</entry>
1195             </row>
1196           </thead>
1197           <tbody>
1198             <row>
1199               <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1200               <entry>Include <replaceable>file</replaceable> when
1201               compiling the <filename>.hc</filename> file</entry>
1202               <entry>dynamic</entry>
1203               <entry>-</entry>
1204             </row>
1205           </tbody>
1206         </tgroup>
1207       </informaltable>
1208     </sect2>
1209
1210     <sect2>
1211       <title>Code generation options</title>
1212
1213       <para><xref linkend="options-codegen"/></para>
1214
1215       <informaltable>
1216         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1217           <thead>
1218             <row>
1219               <entry>Flag</entry>
1220               <entry>Description</entry>
1221               <entry>Static/Dynamic</entry>
1222               <entry>Reverse</entry>
1223             </row>
1224           </thead>
1225           <tbody>
1226             <row>
1227               <entry><option>-fasm</option></entry>
1228               <entry>Use the native code generator</entry>
1229               <entry>dynamic</entry>
1230               <entry>-fvia-C</entry>
1231             </row>
1232             <row>
1233               <entry><option>-fvia-C</option></entry>
1234               <entry>Compile via C</entry>
1235               <entry>dynamic</entry>
1236               <entry>-fasm</entry>
1237             </row>
1238             <row>
1239               <entry><option>-fno-code</option></entry>
1240               <entry>Omit code generation</entry>
1241               <entry>mode</entry>
1242               <entry>-</entry>
1243             </row>
1244           </tbody>
1245         </tgroup>
1246       </informaltable>
1247     </sect2>
1248
1249     <sect2>
1250       <title>Linking options</title>
1251
1252       <para><xref linkend="options-linker"/></para>
1253
1254       <informaltable>
1255         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1256           <thead>
1257             <row>
1258               <entry>Flag</entry>
1259               <entry>Description</entry>
1260               <entry>Static/Dynamic</entry>
1261               <entry>Reverse</entry>
1262             </row>
1263           </thead>
1264           <tbody>
1265             <row>
1266               <entry><option>-fPIC</option></entry>
1267               <entry>Generate position-independent code (where available)</entry>
1268               <entry>static</entry>
1269               <entry>-</entry>
1270             </row>
1271             <row>
1272               <entry><option>-dynamic</option></entry>
1273               <entry>Use dynamic Haskell libraries (if available)</entry>
1274               <entry>static</entry>
1275               <entry>-</entry>
1276             </row>
1277             <row>
1278               <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1279               <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1280                 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1281               <entry>dynamic</entry>
1282               <entry>-</entry>
1283             </row>
1284             <row>
1285               <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1286               <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1287                 directories searched for frameworks.
1288                 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1289               <entry>dynamic</entry>
1290               <entry>-</entry>
1291             </row>
1292             <row>
1293               <entry><option>-l</option><replaceable>lib</replaceable></entry>
1294               <entry>Link in library <replaceable>lib</replaceable></entry>
1295               <entry>dynamic</entry>
1296               <entry>-</entry>
1297             </row>
1298             <row>
1299               <entry><option>-L</option><replaceable>dir</replaceable></entry>
1300               <entry>Add <replaceable>dir</replaceable> to the list of
1301               directories searched for libraries</entry>
1302               <entry>dynamic</entry>
1303               <entry>-</entry>
1304             </row>
1305             <row>
1306               <entry><option>-main-is</option></entry>
1307               <entry>Set main function</entry>
1308               <entry>dynamic</entry>
1309               <entry>-</entry>
1310             </row>
1311             <row>
1312               <entry><option>--mk-dll</option></entry>
1313               <entry>DLL-creation mode (Windows only)</entry>
1314               <entry>dynamic</entry>
1315               <entry>-</entry>
1316             </row>
1317             <row>
1318               <entry><option>-no-hs-main</option></entry>
1319               <entry>Don't assume this program contains <literal>main</literal></entry>
1320               <entry>dynamic</entry>
1321               <entry>-</entry>
1322             </row>
1323             <row>
1324               <entry><option>-no-link</option></entry>
1325               <entry>Omit linking</entry>
1326               <entry>dynamic</entry>
1327               <entry>-</entry>
1328             </row>
1329             <row>
1330               <entry><option>-split-objs</option></entry>
1331               <entry>Split objects (for libraries)</entry>
1332               <entry>dynamic</entry>
1333               <entry>-</entry>
1334             </row>
1335             <row>
1336               <entry><option>-static</option></entry>
1337               <entry>Use static Haskell libraries</entry>
1338               <entry>static</entry>
1339               <entry>-</entry>
1340             </row>
1341             <row>
1342               <entry><option>-threaded</option></entry>
1343               <entry>Use the threaded runtime</entry>
1344               <entry>static</entry>
1345               <entry>-</entry>
1346             </row>
1347             <row>
1348               <entry><option>-debug</option></entry>
1349               <entry>Use the debugging runtime</entry>
1350               <entry>static</entry>
1351               <entry>-</entry>
1352             </row>
1353           </tbody>
1354         </tgroup>
1355       </informaltable>
1356     </sect2>
1357
1358     <sect2>
1359       <title>Replacing phases</title>
1360
1361       <para><xref linkend="replacing-phases"/></para>
1362
1363       <informaltable>
1364         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1365           <thead>
1366             <row>
1367               <entry>Flag</entry>
1368               <entry>Description</entry>
1369               <entry>Static/Dynamic</entry>
1370               <entry>Reverse</entry>
1371             </row>
1372           </thead>
1373           <tbody>
1374             <row>
1375               <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1376               <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1377               <entry>dynamic</entry>
1378               <entry>-</entry>
1379             </row>
1380             <row>
1381               <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1382               <entry>Use <replaceable>cmd</replaceable> as the C
1383               pre-processor (with <option>-cpp</option> only)</entry>
1384               <entry>dynamic</entry>
1385               <entry>-</entry>
1386             </row>
1387             <row>
1388               <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1389               <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1390               <entry>dynamic</entry>
1391               <entry>-</entry>
1392             </row>
1393             <row>
1394               <entry><option>-pgmm</option> <replaceable>cmd</replaceable></entry>
1395               <entry>Use <replaceable>cmd</replaceable> as the mangler</entry>
1396               <entry>dynamic</entry>
1397               <entry>-</entry>
1398             </row>
1399             <row>
1400               <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
1401               <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
1402               <entry>dynamic</entry>
1403               <entry>-</entry>
1404             </row>
1405             <row>
1406               <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1407               <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1408               <entry>dynamic</entry>
1409               <entry>-</entry>
1410             </row>
1411             <row>
1412               <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1413               <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1414               <entry>dynamic</entry>
1415               <entry>-</entry>
1416             </row>
1417             <row>
1418               <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1419               <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1420               <entry>dynamic</entry>
1421               <entry>-</entry>
1422             </row>
1423             <row>
1424               <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1425               <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1426               (with <option>-F</option> only)</entry>
1427               <entry>dynamic</entry>
1428               <entry>-</entry>
1429             </row>
1430           </tbody>
1431         </tgroup>
1432       </informaltable>
1433       <indexterm><primary><option>-pgmL</option></primary></indexterm>
1434       <indexterm><primary><option>-pgmP</option></primary></indexterm>
1435       <indexterm><primary><option>-pgmc</option></primary></indexterm>
1436       <indexterm><primary><option>-pgma</option></primary></indexterm>
1437       <indexterm><primary><option>-pgml</option></primary></indexterm>
1438       <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1439       <indexterm><primary><option>-pgmF</option></primary></indexterm>
1440
1441     </sect2>
1442
1443     <sect2>
1444       <title>Forcing options to particular phases</title>
1445
1446       <para><xref linkend="forcing-options-through"/></para>
1447
1448       <informaltable>
1449         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1450           <thead>
1451             <row>
1452               <entry>Flag</entry>
1453               <entry>Description</entry>
1454               <entry>Static/Dynamic</entry>
1455               <entry>Reverse</entry>
1456             </row>
1457           </thead>
1458           <tbody>
1459             <row>
1460               <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1461               <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1462               <entry>dynamic</entry>
1463               <entry>-</entry>
1464             </row>
1465             <row>
1466               <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1467               <entry>pass <replaceable>option</replaceable> to cpp (with
1468               <option>-cpp</option> only)</entry>
1469               <entry>dynamic</entry>
1470               <entry>-</entry>
1471             </row>
1472             <row>
1473               <entry><option>-optF</option> <replaceable>option</replaceable></entry>
1474               <entry>pass <replaceable>option</replaceable> to the
1475               custom pre-processor</entry>
1476               <entry>dynamic</entry>
1477               <entry>-</entry>
1478             </row>
1479             <row>
1480               <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1481               <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1482               <entry>dynamic</entry>
1483               <entry>-</entry>
1484             </row>
1485             <row>
1486               <entry><option>-optm</option> <replaceable>option</replaceable></entry>
1487               <entry>pass <replaceable>option</replaceable> to the mangler</entry>
1488               <entry>dynamic</entry>
1489               <entry>-</entry>
1490             </row>
1491             <row>
1492               <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1493               <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1494               <entry>dynamic</entry>
1495               <entry>-</entry>
1496             </row>
1497             <row>
1498               <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1499               <entry>pass <replaceable>option</replaceable> to the linker</entry>
1500               <entry>dynamic</entry>
1501               <entry>-</entry>
1502             </row>
1503             <row>
1504               <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1505               <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1506               <entry>dynamic</entry>
1507               <entry>-</entry>
1508             </row>
1509             <row>
1510               <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1511               <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1512               <entry>dynamic</entry>
1513               <entry>-</entry>
1514             </row>
1515           </tbody>
1516         </tgroup>
1517       </informaltable>
1518     </sect2>
1519
1520     <sect2>
1521       <title>Platform-specific options</title>
1522       
1523       <para><xref linkend="options-platform"/></para>
1524
1525       <informaltable>
1526         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1527           <thead>
1528             <row>
1529               <entry>Flag</entry>
1530               <entry>Description</entry>
1531               <entry>Static/Dynamic</entry>
1532               <entry>Reverse</entry>
1533             </row>
1534           </thead>
1535           <tbody>
1536             <row>
1537               <entry><option>-monly-[432]-regs</option></entry>
1538               <entry>(x86 only) give some registers back to the C compiler</entry>
1539               <entry>dynamic</entry>
1540               <entry>-</entry>
1541             </row>
1542           </tbody>
1543         </tgroup>
1544       </informaltable>
1545     </sect2>
1546
1547          
1548     <sect2>
1549       <title>External core file options</title>
1550
1551       <para><xref linkend="ext-core"/></para>
1552
1553       <informaltable>
1554         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1555           <thead>
1556             <row>
1557               <entry>Flag</entry>
1558               <entry>Description</entry>
1559               <entry>Static/Dynamic</entry>
1560               <entry>Reverse</entry>
1561             </row>
1562           </thead>
1563           <tbody>
1564             <row>
1565               <entry><option>-fext-core</option></entry>
1566               <entry>Generate <filename>.hcr</filename> external Core files</entry>
1567               <entry>static</entry>
1568               <entry>-</entry>
1569             </row>
1570           </tbody>
1571         </tgroup>
1572       </informaltable>
1573     </sect2>
1574
1575
1576     <sect2>
1577       <title>Compiler debugging options</title>
1578
1579       <para><xref linkend="options-debugging"/></para>
1580
1581       <informaltable>
1582         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1583           <thead>
1584             <row>
1585               <entry>Flag</entry>
1586               <entry>Description</entry>
1587               <entry>Static/Dynamic</entry>
1588               <entry>Reverse</entry>
1589             </row>
1590           </thead>
1591           <tbody>
1592             <row>
1593               <entry><option>-dcore-lint</option></entry>
1594               <entry>Turn on internal sanity checking</entry>
1595               <entry>dynamic</entry>
1596               <entry>-</entry>
1597             </row>
1598             <row>
1599               <entry><option>-ddump-asm</option></entry>
1600               <entry>Dump assembly</entry>
1601               <entry>dynamic</entry>
1602               <entry>-</entry>
1603             </row>
1604             <row>
1605               <entry><option>-ddump-bcos</option></entry>
1606               <entry>Dump interpreter byte code</entry>
1607               <entry>dynamic</entry>
1608               <entry>-</entry>
1609             </row>
1610             <row>
1611               <entry><option>-ddump-cmm</option></entry>
1612               <entry>Dump C-- output</entry>
1613               <entry>dynamic</entry>
1614               <entry>-</entry>
1615             </row>
1616             <row>
1617               <entry><option>-ddump-cpranal</option></entry>
1618               <entry>Dump output from CPR analysis</entry>
1619               <entry>dynamic</entry>
1620               <entry>-</entry>
1621             </row>
1622             <row>
1623               <entry><option>-ddump-cse</option></entry>
1624               <entry>Dump CSE output</entry>
1625               <entry>dynamic</entry>
1626               <entry>-</entry>
1627             </row>
1628             <row>
1629               <entry><option>-ddump-deriv</option></entry>
1630               <entry>Dump deriving output</entry>
1631               <entry>dynamic</entry>
1632               <entry>-</entry>
1633             </row>
1634             <row>
1635               <entry><option>-ddump-ds</option></entry>
1636               <entry>Dump desugarer output</entry>
1637               <entry>dynamic</entry>
1638               <entry>-</entry>
1639             </row>
1640             <row>
1641               <entry><option>-ddump-flatC</option></entry>
1642               <entry>Dump &ldquo;flat&rdquo; C</entry>
1643               <entry>dynamic</entry>
1644               <entry>-</entry>
1645             </row>
1646             <row>
1647               <entry><option>-ddump-foreign</option></entry>
1648               <entry>Dump <literal>foreign export</literal> stubs</entry>
1649               <entry>dynamic</entry>
1650               <entry>-</entry>
1651             </row>
1652             <row>
1653               <entry><option>-ddump-inlinings</option></entry>
1654               <entry>Dump inlining info</entry>
1655               <entry>dynamic</entry>
1656               <entry>-</entry>
1657             </row>
1658             <row>
1659               <entry><option>-ddump-occur-anal</option></entry>
1660               <entry>Dump occurrence analysis output</entry>
1661               <entry>dynamic</entry>
1662               <entry>-</entry>
1663             </row>
1664             <row>
1665               <entry><option>-ddump-opt-cmm</option></entry>
1666               <entry>Dump the results of C-- to C-- optimising passes</entry>
1667               <entry>dynamic</entry>
1668               <entry>-</entry>
1669             </row>
1670             <row>
1671               <entry><option>-ddump-parsed</option></entry>
1672               <entry>Dump parse tree</entry>
1673               <entry>dynamic</entry>
1674               <entry>-</entry>
1675             </row>
1676             <row>
1677               <entry><option>-ddump-prep</option></entry>
1678               <entry>Dump prepared core</entry>
1679               <entry>dynamic</entry>
1680               <entry>-</entry>
1681             </row>
1682             <row>
1683               <entry><option>-ddump-rn</option></entry>
1684               <entry>Dump renamer output</entry>
1685               <entry>dynamic</entry>
1686               <entry>-</entry>
1687             </row>
1688             <row>
1689               <entry><option>-ddump-rules</option></entry>
1690               <entry>Dump rules</entry>
1691               <entry>dynamic</entry>
1692               <entry>-</entry>
1693             </row>
1694             <row>
1695               <entry><option>-ddump-simpl</option></entry>
1696               <entry>Dump final simplifier output</entry>
1697               <entry>dynamic</entry>
1698               <entry>-</entry>
1699             </row>
1700             <row>
1701               <entry><option>-ddump-simpl-iterations</option></entry>
1702               <entry>Dump output from each simplifier iteration</entry>
1703               <entry>dynamic</entry>
1704               <entry>-</entry>
1705             </row>
1706             <row>
1707               <entry><option>-ddump-spec</option></entry>
1708               <entry>Dump specialiser output</entry>
1709               <entry>dynamic</entry>
1710               <entry>-</entry>
1711             </row>
1712             <row>
1713               <entry><option>-ddump-splices</option></entry>
1714               <entry>Dump TH splided expressions, and what they evaluate to</entry>
1715               <entry>dynamic</entry>
1716               <entry>-</entry>
1717             </row>
1718             <row>
1719               <entry><option>-ddump-stg</option></entry>
1720               <entry>Dump final STG</entry>
1721               <entry>dynamic</entry>
1722               <entry>-</entry>
1723             </row>
1724             <row>
1725               <entry><option>-ddump-stranal</option></entry>
1726               <entry>Dump strictness analyser output</entry>
1727               <entry>dynamic</entry>
1728               <entry>-</entry>
1729             </row>
1730             <row>
1731               <entry><option>-ddump-tc</option></entry>
1732               <entry>Dump typechecker output</entry>
1733               <entry>dynamic</entry>
1734               <entry>-</entry>
1735             </row>
1736             <row>
1737               <entry><option>-ddump-types</option></entry>
1738               <entry>Dump type signatures</entry>
1739               <entry>dynamic</entry>
1740               <entry>-</entry>
1741             </row>
1742             <row>
1743               <entry><option>-ddump-worker-wrapper</option></entry>
1744               <entry>Dump worker-wrapper output</entry>
1745               <entry>dynamic</entry>
1746               <entry>-</entry>
1747             </row>
1748             <row>
1749               <entry><option>-ddump-if-trace</option></entry>
1750               <entry>Trace interface files</entry>
1751               <entry>dynamic</entry>
1752               <entry>-</entry>
1753             </row>
1754             <row>
1755               <entry><option>-ddump-tc-trace</option></entry>
1756               <entry>Trace typechecker</entry>
1757               <entry>dynamic</entry>
1758               <entry>-</entry>
1759             </row>
1760             <row>
1761               <entry><option>-ddump-rn-trace</option></entry>
1762               <entry>Trace renamer</entry>
1763               <entry>dynamic</entry>
1764               <entry>-</entry>
1765             </row>
1766             <row>
1767               <entry><option>-ddump-rn-stats</option></entry>
1768               <entry>Renamer stats</entry>
1769               <entry>dynamic</entry>
1770               <entry>-</entry>
1771             </row>
1772             <row>
1773               <entry><option>-ddump-simpl-stats</option></entry>
1774               <entry>Dump simplifier stats</entry>
1775               <entry>dynamic</entry>
1776               <entry>-</entry>
1777             </row>
1778             <row>
1779               <entry><option>-dppr-debug</option></entry>
1780               <entry>Turn on debug printing (more verbose)</entry>
1781               <entry>static</entry>
1782               <entry>-</entry>
1783             </row>
1784             <row>
1785               <entry><option>-dppr-noprags</option></entry>
1786               <entry>Don't output pragma info in dumps</entry>
1787               <entry>static</entry>
1788               <entry>-</entry>
1789             </row>
1790             <row>
1791               <entry><option>-dppr-user-length</option></entry>
1792               <entry>Set the depth for printing expressions in error msgs</entry>
1793               <entry>static</entry>
1794               <entry>-</entry>
1795             </row>
1796             <row>
1797               <entry><option>-dsource-stats</option></entry>
1798               <entry>Dump haskell source stats</entry>
1799               <entry>dynamic</entry>
1800               <entry>-</entry>
1801             </row>
1802             <row>
1803               <entry><option>-dcmm-lint</option></entry>
1804               <entry>C-- pass sanity checking</entry>
1805               <entry>dynamic</entry>
1806               <entry>-</entry>
1807             </row>
1808             <row>
1809               <entry><option>-dstg-lint</option></entry>
1810               <entry>STG pass sanity checking</entry>
1811               <entry>dynamic</entry>
1812               <entry>-</entry>
1813             </row>
1814             <row>
1815               <entry><option>-dstg-stats</option></entry>
1816               <entry>Dump STG stats</entry>
1817               <entry>dynamic</entry>
1818               <entry>-</entry>
1819             </row>
1820             <row>
1821               <entry><option>-dverbose-core2core</option></entry>
1822               <entry>Show output from each core-to-core pass</entry>
1823               <entry>dynamic</entry>
1824               <entry>-</entry>
1825             </row>
1826             <row>
1827               <entry><option>-dverbose-stg2stg</option></entry>
1828               <entry>Show output from each STG-to-STG pass</entry>
1829               <entry>dynamic</entry>
1830               <entry>-</entry>
1831             </row>
1832             <row>
1833               <entry><option>-dshow-passes</option></entry>
1834               <entry>Print out each pass name as it happens</entry>
1835               <entry>dynamic</entry>
1836               <entry>-</entry>
1837             </row>
1838             <row>
1839               <entry><option>-dfaststring-stats</option></entry>
1840               <entry>Show statistics for fast string usage when finished</entry>
1841               <entry>dynamic</entry>
1842               <entry>-</entry>
1843             </row>
1844             <row>
1845               <entry><option>-unreg</option></entry>
1846               <entry>Enable unregisterised compilation</entry>
1847               <entry>static</entry>
1848               <entry>-</entry>
1849             </row>
1850           </tbody>
1851         </tgroup>
1852       </informaltable>
1853     </sect2>
1854       
1855     <sect2>
1856       <title>Misc compiler options</title>
1857
1858       <informaltable>
1859         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1860           <thead>
1861             <row>
1862               <entry>Flag</entry>
1863               <entry>Description</entry>
1864               <entry>Static/Dynamic</entry>
1865               <entry>Reverse</entry>
1866             </row>
1867           </thead>
1868           <tbody>
1869             <row>
1870               <entry><option>-fno-hi-version-check</option></entry>
1871               <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1872               <entry>static</entry>
1873               <entry>-</entry>
1874             </row>
1875             <row>
1876               <entry><option>-dno-black-holing</option></entry>
1877               <entry>Turn off black holing (probably doesn't work)</entry>
1878               <entry>static</entry>
1879               <entry>-</entry>
1880             </row>
1881             <row>
1882               <entry><option>-fno-method-sharing</option></entry>
1883               <entry>Don't share specialisations of overloaded functions</entry>
1884               <entry>static</entry>
1885               <entry>-</entry>
1886             </row>
1887             <row>
1888               <entry><option>-fhistory-size</option></entry>
1889               <entry>Set simplification history size</entry>
1890               <entry>static</entry>
1891               <entry>-</entry>
1892             </row>
1893             <row>
1894               <entry><option>-funregisterised</option></entry>
1895               <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1896               <entry>static</entry>
1897               <entry>-</entry>
1898             </row>
1899             <row>
1900               <entry><option>-fno-asm-mangling</option></entry>
1901               <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1902               <entry>dynamic</entry>
1903               <entry>-</entry>
1904             </row>
1905             <row>
1906               <entry><option>-fno-print-bind-result</option></entry>
1907               <entry><link id="ghci-stmts">Turn off printing of binding results in GHCi</link></entry>
1908               <entry>dynamic</entry>
1909               <entry>-</entry>
1910             </row>
1911           </tbody>
1912         </tgroup>
1913       </informaltable>
1914     </sect2>
1915   </sect1>
1916
1917
1918 <!--
1919 Still to document:
1920
1921 Misc:
1922   ,  ( "H"                 , HasArg (setHeapSize . fromIntegral . decodeSize) )
1923
1924   -Bdir
1925 -->
1926
1927 <!-- Emacs stuff:
1928      ;;; Local Variables: ***
1929      ;;; mode: xml ***
1930      ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
1931      ;;; End: ***
1932  -->