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