clarify that -main-is sets main module and function
[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>static/<literal>:set</literal></entry>
362               <entry>-</entry>
363             </row>
364             <row>
365               <entry><option>-i</option></entry>
366               <entry>Empty the import directory list</entry>
367               <entry>static/<literal>:set</literal></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             <row>
481               <entry><option>-fdebugging</option></entry>
482               <entry>Generate bytecode enabled for debugging</entry>
483               <entry>dynamic</entry>
484               <entry>-</entry>
485             </row>
486             <row>
487               <entry><option>-fno-debugging</option></entry>
488               <entry>Do not include debugging information in bytecodes</entry>
489               <entry>dynamic</entry>
490               <entry>-</entry>
491             </row>
492           </tbody>
493         </tgroup>
494       </informaltable>
495     </sect2>
496
497     <sect2>
498       <title>Packages</title>
499
500       <para><xref linkend="packages"/></para>
501
502       <informaltable>
503         <tgroup cols="4" align="left" colsep="1" rowsep="1">
504           <thead>
505             <row>
506               <entry>Flag</entry>
507               <entry>Description</entry>
508               <entry>Static/Dynamic</entry>
509               <entry>Reverse</entry>
510             </row>
511           </thead>
512           <tbody>
513             <row>
514               <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
515               <entry>Compile to be part of package <replaceable>P</replaceable></entry>
516               <entry>dynamic</entry>
517               <entry>-</entry>
518             </row>
519             <row>
520               <entry><option>-package</option> <replaceable>P</replaceable></entry>
521               <entry>Expose package <replaceable>P</replaceable></entry>
522               <entry>static/<literal>:set</literal></entry>
523               <entry>-</entry>
524             </row>
525             <row>
526               <entry><option>-hide-all-packages</option></entry>
527               <entry>Hide all packages by default</entry>
528               <entry>static</entry>
529               <entry>-</entry>
530             </row>
531             <row>
532               <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
533               <entry>Hide package <replaceable>P</replaceable></entry>
534               <entry>static/<literal>:set</literal></entry>
535               <entry>-</entry>
536             </row>
537             <row>
538               <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
539               <entry>Ignore package <replaceable>P</replaceable></entry>
540               <entry>static/<literal>:set</literal></entry>
541               <entry>-</entry>
542             </row>
543             <row>
544               <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
545               <entry>Load more packages from <replaceable>file</replaceable></entry>
546               <entry>static</entry>
547               <entry>-</entry>
548             </row>
549             <row>
550               <entry><option>-no-user-package-conf</option></entry>
551               <entry>Don't load the user's package config file.</entry>
552               <entry>static</entry>
553               <entry>-</entry>
554             </row>
555           </tbody>
556         </tgroup>
557       </informaltable>
558     </sect2>
559
560     <sect2>
561       <title>Language options</title>
562
563       <para><xref linkend="options-language"/></para>
564
565       <informaltable>
566         <tgroup cols="4" align="left" colsep="1" rowsep="1">
567           <thead>
568             <row>
569               <entry>Flag</entry>
570               <entry>Description</entry>
571               <entry>Static/Dynamic</entry>
572               <entry>Reverse</entry>
573             </row>
574           </thead>
575           <tbody>
576             <row>
577               <entry><option>-fallow-overlapping-instances</option></entry>
578               <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
579               <entry>dynamic</entry>
580               <entry><option>-fno-allow-overlapping-instances</option></entry>
581             </row>
582             <row>
583               <entry><option>-fallow-incoherent-instances</option></entry>
584               <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.  
585               Implies <option>-fallow-overlapping-instances</option> </entry>
586               <entry>dynamic</entry>
587               <entry><option>-fno-allow-incoherent-instances</option></entry>
588             </row>
589             <row>
590               <entry><option>-fallow-undecidable-instances</option></entry>
591               <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
592               <entry>dynamic</entry>
593               <entry><option>-fno-allow-undecidable-instances</option></entry>
594             </row>
595             <row>
596               <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
597               <entry>set the <link linkend="undecidable-instances">limit for context reduction</link></entry>
598               <entry>dynamic</entry>
599               <entry><option>20</option></entry>
600             </row>
601             <row>
602               <entry><option>-farrows</option></entry>
603               <entry>Enable <link linkend="arrow-notation">arrow
604               notation</link> extension</entry>
605               <entry>dynamic</entry>
606               <entry><option>-fno-arrows</option></entry>
607             </row>
608             <row>
609               <entry><option>-ffi</option> or <option>-fffi</option></entry>
610               <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
611               <option>-fglasgow-exts</option>)</entry>
612               <entry>dynamic</entry>
613               <entry><option>-fno-ffi</option></entry>
614             </row>
615             <row>
616               <entry><option>-fgenerics</option></entry>
617               <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
618               <entry>dynamic</entry>
619               <entry><option>-fno-fgenerics</option></entry>
620             </row>
621             <row>
622               <entry><option>-fglasgow-exts</option></entry>
623               <entry>Enable most language extensions</entry>
624               <entry>dynamic</entry>
625               <entry><option>-fno-glasgow-exts</option></entry>
626             </row>
627             <row>
628               <entry><option>-fimplicit-params</option></entry>
629               <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
630               Implied by <option>-fglasgow-exts</option>.</entry>
631               <entry>dynamic</entry>
632               <entry><option>-fno-implicit-params</option></entry>
633             </row>
634             <row>
635               <entry><option>-firrefutable-tuples</option></entry>
636               <entry>Make tuple pattern matching irrefutable</entry>
637               <entry>dynamic</entry>
638               <entry><option>-fno-irrefutable-tuples</option></entry>
639             </row>
640             <row>
641               <entry><option>-fno-implicit-prelude</option></entry>
642               <entry>Don't implicitly <literal>import Prelude</literal></entry>
643               <entry>dynamic</entry>
644               <entry><option>-fimplicit-prelude</option></entry>
645             </row>
646             <row>
647               <entry><option>-fno-monomorphism-restriction</option></entry>
648               <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
649               <entry>dynamic</entry>
650               <entry><option>-fmonomorphism-restriction</option></entry>
651             </row>
652             <row>
653               <entry><option>-fno-mono-pat-binds</option></entry>
654               <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
655               <entry>dynamic</entry>
656               <entry><option>-fmono-pat-binds</option></entry>
657             </row>
658             <row>
659               <entry><option>-fextended-default-rules</option></entry>
660               <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
661               <entry>dynamic</entry>
662               <entry><option>-fno-extended-default-rules</option></entry>
663             </row>
664             <row>
665               <entry><option>-foverloaded-strings</option></entry>
666               <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
667               </entry>
668               <entry>dynamic</entry>
669               <entry><option>-fno-overloaded-strings</option></entry>
670             </row>
671             <row>
672               <entry><option>-fscoped-type-variables</option></entry>
673               <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
674               Implied by <option>-fglasgow-exts</option>.</entry>
675               <entry>dynamic</entry>
676               <entry><option>-fno-scoped-type-variables</option></entry>
677             </row>
678             <row>
679               <entry><option>-fth</option></entry>
680               <entry>Enable <link linkend="template-haskell">Template Haskell</link>. 
681                 No longer implied by <option>-fglasgow-exts</option>.</entry>
682               <entry>dynamic</entry>
683               <entry><option>-fno-th</option></entry>
684             </row>
685             <row>
686               <entry><option>-fbang-patterns</option></entry>
687               <entry>Enable <link linkend="sec-bang-patterns">bang patterns</link>.</entry>
688               <entry>dynamic</entry>
689               <entry><option>-fno-bang-patterns</option></entry>
690             </row>
691           </tbody>
692         </tgroup>
693       </informaltable>
694     </sect2>
695
696     <sect2>
697       <title>Warnings</title>
698       
699       <para><xref linkend="options-sanity"/></para>
700
701     <informaltable>
702       <tgroup cols="4" align="left" colsep="1" rowsep="1">
703         <thead>
704           <row>
705             <entry>Flag</entry>
706             <entry>Description</entry>
707             <entry>Static/Dynamic</entry>
708             <entry>Reverse</entry>
709           </row>
710         </thead>
711         <tbody>
712           <row>
713             <entry><option>-W</option></entry>
714             <entry>enable normal warnings</entry>
715             <entry>dynamic</entry>
716             <entry><option>-w</option></entry>
717           </row>
718           <row>
719             <entry><option>-w</option></entry>
720             <entry>disable all warnings</entry>
721             <entry>dynamic</entry>
722             <entry>-</entry>
723           </row>
724           <row>
725             <entry><option>-Wall</option></entry>
726             <entry>enable all warnings</entry>
727             <entry>dynamic</entry>
728             <entry><option>-w</option></entry>
729           </row>
730           <row>
731             <entry><option>-Werror</option></entry>
732             <entry>make warnings fatal</entry>
733             <entry>dynamic</entry>
734             <entry></entry>
735           </row>
736
737           <row>
738             <entry><option>-fwarn-deprecations</option></entry>
739             <entry>warn about uses of functions &amp; types that are deprecated</entry>
740             <entry>dynamic</entry>
741             <entry><option>-fno-warn-deprecations</option></entry>
742           </row>
743
744           <row>
745             <entry><option>-fwarn-duplicate-exports</option></entry>
746             <entry>warn when an entity is exported multiple times</entry>
747             <entry>dynamic</entry>
748             <entry><option>-fno-warn-duplicate-exports</option></entry>
749           </row>
750
751           <row>
752             <entry><option>-fwarn-hi-shadowing</option></entry>
753             <entry>warn when a <literal>.hi</literal> file in the
754             current directory shadows a library</entry>
755             <entry>dynamic</entry>
756             <entry><option>-fno-warn-hi-shadowing</option></entry>
757           </row>
758
759           <row>
760             <entry><option>-fwarn-incomplete-patterns</option></entry>
761             <entry>warn when a pattern match could fail</entry>
762             <entry>dynamic</entry>
763             <entry><option>-fno-warn-incomplete-patterns</option></entry>
764           </row>
765
766           <row>
767             <entry><option>-fwarn-incomplete-record-updates</option></entry>
768             <entry>warn when a record update could fail</entry>
769             <entry>dynamic</entry>
770             <entry><option>-fno-warn-incomplete-record-updates</option></entry>
771           </row>
772
773           <row>
774             <entry><option>-fwarn-missing-fields</option></entry>
775             <entry>warn when fields of a record are uninitialised</entry>
776             <entry>dynamic</entry>
777             <entry><option>-fno-warn-missing-fields</option></entry>
778           </row>
779
780           <row>
781             <entry><option>-fwarn-missing-methods</option></entry>
782             <entry>warn when class methods are undefined</entry>
783             <entry>dynamic</entry>
784             <entry><option>-fno-warn-missing-methods</option></entry>
785           </row>
786
787           <row>
788             <entry><option>-fwarn-missing-signatures</option></entry>
789             <entry>warn about top-level functions without signatures</entry>
790             <entry>dynamic</entry>
791             <entry><option>-fno-warn-missing-signatures</option></entry>
792           </row>
793
794           <row>
795             <entry><option>-fwarn-name-shadowing</option></entry>
796             <entry>warn when names are shadowed</entry>
797             <entry>dynamic</entry>
798             <entry><option>-fno-warn-name-shadowing</option></entry>
799           </row>
800
801           <row>
802             <entry><option>-fwarn-orphans</option></entry>
803             <entry>warn when the module contains "orphan" instance declarations
804             or rewrite rules</entry>
805             <entry>dynamic</entry>
806             <entry><option>-fno-warn-orphans</option></entry>
807           </row>
808
809           <row>
810             <entry><option>-fwarn-overlapping-patterns</option></entry>
811             <entry>warn about overlapping patterns</entry>
812             <entry>dynamic</entry>
813             <entry><option>-fno-warn-overlapping-patterns</option></entry>
814           </row>
815
816           <row>
817             <entry><option>-fwarn-simple-patterns</option></entry>
818             <entry>warn about lambda-patterns that can fail</entry>
819             <entry>dynamic</entry>
820             <entry><option>-fno-warn-simple-patterns</option></entry>
821           </row>
822
823           <row>
824             <entry><option>-fwarn-tabs</option></entry>
825             <entry>warn if there are tabs in the source file</entry>
826             <entry>dynamic</entry>
827             <entry><option>-fno-warn-tabs</option></entry>
828           </row>
829
830           <row>
831             <entry><option>-fwarn-type-defaults</option></entry>
832             <entry>warn when defaulting happens</entry>
833             <entry>dynamic</entry>
834             <entry><option>-fno-warn-type-defaults</option></entry>
835           </row>
836
837           <row>
838             <entry><option>-fwarn-unused-binds</option></entry>
839             <entry>warn about bindings that are unused</entry>
840             <entry>dynamic</entry>
841             <entry><option>-fno-warn-unused-binds</option></entry>
842           </row>
843
844           <row>
845             <entry><option>-fwarn-unused-imports</option></entry>
846             <entry>warn about unnecessary imports</entry>
847             <entry>dynamic</entry>
848             <entry><option>-fno-warn-unused-imports</option></entry>
849           </row>
850
851           <row>
852             <entry><option>-fwarn-unused-matches</option></entry>
853             <entry>warn about variables in patterns that aren't used</entry>
854             <entry>dynamic</entry>
855             <entry><option>-fno-warn-unused-matches</option></entry>
856           </row>
857
858           </tbody>
859         </tgroup>
860       </informaltable>
861
862     </sect2>
863     <sect2>
864       <title>Optimisation levels</title>
865
866       <para><xref linkend="options-optimise"/></para>
867
868       <informaltable>
869         <tgroup cols="4" align="left" colsep="1" rowsep="1">
870           <thead>
871             <row>
872               <entry>Flag</entry>
873               <entry>Description</entry>
874               <entry>Static/Dynamic</entry>
875               <entry>Reverse</entry>
876             </row>
877           </thead>
878           <tbody>
879             <row>
880               <entry><option>-O</option></entry>
881               <entry>Enable default optimisation (level 1)</entry>
882               <entry>dynamic</entry>
883               <entry><option>-O0</option></entry>
884             </row>
885             <row>
886               <entry><option>-O</option><replaceable>n</replaceable></entry>
887               <entry>Set optimisation level <replaceable>n</replaceable></entry>
888               <entry>dynamic</entry>
889               <entry><option>-O0</option></entry>
890             </row>
891           </tbody>
892         </tgroup>
893       </informaltable>
894               
895     </sect2>
896     <sect2>
897       <title>Individual optimisations</title>
898
899       <para><xref linkend="options-f"/></para>
900
901       <informaltable>
902         <tgroup cols="4" align="left" colsep="1" rowsep="1">
903           <thead>
904             <row>
905               <entry>Flag</entry>
906               <entry>Description</entry>
907               <entry>Static/Dynamic</entry>
908               <entry>Reverse</entry>
909             </row>
910           </thead>
911           <tbody>
912             <row>
913               <entry><option>-fcase-merge</option></entry>
914               <entry>Enable case-merging</entry>
915               <entry>dynamic</entry>
916               <entry><option>-fno-case-merge</option></entry>
917             </row>
918
919             <row>
920               <entry><option>-fdicts-strict</option></entry>
921               <entry>Make dictionaries strict</entry>
922               <entry>static</entry>
923               <entry><option>-fno-dicts-strict</option></entry>
924             </row>
925
926             <row>
927               <entry><option>-fdo-eta-reduction</option></entry>
928               <entry>Enable eta-reduction</entry>
929               <entry>dynamic</entry>
930               <entry><option>-fno-do-eta-reduction</option></entry>
931             </row>
932
933             <row>
934               <entry><option>-fdo-lambda-eta-expansion</option></entry>
935               <entry>Enable lambda eta-reduction</entry>
936               <entry>dynamic</entry>
937               <entry><option>-fno-do-lambda-eta-expansion</option></entry>
938             </row>
939
940             <row>
941               <entry><option>-fexcess-precision</option></entry>
942               <entry>Enable excess intermediate precision</entry>
943               <entry>dynamic</entry>
944               <entry><option>-fno-excess-precision</option></entry>
945             </row>
946
947             <row>
948               <entry><option>-frules-off</option></entry>
949               <entry>Switch off all rewrite rules (including rules
950               generated by automatic specialisation of overloaded functions)</entry>
951               <entry>static</entry>
952               <entry><option>-frules-off</option></entry>
953             </row>
954
955             <row>
956               <entry><option>-fignore-asserts</option></entry>
957               <entry>Ignore assertions in the source</entry>
958               <entry>dynamic</entry>
959               <entry><option>-fno-ignore-asserts</option></entry>
960             </row>
961
962             <row>
963               <entry><option>-fignore-interface-pragmas</option></entry>
964               <entry>Ignore pragmas in interface files</entry>
965               <entry>dynamic</entry>
966               <entry><option>-fno-ignore-interface-pragmas</option></entry>
967             </row>
968
969             <row>
970               <entry><option>-fliberate-case-threshold</option></entry>
971               <entry>Tweak the liberate-case optimisation (default: 10)</entry>
972               <entry>static</entry>
973               <entry><option>-fno-liberate-case-threshold</option></entry>
974             </row>
975
976             <row>
977               <entry><option>-fomit-interface-pragmas</option></entry>
978               <entry>Don't generate interface pragmas</entry>
979               <entry>dynamic</entry>
980               <entry><option>-fno-omit-interface-pragmas</option></entry>
981             </row>
982
983             <row>
984               <entry><option>-fmax-worker-args</option></entry>
985               <entry>If a worker has that many arguments, none will be
986                 unpacked anymore (default: 10)</entry>
987               <entry>static</entry>
988               <entry>-</entry>
989             </row>
990
991             <row>
992               <entry><option>-fmax-simplifier-iterations</option></entry>
993               <entry>Set the max iterations for the simplifier</entry>
994               <entry>dynamic</entry>
995               <entry>-</entry>
996             </row>
997
998             <row>
999               <entry><option>-fno-state-hack</option></entry>
1000               <entry>Turn off the "state hack" whereby any lambda with a real-world state token
1001               as argument is considered to be single-entry.  Hence OK to inline things inside it.</entry>
1002               <entry>static</entry>
1003               <entry>-</entry>
1004             </row>
1005
1006             <row>
1007               <entry><option>-fno-cse</option></entry>
1008               <entry>Turn off common sub-expression</entry>
1009               <entry>dynamic</entry>
1010               <entry>-</entry>
1011             </row>
1012
1013             <row>
1014               <entry><option>-fno-full-laziness</option></entry>
1015               <entry>Turn off full laziness (floating bindings outwards).</entry>
1016               <entry>dynamic</entry>
1017               <entry>-ffull-laziness</entry>
1018             </row>
1019
1020             <row>
1021               <entry><option>-fno-pre-inlining</option></entry>
1022               <entry>Turn off pre-inlining</entry>
1023               <entry>static</entry>
1024               <entry>-</entry>
1025             </row>
1026
1027             <row>
1028               <entry><option>-fno-strictness</option></entry>
1029               <entry>Turn off strictness analysis</entry>
1030               <entry>dynamic</entry>
1031               <entry>-</entry>
1032             </row>
1033
1034             <row>
1035               <entry><option>-funbox-strict-fields</option></entry>
1036               <entry>Flatten strict constructor fields</entry>
1037               <entry>dynamic</entry>
1038               <entry><option>-fno-unbox-strict-fields</option></entry>
1039             </row>
1040
1041             <row>
1042               <entry><option>-funfolding-creation-threshold</option></entry>
1043               <entry>Tweak unfolding settings</entry>
1044               <entry>static</entry>
1045               <entry><option>-fno-unfolding-creation-threshold</option></entry>
1046             </row>
1047
1048             <row>
1049               <entry><option>-funfolding-fun-discount</option></entry>
1050               <entry>Tweak unfolding settings</entry>
1051               <entry>static</entry>
1052               <entry><option>-fno-unfolding-fun-discount</option></entry>
1053             </row>
1054
1055             <row>
1056               <entry><option>-funfolding-keeness-factor</option></entry>
1057               <entry>Tweak unfolding settings</entry>
1058               <entry>static</entry>
1059               <entry><option>-fno-unfolding-keeness-factor</option></entry>
1060             </row>
1061
1062             <row>
1063               <entry><option>-funfolding-update-in-place</option></entry>
1064               <entry>Tweak unfolding settings</entry>
1065               <entry>static</entry>
1066               <entry><option>-fno-unfolding-update-in-place</option></entry>
1067             </row>
1068
1069             <row>
1070               <entry><option>-funfolding-use-threshold</option></entry>
1071               <entry>Tweak unfolding settings</entry>
1072               <entry>static</entry>
1073               <entry><option>-fno-unfolding-use-threshold</option></entry>
1074             </row>
1075           </tbody>
1076         </tgroup>
1077       </informaltable>
1078     </sect2>
1079
1080     <sect2>
1081       <title>Profiling options</title>
1082       
1083       <para><xref linkend="profiling"/></para>
1084
1085       <informaltable>
1086         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1087           <thead>
1088             <row>
1089               <entry>Flag</entry>
1090               <entry>Description</entry>
1091               <entry>Static/Dynamic</entry>
1092               <entry>Reverse</entry>
1093             </row>
1094           </thead>
1095           <tbody>
1096             <row>
1097               <entry><option>-auto</option></entry>
1098               <entry>Auto-add <literal>_scc_</literal>s to all
1099               exported functions</entry>
1100               <entry>static</entry>
1101               <entry><option>-no-auto</option></entry>
1102             </row>
1103             <row>
1104               <entry><option>-auto-all</option></entry>
1105               <entry>Auto-add <literal>_scc_</literal>s to all
1106               top-level functions</entry>
1107               <entry>static</entry>
1108               <entry><option>-no-auto-all</option></entry>
1109             </row>
1110             <row>
1111               <entry><option>-caf-all</option></entry>
1112               <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1113               <entry>static</entry>
1114               <entry><option>-no-caf-all</option></entry>
1115             </row>
1116             <row>
1117               <entry><option>-prof</option></entry>
1118               <entry>Turn on profiling</entry>
1119               <entry>static</entry>
1120               <entry>-</entry>
1121             </row>
1122             <row>
1123               <entry><option>-ticky</option></entry>
1124               <entry>Turn on ticky-ticky profiling</entry>
1125               <entry>static</entry>
1126               <entry>-</entry>
1127             </row>
1128           </tbody>
1129         </tgroup>
1130       </informaltable>
1131     </sect2>
1132
1133     <sect2>
1134       <title>Haskell pre-processor options</title>
1135
1136       <para><xref linkend="pre-processor"/></para>
1137
1138       <informaltable>
1139         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1140           <thead>
1141             <row>
1142               <entry>Flag</entry>
1143               <entry>Description</entry>
1144               <entry>Static/Dynamic</entry>
1145               <entry>Reverse</entry>
1146             </row>
1147           </thead>
1148           <tbody>
1149             <row>
1150               <entry><option>-F</option></entry>
1151               <entry>
1152                   Enable the use of a pre-processor
1153                   (set with <option>-pgmF</option>)
1154               </entry>
1155               <entry>dynamic</entry>
1156               <entry>-</entry>
1157             </row>
1158           </tbody>
1159         </tgroup>
1160       </informaltable>
1161     </sect2>
1162
1163     <sect2>
1164       <title>C pre-processor options</title>
1165
1166       <para><xref linkend="c-pre-processor"/></para>
1167
1168       <informaltable>
1169         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1170           <thead>
1171             <row>
1172               <entry>Flag</entry>
1173               <entry>Description</entry>
1174               <entry>Static/Dynamic</entry>
1175               <entry>Reverse</entry>
1176             </row>
1177           </thead>
1178           <tbody>
1179             <row>
1180               <entry><option>-cpp</option></entry>
1181               <entry>Run the C pre-processor on Haskell source files</entry>
1182               <entry>dynamic</entry>
1183               <entry>-</entry>
1184             </row>
1185             <row>
1186               <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1187               <entry>Define a symbol in the C pre-processor</entry>
1188               <entry>dynamic</entry>
1189               <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1190             </row>
1191             <row>
1192               <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1193               <entry>Undefine a symbol in the C pre-processor</entry>
1194               <entry>dynamic</entry>
1195               <entry>-</entry>
1196             </row>
1197             <row>
1198               <entry><option>-I</option><replaceable>dir</replaceable></entry>
1199               <entry>Add <replaceable>dir</replaceable> to the
1200               directory search list for <literal>#include</literal> files</entry>
1201               <entry>dynamic</entry>
1202               <entry>-</entry>
1203             </row>
1204           </tbody>
1205         </tgroup>
1206       </informaltable>
1207     </sect2>
1208
1209     <sect2>
1210       <title>C compiler options</title>
1211
1212       <para><xref linkend="options-C-compiler"/></para>
1213       <informaltable>
1214         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1215           <thead>
1216             <row>
1217               <entry>Flag</entry>
1218               <entry>Description</entry>
1219               <entry>Static/Dynamic</entry>
1220               <entry>Reverse</entry>
1221             </row>
1222           </thead>
1223           <tbody>
1224             <row>
1225               <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1226               <entry>Include <replaceable>file</replaceable> when
1227               compiling the <filename>.hc</filename> file</entry>
1228               <entry>dynamic</entry>
1229               <entry>-</entry>
1230             </row>
1231           </tbody>
1232         </tgroup>
1233       </informaltable>
1234     </sect2>
1235
1236     <sect2>
1237       <title>Code generation options</title>
1238
1239       <para><xref linkend="options-codegen"/></para>
1240
1241       <informaltable>
1242         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1243           <thead>
1244             <row>
1245               <entry>Flag</entry>
1246               <entry>Description</entry>
1247               <entry>Static/Dynamic</entry>
1248               <entry>Reverse</entry>
1249             </row>
1250           </thead>
1251           <tbody>
1252             <row>
1253               <entry><option>-fasm</option></entry>
1254               <entry>Use the native code generator</entry>
1255               <entry>dynamic</entry>
1256               <entry>-fvia-C</entry>
1257             </row>
1258             <row>
1259               <entry><option>-fvia-C</option></entry>
1260               <entry>Compile via C</entry>
1261               <entry>dynamic</entry>
1262               <entry>-fasm</entry>
1263             </row>
1264             <row>
1265               <entry><option>-fno-code</option></entry>
1266               <entry>Omit code generation</entry>
1267               <entry>mode</entry>
1268               <entry>-</entry>
1269             </row>
1270           </tbody>
1271         </tgroup>
1272       </informaltable>
1273     </sect2>
1274
1275     <sect2>
1276       <title>Linking options</title>
1277
1278       <para><xref linkend="options-linker"/></para>
1279
1280       <informaltable>
1281         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1282           <thead>
1283             <row>
1284               <entry>Flag</entry>
1285               <entry>Description</entry>
1286               <entry>Static/Dynamic</entry>
1287               <entry>Reverse</entry>
1288             </row>
1289           </thead>
1290           <tbody>
1291             <row>
1292               <entry><option>-fPIC</option></entry>
1293               <entry>Generate position-independent code (where available)</entry>
1294               <entry>static</entry>
1295               <entry>-</entry>
1296             </row>
1297             <row>
1298               <entry><option>-dynamic</option></entry>
1299               <entry>Use dynamic Haskell libraries (if available)</entry>
1300               <entry>static</entry>
1301               <entry>-</entry>
1302             </row>
1303             <row>
1304               <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1305               <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1306                 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1307               <entry>dynamic</entry>
1308               <entry>-</entry>
1309             </row>
1310             <row>
1311               <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1312               <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1313                 directories searched for frameworks.
1314                 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1315               <entry>dynamic</entry>
1316               <entry>-</entry>
1317             </row>
1318             <row>
1319               <entry><option>-l</option><replaceable>lib</replaceable></entry>
1320               <entry>Link in library <replaceable>lib</replaceable></entry>
1321               <entry>dynamic</entry>
1322               <entry>-</entry>
1323             </row>
1324             <row>
1325               <entry><option>-L</option><replaceable>dir</replaceable></entry>
1326               <entry>Add <replaceable>dir</replaceable> to the list of
1327               directories searched for libraries</entry>
1328               <entry>dynamic</entry>
1329               <entry>-</entry>
1330             </row>
1331             <row>
1332               <entry><option>-main-is</option></entry>
1333               <entry>Set main module and function</entry>
1334               <entry>dynamic</entry>
1335               <entry>-</entry>
1336             </row>
1337             <row>
1338               <entry><option>--mk-dll</option></entry>
1339               <entry>DLL-creation mode (Windows only)</entry>
1340               <entry>dynamic</entry>
1341               <entry>-</entry>
1342             </row>
1343             <row>
1344               <entry><option>-no-hs-main</option></entry>
1345               <entry>Don't assume this program contains <literal>main</literal></entry>
1346               <entry>dynamic</entry>
1347               <entry>-</entry>
1348             </row>
1349             <row>
1350               <entry><option>-no-link</option></entry>
1351               <entry>Omit linking</entry>
1352               <entry>dynamic</entry>
1353               <entry>-</entry>
1354             </row>
1355             <row>
1356               <entry><option>-split-objs</option></entry>
1357               <entry>Split objects (for libraries)</entry>
1358               <entry>dynamic</entry>
1359               <entry>-</entry>
1360             </row>
1361             <row>
1362               <entry><option>-static</option></entry>
1363               <entry>Use static Haskell libraries</entry>
1364               <entry>static</entry>
1365               <entry>-</entry>
1366             </row>
1367             <row>
1368               <entry><option>-threaded</option></entry>
1369               <entry>Use the threaded runtime</entry>
1370               <entry>static</entry>
1371               <entry>-</entry>
1372             </row>
1373             <row>
1374               <entry><option>-debug</option></entry>
1375               <entry>Use the debugging runtime</entry>
1376               <entry>static</entry>
1377               <entry>-</entry>
1378             </row>
1379           </tbody>
1380         </tgroup>
1381       </informaltable>
1382     </sect2>
1383
1384     <sect2>
1385       <title>Replacing phases</title>
1386
1387       <para><xref linkend="replacing-phases"/></para>
1388
1389       <informaltable>
1390         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1391           <thead>
1392             <row>
1393               <entry>Flag</entry>
1394               <entry>Description</entry>
1395               <entry>Static/Dynamic</entry>
1396               <entry>Reverse</entry>
1397             </row>
1398           </thead>
1399           <tbody>
1400             <row>
1401               <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1402               <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1403               <entry>dynamic</entry>
1404               <entry>-</entry>
1405             </row>
1406             <row>
1407               <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1408               <entry>Use <replaceable>cmd</replaceable> as the C
1409               pre-processor (with <option>-cpp</option> only)</entry>
1410               <entry>dynamic</entry>
1411               <entry>-</entry>
1412             </row>
1413             <row>
1414               <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1415               <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1416               <entry>dynamic</entry>
1417               <entry>-</entry>
1418             </row>
1419             <row>
1420               <entry><option>-pgmm</option> <replaceable>cmd</replaceable></entry>
1421               <entry>Use <replaceable>cmd</replaceable> as the mangler</entry>
1422               <entry>dynamic</entry>
1423               <entry>-</entry>
1424             </row>
1425             <row>
1426               <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
1427               <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
1428               <entry>dynamic</entry>
1429               <entry>-</entry>
1430             </row>
1431             <row>
1432               <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1433               <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1434               <entry>dynamic</entry>
1435               <entry>-</entry>
1436             </row>
1437             <row>
1438               <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1439               <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1440               <entry>dynamic</entry>
1441               <entry>-</entry>
1442             </row>
1443             <row>
1444               <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1445               <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1446               <entry>dynamic</entry>
1447               <entry>-</entry>
1448             </row>
1449             <row>
1450               <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1451               <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1452               (with <option>-F</option> only)</entry>
1453               <entry>dynamic</entry>
1454               <entry>-</entry>
1455             </row>
1456           </tbody>
1457         </tgroup>
1458       </informaltable>
1459       <indexterm><primary><option>-pgmL</option></primary></indexterm>
1460       <indexterm><primary><option>-pgmP</option></primary></indexterm>
1461       <indexterm><primary><option>-pgmc</option></primary></indexterm>
1462       <indexterm><primary><option>-pgma</option></primary></indexterm>
1463       <indexterm><primary><option>-pgml</option></primary></indexterm>
1464       <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1465       <indexterm><primary><option>-pgmF</option></primary></indexterm>
1466
1467     </sect2>
1468
1469     <sect2>
1470       <title>Forcing options to particular phases</title>
1471
1472       <para><xref linkend="forcing-options-through"/></para>
1473
1474       <informaltable>
1475         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1476           <thead>
1477             <row>
1478               <entry>Flag</entry>
1479               <entry>Description</entry>
1480               <entry>Static/Dynamic</entry>
1481               <entry>Reverse</entry>
1482             </row>
1483           </thead>
1484           <tbody>
1485             <row>
1486               <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1487               <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1488               <entry>dynamic</entry>
1489               <entry>-</entry>
1490             </row>
1491             <row>
1492               <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1493               <entry>pass <replaceable>option</replaceable> to cpp (with
1494               <option>-cpp</option> only)</entry>
1495               <entry>dynamic</entry>
1496               <entry>-</entry>
1497             </row>
1498             <row>
1499               <entry><option>-optF</option> <replaceable>option</replaceable></entry>
1500               <entry>pass <replaceable>option</replaceable> to the
1501               custom pre-processor</entry>
1502               <entry>dynamic</entry>
1503               <entry>-</entry>
1504             </row>
1505             <row>
1506               <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1507               <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1508               <entry>dynamic</entry>
1509               <entry>-</entry>
1510             </row>
1511             <row>
1512               <entry><option>-optm</option> <replaceable>option</replaceable></entry>
1513               <entry>pass <replaceable>option</replaceable> to the mangler</entry>
1514               <entry>dynamic</entry>
1515               <entry>-</entry>
1516             </row>
1517             <row>
1518               <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1519               <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1520               <entry>dynamic</entry>
1521               <entry>-</entry>
1522             </row>
1523             <row>
1524               <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1525               <entry>pass <replaceable>option</replaceable> to the linker</entry>
1526               <entry>dynamic</entry>
1527               <entry>-</entry>
1528             </row>
1529             <row>
1530               <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1531               <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1532               <entry>dynamic</entry>
1533               <entry>-</entry>
1534             </row>
1535             <row>
1536               <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1537               <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1538               <entry>dynamic</entry>
1539               <entry>-</entry>
1540             </row>
1541           </tbody>
1542         </tgroup>
1543       </informaltable>
1544     </sect2>
1545
1546     <sect2>
1547       <title>Platform-specific options</title>
1548       
1549       <para><xref linkend="options-platform"/></para>
1550
1551       <informaltable>
1552         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1553           <thead>
1554             <row>
1555               <entry>Flag</entry>
1556               <entry>Description</entry>
1557               <entry>Static/Dynamic</entry>
1558               <entry>Reverse</entry>
1559             </row>
1560           </thead>
1561           <tbody>
1562             <row>
1563               <entry><option>-monly-[432]-regs</option></entry>
1564               <entry>(x86 only) give some registers back to the C compiler</entry>
1565               <entry>dynamic</entry>
1566               <entry>-</entry>
1567             </row>
1568           </tbody>
1569         </tgroup>
1570       </informaltable>
1571     </sect2>
1572
1573          
1574     <sect2>
1575       <title>External core file options</title>
1576
1577       <para><xref linkend="ext-core"/></para>
1578
1579       <informaltable>
1580         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1581           <thead>
1582             <row>
1583               <entry>Flag</entry>
1584               <entry>Description</entry>
1585               <entry>Static/Dynamic</entry>
1586               <entry>Reverse</entry>
1587             </row>
1588           </thead>
1589           <tbody>
1590             <row>
1591               <entry><option>-fext-core</option></entry>
1592               <entry>Generate <filename>.hcr</filename> external Core files</entry>
1593               <entry>static</entry>
1594               <entry>-</entry>
1595             </row>
1596           </tbody>
1597         </tgroup>
1598       </informaltable>
1599     </sect2>
1600
1601
1602     <sect2>
1603       <title>Compiler debugging options</title>
1604
1605       <para><xref linkend="options-debugging"/></para>
1606
1607       <informaltable>
1608         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1609           <thead>
1610             <row>
1611               <entry>Flag</entry>
1612               <entry>Description</entry>
1613               <entry>Static/Dynamic</entry>
1614               <entry>Reverse</entry>
1615             </row>
1616           </thead>
1617           <tbody>
1618             <row>
1619               <entry><option>-dcore-lint</option></entry>
1620               <entry>Turn on internal sanity checking</entry>
1621               <entry>dynamic</entry>
1622               <entry>-</entry>
1623             </row>
1624             <row>
1625               <entry><option>-ddump-asm</option></entry>
1626               <entry>Dump assembly</entry>
1627               <entry>dynamic</entry>
1628               <entry>-</entry>
1629             </row>
1630             <row>
1631               <entry><option>-ddump-bcos</option></entry>
1632               <entry>Dump interpreter byte code</entry>
1633               <entry>dynamic</entry>
1634               <entry>-</entry>
1635             </row>
1636             <row>
1637               <entry><option>-ddump-cmm</option></entry>
1638               <entry>Dump C-- output</entry>
1639               <entry>dynamic</entry>
1640               <entry>-</entry>
1641             </row>
1642             <row>
1643               <entry><option>-ddump-cpranal</option></entry>
1644               <entry>Dump output from CPR analysis</entry>
1645               <entry>dynamic</entry>
1646               <entry>-</entry>
1647             </row>
1648             <row>
1649               <entry><option>-ddump-cse</option></entry>
1650               <entry>Dump CSE output</entry>
1651               <entry>dynamic</entry>
1652               <entry>-</entry>
1653             </row>
1654             <row>
1655               <entry><option>-ddump-deriv</option></entry>
1656               <entry>Dump deriving output</entry>
1657               <entry>dynamic</entry>
1658               <entry>-</entry>
1659             </row>
1660             <row>
1661               <entry><option>-ddump-ds</option></entry>
1662               <entry>Dump desugarer output</entry>
1663               <entry>dynamic</entry>
1664               <entry>-</entry>
1665             </row>
1666             <row>
1667               <entry><option>-ddump-flatC</option></entry>
1668               <entry>Dump &ldquo;flat&rdquo; C</entry>
1669               <entry>dynamic</entry>
1670               <entry>-</entry>
1671             </row>
1672             <row>
1673               <entry><option>-ddump-foreign</option></entry>
1674               <entry>Dump <literal>foreign export</literal> stubs</entry>
1675               <entry>dynamic</entry>
1676               <entry>-</entry>
1677             </row>
1678             <row>
1679               <entry><option>-ddump-inlinings</option></entry>
1680               <entry>Dump inlining info</entry>
1681               <entry>dynamic</entry>
1682               <entry>-</entry>
1683             </row>
1684             <row>
1685               <entry><option>-ddump-occur-anal</option></entry>
1686               <entry>Dump occurrence analysis output</entry>
1687               <entry>dynamic</entry>
1688               <entry>-</entry>
1689             </row>
1690             <row>
1691               <entry><option>-ddump-opt-cmm</option></entry>
1692               <entry>Dump the results of C-- to C-- optimising passes</entry>
1693               <entry>dynamic</entry>
1694               <entry>-</entry>
1695             </row>
1696             <row>
1697               <entry><option>-ddump-parsed</option></entry>
1698               <entry>Dump parse tree</entry>
1699               <entry>dynamic</entry>
1700               <entry>-</entry>
1701             </row>
1702             <row>
1703               <entry><option>-ddump-prep</option></entry>
1704               <entry>Dump prepared core</entry>
1705               <entry>dynamic</entry>
1706               <entry>-</entry>
1707             </row>
1708             <row>
1709               <entry><option>-ddump-rn</option></entry>
1710               <entry>Dump renamer output</entry>
1711               <entry>dynamic</entry>
1712               <entry>-</entry>
1713             </row>
1714             <row>
1715               <entry><option>-ddump-rules</option></entry>
1716               <entry>Dump rules</entry>
1717               <entry>dynamic</entry>
1718               <entry>-</entry>
1719             </row>
1720             <row>
1721               <entry><option>-ddump-simpl</option></entry>
1722               <entry>Dump final simplifier output</entry>
1723               <entry>dynamic</entry>
1724               <entry>-</entry>
1725             </row>
1726             <row>
1727               <entry><option>-ddump-simpl-iterations</option></entry>
1728               <entry>Dump output from each simplifier iteration</entry>
1729               <entry>dynamic</entry>
1730               <entry>-</entry>
1731             </row>
1732             <row>
1733               <entry><option>-ddump-spec</option></entry>
1734               <entry>Dump specialiser output</entry>
1735               <entry>dynamic</entry>
1736               <entry>-</entry>
1737             </row>
1738             <row>
1739               <entry><option>-ddump-splices</option></entry>
1740               <entry>Dump TH splided expressions, and what they evaluate to</entry>
1741               <entry>dynamic</entry>
1742               <entry>-</entry>
1743             </row>
1744             <row>
1745               <entry><option>-ddump-stg</option></entry>
1746               <entry>Dump final STG</entry>
1747               <entry>dynamic</entry>
1748               <entry>-</entry>
1749             </row>
1750             <row>
1751               <entry><option>-ddump-stranal</option></entry>
1752               <entry>Dump strictness analyser output</entry>
1753               <entry>dynamic</entry>
1754               <entry>-</entry>
1755             </row>
1756             <row>
1757               <entry><option>-ddump-tc</option></entry>
1758               <entry>Dump typechecker output</entry>
1759               <entry>dynamic</entry>
1760               <entry>-</entry>
1761             </row>
1762             <row>
1763               <entry><option>-ddump-types</option></entry>
1764               <entry>Dump type signatures</entry>
1765               <entry>dynamic</entry>
1766               <entry>-</entry>
1767             </row>
1768             <row>
1769               <entry><option>-ddump-worker-wrapper</option></entry>
1770               <entry>Dump worker-wrapper output</entry>
1771               <entry>dynamic</entry>
1772               <entry>-</entry>
1773             </row>
1774             <row>
1775               <entry><option>-ddump-if-trace</option></entry>
1776               <entry>Trace interface files</entry>
1777               <entry>dynamic</entry>
1778               <entry>-</entry>
1779             </row>
1780             <row>
1781               <entry><option>-ddump-tc-trace</option></entry>
1782               <entry>Trace typechecker</entry>
1783               <entry>dynamic</entry>
1784               <entry>-</entry>
1785             </row>
1786             <row>
1787               <entry><option>-ddump-rn-trace</option></entry>
1788               <entry>Trace renamer</entry>
1789               <entry>dynamic</entry>
1790               <entry>-</entry>
1791             </row>
1792             <row>
1793               <entry><option>-ddump-rn-stats</option></entry>
1794               <entry>Renamer stats</entry>
1795               <entry>dynamic</entry>
1796               <entry>-</entry>
1797             </row>
1798             <row>
1799               <entry><option>-ddump-simpl-stats</option></entry>
1800               <entry>Dump simplifier stats</entry>
1801               <entry>dynamic</entry>
1802               <entry>-</entry>
1803             </row>
1804             <row>
1805               <entry><option>-dppr-debug</option></entry>
1806               <entry>Turn on debug printing (more verbose)</entry>
1807               <entry>static</entry>
1808               <entry>-</entry>
1809             </row>
1810             <row>
1811               <entry><option>-dppr-noprags</option></entry>
1812               <entry>Don't output pragma info in dumps</entry>
1813               <entry>static</entry>
1814               <entry>-</entry>
1815             </row>
1816             <row>
1817               <entry><option>-dppr-user-length</option></entry>
1818               <entry>Set the depth for printing expressions in error msgs</entry>
1819               <entry>static</entry>
1820               <entry>-</entry>
1821             </row>
1822             <row>
1823               <entry><option>-dsource-stats</option></entry>
1824               <entry>Dump haskell source stats</entry>
1825               <entry>dynamic</entry>
1826               <entry>-</entry>
1827             </row>
1828             <row>
1829               <entry><option>-dcmm-lint</option></entry>
1830               <entry>C-- pass sanity checking</entry>
1831               <entry>dynamic</entry>
1832               <entry>-</entry>
1833             </row>
1834             <row>
1835               <entry><option>-dstg-lint</option></entry>
1836               <entry>STG pass sanity checking</entry>
1837               <entry>dynamic</entry>
1838               <entry>-</entry>
1839             </row>
1840             <row>
1841               <entry><option>-dstg-stats</option></entry>
1842               <entry>Dump STG stats</entry>
1843               <entry>dynamic</entry>
1844               <entry>-</entry>
1845             </row>
1846             <row>
1847               <entry><option>-dverbose-core2core</option></entry>
1848               <entry>Show output from each core-to-core pass</entry>
1849               <entry>dynamic</entry>
1850               <entry>-</entry>
1851             </row>
1852             <row>
1853               <entry><option>-dverbose-stg2stg</option></entry>
1854               <entry>Show output from each STG-to-STG pass</entry>
1855               <entry>dynamic</entry>
1856               <entry>-</entry>
1857             </row>
1858             <row>
1859               <entry><option>-dshow-passes</option></entry>
1860               <entry>Print out each pass name as it happens</entry>
1861               <entry>dynamic</entry>
1862               <entry>-</entry>
1863             </row>
1864             <row>
1865               <entry><option>-dfaststring-stats</option></entry>
1866               <entry>Show statistics for fast string usage when finished</entry>
1867               <entry>dynamic</entry>
1868               <entry>-</entry>
1869             </row>
1870             <row>
1871               <entry><option>-unreg</option></entry>
1872               <entry>Enable unregisterised compilation</entry>
1873               <entry>static</entry>
1874               <entry>-</entry>
1875             </row>
1876           </tbody>
1877         </tgroup>
1878       </informaltable>
1879     </sect2>
1880       
1881     <sect2>
1882       <title>Misc compiler options</title>
1883
1884       <informaltable>
1885         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1886           <thead>
1887             <row>
1888               <entry>Flag</entry>
1889               <entry>Description</entry>
1890               <entry>Static/Dynamic</entry>
1891               <entry>Reverse</entry>
1892             </row>
1893           </thead>
1894           <tbody>
1895             <row>
1896               <entry><option>-fno-hi-version-check</option></entry>
1897               <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1898               <entry>static</entry>
1899               <entry>-</entry>
1900             </row>
1901             <row>
1902               <entry><option>-dno-black-holing</option></entry>
1903               <entry>Turn off black holing (probably doesn't work)</entry>
1904               <entry>static</entry>
1905               <entry>-</entry>
1906             </row>
1907             <row>
1908               <entry><option>-fno-method-sharing</option></entry>
1909               <entry>Don't share specialisations of overloaded functions</entry>
1910               <entry>static</entry>
1911               <entry>-</entry>
1912             </row>
1913             <row>
1914               <entry><option>-fhistory-size</option></entry>
1915               <entry>Set simplification history size</entry>
1916               <entry>static</entry>
1917               <entry>-</entry>
1918             </row>
1919             <row>
1920               <entry><option>-funregisterised</option></entry>
1921               <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1922               <entry>static</entry>
1923               <entry>-</entry>
1924             </row>
1925             <row>
1926               <entry><option>-fno-asm-mangling</option></entry>
1927               <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1928               <entry>dynamic</entry>
1929               <entry>-</entry>
1930             </row>
1931             <row>
1932               <entry><option>-fno-print-bind-result</option></entry>
1933               <entry><link linkend="ghci-stmts">Turn off printing of binding results in GHCi</link></entry>
1934               <entry>dynamic</entry>
1935               <entry>-</entry>
1936             </row>
1937           </tbody>
1938         </tgroup>
1939       </informaltable>
1940     </sect2>
1941   </sect1>
1942
1943
1944 <!--
1945 Still to document:
1946
1947 Misc:
1948   ,  ( "H"                 , HasArg (setHeapSize . fromIntegral . decodeSize) )
1949
1950   -Bdir
1951 -->
1952
1953 <!-- Emacs stuff:
1954      ;;; Local Variables: ***
1955      ;;; mode: xml ***
1956      ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
1957      ;;; End: ***
1958  -->