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