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