merge upstream HEAD
[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;supported-extensions</option> or <option>&ndash;&ndash;supported-languages</option></entry>
64               <entry>display the supported languages and language extensions</entry>
65               <entry>mode</entry>
66               <entry>-</entry>
67             </row>
68             <row>
69               <entry><option>&ndash;&ndash;info</option></entry>
70               <entry>display information about the compiler</entry>
71               <entry>mode</entry>
72               <entry>-</entry>
73             </row>
74             <row>
75               <entry><option>&ndash;&ndash;version</option></entry>
76               <entry>display GHC version</entry>
77               <entry>mode</entry>
78               <entry>-</entry>
79             </row>
80             <row>
81               <entry><option>&ndash;&ndash;numeric-version</option></entry>
82               <entry>display GHC version (numeric only)</entry>
83               <entry>mode</entry>
84               <entry>-</entry>
85             </row>
86             <row>
87               <entry><option>&ndash;&ndash;print-libdir</option></entry>
88               <entry>display GHC library directory</entry>
89               <entry>mode</entry>
90               <entry>-</entry>
91             </row>
92             <row>
93               <entry><option>-ferror-spans</option></entry>
94               <entry>output full span in error messages</entry>
95               <entry>static</entry>
96               <entry>-</entry>
97             </row>
98             <row>
99               <entry><option>-H</option><replaceable>size</replaceable></entry>
100               <entry>Set the minimum heap size to <replaceable>size</replaceable></entry>
101               <entry>static</entry>
102               <entry>-</entry>
103             </row>
104             <row>
105               <entry><option>-Rghc-timing</option></entry>
106               <entry>Summarise timing stats for GHC (same as <literal>+RTS -tstderr</literal>)</entry>
107               <entry>static</entry>
108               <entry>-</entry>
109             </row>
110           </tbody>
111         </tgroup>
112       </informaltable>
113
114     </sect2>
115     <sect2>
116       <title>Which phases to run</title>
117       
118       <para><xref linkend="options-order"/></para>
119
120       <informaltable>
121         <tgroup cols="4" align="left" colsep="1" rowsep="1">
122           <thead>
123             <row>
124               <entry>Flag</entry>
125               <entry>Description</entry>
126               <entry>Static/Dynamic</entry>
127               <entry>Reverse</entry>
128             </row>
129           </thead>
130           <tbody>
131             <row>
132               <entry><option>-E</option></entry>
133               <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
134               <entry>mode</entry>
135               <entry>-</entry>
136             </row>
137             <row>
138               <entry><option>-C</option></entry>
139               <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
140               <entry>mode</entry>
141               <entry>-</entry>
142             </row>
143             <row>
144               <entry><option>-S</option></entry>
145               <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
146               <entry>mode</entry>
147               <entry>-</entry>
148             </row>
149             <row>
150               <entry><option>-c</option></entry>
151               <entry>Do not link</entry>
152               <entry>dynamic</entry>
153               <entry>-</entry>
154             </row>
155             <row>
156               <entry><option>-x</option> <replaceable>suffix</replaceable></entry>
157               <entry>Override default behaviour for source files</entry>
158               <entry>static</entry>
159               <entry>-</entry>
160             </row>
161           </tbody>
162         </tgroup>
163       </informaltable>
164     </sect2>
165
166      <sect2>
167       <title>Alternative modes of operation</title>
168       
169       <para><xref linkend="modes"/></para>
170
171       <informaltable>
172         <tgroup cols="4" align="left" colsep="1" rowsep="1">
173           <thead>
174             <row>
175               <entry>Flag</entry>
176               <entry>Description</entry>
177               <entry>Static/Dynamic</entry>
178               <entry>Reverse</entry>
179             </row>
180           </thead>
181           <tbody>
182             <row>
183               <entry><option>--interactive</option></entry>
184               <entry>Interactive mode - normally used by just running <command>ghci</command>;
185               see <xref linkend="ghci"/> for details.</entry>
186               <entry>mode</entry>
187               <entry>-</entry>
188             </row>
189             <row>
190               <entry><option>--make</option></entry>
191               <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>;
192               see <xref linkend="make-mode"/> for details..</entry>
193               <entry>mode</entry>
194               <entry>-</entry>
195             </row>
196             <row>
197               <entry><option>-e <replaceable>expr</replaceable></option></entry>
198               <entry>Evaluate <replaceable>expr</replaceable>;
199               see <xref linkend="eval-mode"/> for details.</entry>
200               <entry>mode</entry>
201               <entry>-</entry>
202             </row>
203             <row>
204               <entry><option>-M</option></entry>
205               <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>;
206               see <xref linkend="makefile-dependencies"/> for details.</entry>
207               <entry>mode</entry>
208               <entry>-</entry>
209             </row>
210           </tbody>
211         </tgroup>
212       </informaltable>
213     </sect2>
214
215     <sect2>
216       <title>Redirecting output</title>
217       
218       <para><xref linkend="options-output"/></para>
219
220       <informaltable>
221         <tgroup cols="4" align="left" colsep="1" rowsep="1">
222           <thead>
223             <row>
224               <entry>Flag</entry>
225               <entry>Description</entry>
226               <entry>Static/Dynamic</entry>
227               <entry>Reverse</entry>
228             </row>
229           </thead>
230           <tbody>
231             <row>
232               <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
233               <entry>set the suffix to use for intermediate C files</entry>
234               <entry>dynamic</entry>
235               <entry>-</entry>
236             </row>
237             <row>
238               <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
239               <entry>set directory for interface files</entry>
240               <entry>dynamic</entry>
241               <entry>-</entry>
242             </row>
243             <row>
244               <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
245               <entry>set the suffix to use for interface files</entry>
246               <entry>dynamic</entry>
247               <entry>-</entry>
248             </row>
249             <row>
250               <entry><option>-o</option> <replaceable>filename</replaceable></entry>
251               <entry>set output filename</entry>
252               <entry>dynamic</entry>
253               <entry>-</entry>
254             </row>
255             <row>
256               <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
257               <entry>set directory for object files</entry>
258               <entry>dynamic</entry>
259               <entry>-</entry>
260             </row>
261             <row>
262               <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
263               <entry>set the filename in which to put the interface</entry>
264               <entry>dynamic</entry>
265               <entry></entry>
266             </row>
267             <row>
268               <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
269               <entry>set the output file suffix</entry>
270               <entry>dynamic</entry>
271               <entry>-</entry>
272             </row>
273             <row>
274               <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
275               <entry>redirect FFi stub files</entry>
276               <entry>dynamic</entry>
277               <entry>-</entry>
278             </row>
279             <row>
280               <entry><option>-outputdir</option> <replaceable>dir</replaceable></entry>
281               <entry>set output directory</entry>
282               <entry>dynamic</entry>
283               <entry>-</entry>
284             </row>
285           </tbody>
286         </tgroup>
287       </informaltable>
288     </sect2>
289
290     <sect2>
291       <title>Keeping intermediate files</title>
292       
293       <para><xref linkend="keeping-intermediates"/></para>
294       
295       <informaltable>
296         <tgroup cols="4" align="left" colsep="1" rowsep="1">
297           <thead>
298             <row>
299               <entry>Flag</entry>
300               <entry>Description</entry>
301               <entry>Static/Dynamic</entry>
302               <entry>Reverse</entry>
303             </row>
304           </thead>
305           <tbody>
306             <row>
307               <entry><option>-keep-hc-file</option> or
308                  <option>-keep-hc-files</option></entry>
309               <entry>retain intermediate <literal>.hc</literal> files</entry>
310               <entry>dynamic</entry>
311               <entry>-</entry>
312             </row>
313             <row>
314               <entry><option>-keep-llvm-file</option> or
315                  <option>-keep-llvm-files</option></entry>
316               <entry>retain intermediate LLVM <literal>.ll</literal> files</entry>
317               <entry>dynamic</entry>
318               <entry>-</entry>
319             </row>
320             <row>
321               <entry><option>-keep-s-file</option> or
322                  <option>-keep-s-files</option></entry>
323               <entry>retain intermediate <literal>.s</literal> files</entry>
324               <entry>dynamic</entry>
325               <entry>-</entry>
326             </row>
327             <row>
328               <entry><option>-keep-tmp-files</option></entry>
329               <entry>retain all intermediate temporary files</entry>
330               <entry>dynamic</entry>
331               <entry>-</entry>
332             </row>
333           </tbody>
334         </tgroup>
335       </informaltable>
336     </sect2>
337
338     <sect2>
339       <title>Temporary files</title>
340       
341       <para><xref linkend="temp-files"/></para>
342
343       <informaltable>
344         <tgroup cols="4" align="left" colsep="1" rowsep="1">
345           <thead>
346             <row>
347               <entry>Flag</entry>
348               <entry>Description</entry>
349               <entry>Static/Dynamic</entry>
350               <entry>Reverse</entry>
351             </row>
352           </thead>
353           <tbody>
354             <row>
355               <entry><option>-tmpdir</option></entry>
356               <entry>set the directory for temporary files</entry>
357               <entry>dynamic</entry>
358               <entry>-</entry>
359             </row>
360           </tbody>
361         </tgroup>
362       </informaltable>
363     </sect2>
364
365     <sect2>
366       <title>Finding imports</title>
367
368       <para><xref linkend="search-path"/></para>
369
370       <informaltable>
371         <tgroup cols="4" align="left" colsep="1" rowsep="1">
372           <thead>
373             <row>
374               <entry>Flag</entry>
375
376               <entry>Description</entry>
377               <entry>Static/Dynamic</entry>
378               <entry>Reverse</entry>
379             </row>
380           </thead>
381           <tbody>
382             <row>
383               <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
384               <entry>add <replaceable>dir</replaceable>,
385                   <replaceable>dir2</replaceable>, etc. to import path</entry>
386               <entry>static/<literal>:set</literal></entry>
387               <entry>-</entry>
388             </row>
389             <row>
390               <entry><option>-i</option></entry>
391               <entry>Empty the import directory list</entry>
392               <entry>static/<literal>:set</literal></entry>
393               <entry>-</entry>
394             </row>
395           </tbody>
396         </tgroup>
397       </informaltable>
398     </sect2>
399
400     <sect2>
401       <title>Interface file options</title>
402
403       <para><xref linkend="hi-options"/></para>
404
405       <informaltable>
406         <tgroup cols="4" align="left" colsep="1" rowsep="1">
407           <thead>
408             <row>
409               <entry>Flag</entry>
410
411               <entry>Description</entry>
412               <entry>Static/Dynamic</entry>
413               <entry>Reverse</entry>
414             </row>
415           </thead>
416           <tbody>
417             <row>
418               <entry><option>-ddump-hi</option></entry>
419               <entry>Dump the new interface to stdout</entry>
420               <entry>dynamic</entry>
421               <entry>-</entry>
422             </row>
423             <row>
424               <entry><option>-ddump-hi-diffs</option></entry>
425               <entry>Show the differences vs. the old interface</entry>
426               <entry>dynamic</entry>
427               <entry>-</entry>
428             </row>
429             <row>
430               <entry><option>-ddump-minimal-imports</option></entry>
431               <entry>Dump a minimal set of imports</entry>
432               <entry>dynamic</entry>
433               <entry>-</entry>
434             </row>
435             <row>
436               <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
437               <entry>See <xref linkend="modes"/>.</entry>
438             </row>
439           </tbody>
440         </tgroup>
441       </informaltable>
442     </sect2>
443     
444     <sect2>
445       <title>Recompilation checking</title>
446
447       <para><xref linkend="recomp"/></para>
448
449       <informaltable>
450         <tgroup cols="4" align="left" colsep="1" rowsep="1">
451           <thead>
452             <row>
453               <entry>Flag</entry>
454
455               <entry>Description</entry>
456               <entry>Static/Dynamic</entry>
457               <entry>Reverse</entry>
458             </row>
459           </thead>
460           <tbody>
461             <row>
462               <entry><option>-fforce-recomp</option></entry>
463               <entry>Turn off recompilation checking; implied by any
464               <option>-ddump-X</option> option</entry>
465               <entry>dynamic</entry>
466               <entry><option>-fno-force-recomp</option></entry>
467             </row>
468           </tbody>
469         </tgroup>
470       </informaltable>
471     </sect2>
472
473     <sect2 id="interactive-mode-options">
474       <title>Interactive-mode options</title>
475       
476       <para><xref linkend="ghci-dot-files"/></para>
477
478       <informaltable>
479         <tgroup cols="4" align="left" colsep="1" rowsep="1">
480           <thead>
481             <row>
482               <entry>Flag</entry>
483               <entry>Description</entry>
484               <entry>Static/Dynamic</entry>
485               <entry>Reverse</entry>
486             </row>
487           </thead>
488           <tbody>
489             <row>
490               <entry><option>-ignore-dot-ghci</option></entry>
491               <entry>Disable reading of <filename>.ghci</filename> files</entry>
492               <entry>static</entry>
493               <entry>-</entry>
494             </row>
495             <row>
496               <entry><option>-read-dot-ghci</option></entry>
497               <entry>Enable reading of <filename>.ghci</filename> files</entry>
498               <entry>static</entry>
499               <entry>-</entry>
500             </row>
501             <row>
502               <entry><option>-fbreak-on-exception</option></entry>
503               <entry><link linkend="ghci-debugger-exceptions">Break on any exception thrown</link></entry>
504               <entry>dynamic</entry>
505               <entry><option>-fno-break-on-exception</option></entry>
506             </row>
507             <row>
508               <entry><option>-fbreak-on-error</option></entry>
509               <entry><link linkend="ghci-debugger-exceptions">Break on uncaught exceptions and errors</link></entry>
510               <entry>dynamic</entry>
511               <entry><option>-fno-break-on-error</option></entry>
512             </row>
513             <row>
514               <entry><option>-fprint-evld-with-show</option></entry>
515               <entry><link linkend="breakpoints">Enable usage of Show instances in <literal>:print</literal></link></entry>
516               <entry>dynamic</entry>
517               <entry><option>-fno-print-evld-with-show</option></entry>
518             </row>          
519             <row>
520               <entry><option>-fprint-bind-result</option></entry>
521               <entry><link linkend="ghci-stmts">Turn on printing of binding results in GHCi</link></entry>
522               <entry>dynamic</entry>
523               <entry><option>-fno-print-bind-result</option></entry>
524             </row>
525             <row>
526               <entry><option>-fno-print-bind-contents</option></entry>
527               <entry><link linkend="breakpoints">Turn off printing of binding contents in GHCi</link></entry>
528               <entry>dynamic</entry>
529               <entry>-</entry>
530             </row>
531             <row>
532               <entry><option>-fno-implicit-import-qualified</option></entry>
533               <entry><link linkend="ghci-import-qualified">Turn off
534               implicit qualified import of everything in GHCi</link></entry>
535               <entry>dynamic</entry>
536               <entry>-</entry>
537             </row>
538
539           </tbody>
540         </tgroup>
541       </informaltable>
542     </sect2>
543
544     <sect2>
545       <title>Packages</title>
546
547       <para><xref linkend="packages"/></para>
548
549       <informaltable>
550         <tgroup cols="4" align="left" colsep="1" rowsep="1">
551           <thead>
552             <row>
553               <entry>Flag</entry>
554               <entry>Description</entry>
555               <entry>Static/Dynamic</entry>
556               <entry>Reverse</entry>
557             </row>
558           </thead>
559           <tbody>
560             <row>
561               <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
562               <entry>Compile to be part of package <replaceable>P</replaceable></entry>
563               <entry>static</entry>
564               <entry>-</entry>
565             </row>
566             <row>
567               <entry><option>-package</option> <replaceable>P</replaceable></entry>
568               <entry>Expose package <replaceable>P</replaceable></entry>
569               <entry>static/<literal>:set</literal></entry>
570               <entry>-</entry>
571             </row>
572             <row>
573               <entry><option>-hide-all-packages</option></entry>
574               <entry>Hide all packages by default</entry>
575               <entry>static</entry>
576               <entry>-</entry>
577             </row>
578             <row>
579               <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
580               <entry>Hide package <replaceable>P</replaceable></entry>
581               <entry>static/<literal>:set</literal></entry>
582               <entry>-</entry>
583             </row>
584             <row>
585               <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
586               <entry>Ignore package <replaceable>P</replaceable></entry>
587               <entry>static/<literal>:set</literal></entry>
588               <entry>-</entry>
589             </row>
590             <row>
591               <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
592               <entry>Load more packages from <replaceable>file</replaceable></entry>
593               <entry>static</entry>
594               <entry>-</entry>
595             </row>
596             <row>
597               <entry><option>-no-user-package-conf</option></entry>
598               <entry>Don't load the user's package config file.</entry>
599               <entry>static</entry>
600               <entry>-</entry>
601             </row>
602             <row>
603               <entry><option>-no-auto-link-packages</option></entry>
604               <entry>Don't automatically link in the haskell98 package.</entry>
605               <entry>dynamic</entry>
606               <entry>-</entry>
607             </row>
608           </tbody>
609         </tgroup>
610       </informaltable>
611     </sect2>
612
613     <sect2>
614       <title>Language options</title>
615
616       <para>Language options can be enabled either by a command-line option 
617       <option>-Xblah</option>, or by a <literal>{-# LANGUAGE blah #-}</literal>
618       pragma in the file itself.  See <xref linkend="options-language"/></para>
619
620       <informaltable>
621         <tgroup cols="4" align="left" colsep="1" rowsep="1">
622           <thead>
623             <row>
624               <entry>Flag</entry>
625               <entry>Description</entry>
626               <entry>Static/Dynamic</entry>
627               <entry>Reverse</entry>
628             </row>
629           </thead>
630           <tbody>
631             <row>
632               <entry><option>-fglasgow-exts</option></entry>
633               <entry>Enable most language extensions</entry>
634               <entry>dynamic</entry>
635               <entry><option>-fno-glasgow-exts</option></entry>
636             </row>
637             <row>
638               <entry><option>-XOverlappingInstances</option></entry>
639               <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
640               <entry>dynamic</entry>
641               <entry><option>-XNoOverlappingInstances</option></entry>
642             </row>
643             <row>
644               <entry><option>-XIncoherentInstances</option></entry>
645               <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.  
646               Implies <option>-XOverlappingInstances</option> </entry>
647               <entry>dynamic</entry>
648               <entry><option>-XNoIncoherentInstances</option></entry>
649             </row>
650             <row>
651               <entry><option>-XUndecidableInstances</option></entry>
652               <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
653               <entry>dynamic</entry>
654               <entry><option>-XNoUndecidableInstances</option></entry>
655             </row>
656             <row>
657               <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
658               <entry>set the <link linkend="undecidable-instances">limit for context reduction</link>. Default is 20.</entry>
659               <entry>dynamic</entry>
660               <entry></entry>
661             </row>
662             <row>
663               <entry><option>-XArrows</option></entry>
664               <entry>Enable <link linkend="arrow-notation">arrow
665               notation</link> extension</entry>
666               <entry>dynamic</entry>
667               <entry><option>-XNoArrows</option></entry>
668             </row>
669             <row>
670               <entry><option>-XDisambiguateRecordFields</option></entry>
671               <entry>Enable <link linkend="disambiguate-fields">record 
672               field disambiguation</link></entry>
673               <entry>dynamic</entry>
674               <entry><option>-XNoDisambiguateRecordFields</option></entry>
675             </row>
676             <row>
677               <entry><option>-XForeignFunctionInterface</option></entry>
678               <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
679               <option>-fglasgow-exts</option>)</entry>
680               <entry>dynamic</entry>
681               <entry><option>-XNoForeignFunctionInterface</option></entry>
682             </row>
683             <row>
684               <entry><option>-XGenerics</option></entry>
685               <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
686               <entry>dynamic</entry>
687               <entry><option>-XNoGenerics</option></entry>
688             </row>
689             <row>
690               <entry><option>-XImplicitParams</option></entry>
691               <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
692               Implied by <option>-fglasgow-exts</option>.</entry>
693               <entry>dynamic</entry>
694               <entry><option>-XNoImplicitParams</option></entry>
695             </row>
696             <row>
697               <entry><option>-firrefutable-tuples</option></entry>
698               <entry>Make tuple pattern matching irrefutable</entry>
699               <entry>dynamic</entry>
700               <entry><option>-fno-irrefutable-tuples</option></entry>
701             </row>
702             <row>
703               <entry><option>-XNoImplicitPrelude</option></entry>
704               <entry>Don't implicitly <literal>import Prelude</literal></entry>
705               <entry>dynamic</entry>
706               <entry><option>-XImplicitPrelude</option></entry>
707             </row>
708             <row>
709               <entry><option>-XRebindableSyntax</option></entry>
710               <entry>Employ <link linkend="rebindable-syntax">rebindable syntax</link></entry>
711               <entry>dynamic</entry>
712               <entry><option>-XNoRebindableSyntax</option></entry>
713             </row>
714             <row>
715               <entry><option>-XNoMonomorphismRestriction</option></entry>
716               <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
717               <entry>dynamic</entry>
718               <entry><option>-XMonomorphismRrestriction</option></entry>
719             </row>
720             <row>
721               <entry><option>-XNoNPlusKPatterns</option></entry>
722               <entry>Disable support for <literal>n+k</literal> patterns</entry>
723               <entry>dynamic</entry>
724               <entry><option>-XNPlusKPatterns</option></entry>
725             </row>
726             <row>
727               <entry><option>-XNoMonoPatBinds</option></entry>
728               <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
729               <entry>dynamic</entry>
730               <entry><option>-XMonoPatBinds</option></entry>
731             </row>
732             <row>
733               <entry><option>-XRelaxedPolyRec</option></entry>
734               <entry>Relaxed checking for <link linkend="typing-binds">mutually-recursive polymorphic functions</link></entry>
735               <entry>dynamic</entry>
736               <entry><option>-XNoRelaxedPolyRec</option></entry>
737             </row>
738             <row>
739               <entry><option>-XExtendedDefaultRules</option></entry>
740               <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
741               <entry>dynamic</entry>
742               <entry><option>-XNoExtendedDefaultRules</option></entry>
743             </row>
744             <row>
745               <entry><option>-XOverloadedStrings</option></entry>
746               <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
747               </entry>
748               <entry>dynamic</entry>
749               <entry><option>-XNoOverloadedStrings</option></entry>
750             </row>
751             <row>
752               <entry><option>-XGADTs</option></entry>
753               <entry>Enable <link linkend="gadt">generalised algebraic data types</link>.
754               </entry>
755               <entry>dynamic</entry>
756               <entry><option>-XNoGADTs</option></entry>
757             </row>
758             <row>
759               <entry><option>-XGADTSyntax</option></entry>
760               <entry>Enable <link linkend="gadt-style">generalised algebraic data type syntax</link>.
761               </entry>
762               <entry>dynamic</entry>
763               <entry><option>-XNoGADTSyntax</option></entry>
764             </row>
765             <row>
766               <entry><option>-XTypeFamilies</option></entry>
767               <entry>Enable <link linkend="type-families">type families</link>.</entry>
768               <entry>dynamic</entry>
769               <entry><option>-XNoTypeFamilies</option></entry>
770             </row>
771             <row>
772               <entry><option>-XScopedTypeVariables</option></entry>
773               <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
774               Implied by <option>-fglasgow-exts</option>.</entry>
775               <entry>dynamic</entry>
776               <entry><option>-XNoScopedTypeVariables</option></entry>
777             </row>
778             <row>
779               <entry><option>-XMonoLocalBinds</option></entry>
780               <entry>Enable <link linkend="mono-local-binds">do not generalise local bindings</link>.
781               </entry>
782               <entry>dynamic</entry>
783               <entry><option>-XNoMonoLocalBinds</option></entry>
784             </row>
785             <row>
786               <entry><option>-XTemplateHaskell</option></entry>
787               <entry>Enable <link linkend="template-haskell">Template Haskell</link>. 
788                 No longer implied by <option>-fglasgow-exts</option>.</entry>
789               <entry>dynamic</entry>
790               <entry><option>-XNoTemplateHaskell</option></entry>
791             </row>
792             <row>
793               <entry><option>-XQuasiQuotes</option></entry>
794               <entry>Enable <link linkend="th-quasiquotation">quasiquotation</link>.</entry>
795               <entry>dynamic</entry>
796               <entry><option>-XNoQuasiQuotes</option></entry>
797             </row>
798             <row>
799               <entry><option>-XBangPatterns</option></entry>
800               <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
801               <entry>dynamic</entry>
802               <entry><option>-XNoBangPatterns</option></entry>
803             </row>
804             <row>
805               <entry><option>-XCPP</option></entry>
806               <entry>Enable the <link linkend="c-pre-processor">C preprocessor</link>.</entry>
807               <entry>dynamic</entry>
808               <entry><option>-XNoCPP</option></entry>
809             </row>
810             <row>
811               <entry><option>-XPatternGuards</option></entry>
812               <entry>Enable <link linkend="pattern-guards">pattern guards</link>.</entry>
813               <entry>dynamic</entry>
814               <entry><option>-XNoPatternGuards</option></entry>
815             </row>
816             <row>
817               <entry><option>-XViewPatterns</option></entry>
818               <entry>Enable <link linkend="view-patterns">view patterns</link>.</entry>
819               <entry>dynamic</entry>
820               <entry><option>-XNoViewPatterns</option></entry>
821             </row>
822             <row>
823               <entry><option>-XUnicodeSyntax</option></entry>
824               <entry>Enable <link linkend="unicode-syntax">unicode syntax</link>.</entry>
825               <entry>dynamic</entry>
826               <entry><option>-XNoUnicodeSyntax</option></entry>
827             </row>
828             <row>
829               <entry><option>-XMagicHash</option></entry>
830               <entry>Allow "#" as a <link linkend="magic-hash">postfix modifier on identifiers</link>.</entry>
831               <entry>dynamic</entry>
832               <entry><option>-XNoMagicHash</option></entry>
833             </row>
834             <row>
835               <entry><option>-XExplicitForALl</option></entry>
836               <entry>Enable <link linkend="explicit-foralls">explicit universal quantification</link>.
837               Implied by <option>-XScopedTypeVariables</option>,
838             <option>-XLiberalTypeSynonyms</option>,
839             <option>-XRank2Types</option>,
840             <option>-XRankNTypes</option>,
841             <option>-XPolymorphicComponents</option>,
842             <option>-XExistentialQuantification</option>
843               </entry>
844               <entry>dynamic</entry>
845               <entry><option>-XNoExplicitForAll</option></entry>
846             </row>
847             <row>
848               <entry><option>-XPolymorphicComponents</option></entry>
849               <entry>Enable <link linkend="universal-quantification">polymorphic components for data constructors</link>.</entry>
850               <entry>dynamic</entry>
851               <entry><option>-XNoPolymorphicComponents</option></entry>
852             </row>
853             <row>
854               <entry><option>-XRank2Types</option></entry>
855               <entry>Enable <link linkend="universal-quantification">rank-2 types</link>.</entry>
856               <entry>dynamic</entry>
857               <entry><option>-XNoRank2Types</option></entry>
858             </row>
859             <row>
860               <entry><option>-XRankNTypes</option></entry>
861               <entry>Enable <link linkend="universal-quantification">rank-N types</link>.</entry>
862               <entry>dynamic</entry>
863               <entry><option>-XNoRankNTypes</option></entry>
864             </row>
865             <row>
866               <entry><option>-XImpredicativeTypes</option></entry>
867               <entry>Enable <link linkend="impredicative-polymorphism">impredicative types</link>.</entry>
868               <entry>dynamic</entry>
869               <entry><option>-XNoImpredicativeTypes</option></entry>
870             </row>
871             <row>
872               <entry><option>-XExistentialQuantification</option></entry>
873               <entry>Enable <link linkend="existential-quantification">existential quantification</link>.</entry>
874               <entry>dynamic</entry>
875               <entry><option>-XNoExistentialQuantification</option></entry>
876             </row>
877             <row>
878               <entry><option>-XKindSignatures</option></entry>
879               <entry>Enable <link linkend="kinding">kind signatures</link>.</entry>
880               <entry>dynamic</entry>
881               <entry><option>-XNoKindSignatures</option></entry>
882             </row>
883             <row>
884               <entry><option>-XEmptyDataDecls</option></entry>
885               <entry>Enable empty data declarations.</entry>
886               <entry>dynamic</entry>
887               <entry><option>-XNoEmptyDataDecls</option></entry>
888             </row>
889             <row>
890               <entry><option>-XParallelListComp</option></entry>
891               <entry>Enable <link linkend="parallel-list-comprehensions">parallel list comprehensions</link>.</entry>
892               <entry>dynamic</entry>
893               <entry><option>-XNoParallelListComp</option></entry>
894             </row>
895             <row>
896               <entry><option>-XTransformListComp</option></entry>
897               <entry>Enable <link linkend="generalised-list-comprehensions">generalised list comprehensions</link>.</entry>
898               <entry>dynamic</entry>
899               <entry><option>-XNoTransformListComp</option></entry>
900             </row>
901             <row>
902               <entry><option>-XUnliftedFFITypes</option></entry>
903               <entry>Enable unlifted FFI types.</entry>
904               <entry>dynamic</entry>
905               <entry><option>-XNoUnliftedFFITypes</option></entry>
906             </row>
907             <row>
908               <entry><option>-XLiberalTypeSynonyms</option></entry>
909               <entry>Enable <link linkend="type-synonyms">liberalised type synonyms</link>.</entry>
910               <entry>dynamic</entry>
911               <entry><option>-XNoLiberalTypeSynonyms</option></entry>
912             </row>
913             <row>
914               <entry><option>-XTypeOperators</option></entry>
915               <entry>Enable type operators.</entry>
916               <entry>dynamic</entry>
917               <entry><option>-XNoTypeOperators</option></entry>
918             </row>
919             <row>
920               <entry><option>-XDoRec</option></entry>
921               <entry>Enable <link linkend="recursive-do-notation">recursive do notation</link>.</entry>
922               <entry>dynamic</entry>
923               <entry><option>-XNoDoRec</option></entry>
924             </row>
925             <row>
926               <entry><option>-XRecursiveDo</option></entry>
927               <entry>Enable <link linkend="mdo-notation">recursive do (mdo) notation</link>. This is deprecated; please use <link linkend="recursive-do-notation">recursive do notation</link> instead.</entry>
928               <entry>dynamic</entry>
929               <entry><option>-XNoRecursiveDo</option></entry>
930             </row>
931             <row>
932               <entry><option>-XPArr</option></entry>
933               <entry>Enable parallel arrays.</entry>
934               <entry>dynamic</entry>
935               <entry><option>-XNoPArr</option></entry>
936             </row>
937             <row>
938               <entry><option>-XRecordWildCards</option></entry>
939               <entry>Enable <link linkend="record-wildcards">record wildcards</link>.</entry>
940               <entry>dynamic</entry>
941               <entry><option>-XNoRecordWildCards</option></entry>
942             </row>
943             <row>
944               <entry><option>-XNamedFieldPuns</option></entry>
945               <entry>Enable <link linkend="record-puns">record puns</link>.</entry>
946               <entry>dynamic</entry>
947               <entry><option>-XNoNamedFieldPuns</option></entry>
948             </row>
949             <row>
950               <entry><option>-XDisambiguateRecordFields</option></entry>
951               <entry>Enable  <link linkend="disambiguate-fields">record field disambiguation</link>. </entry>
952               <entry>dynamic</entry>
953               <entry><option>-XNoDisambiguateRecordFields</option></entry>
954             </row>
955             <row>
956               <entry><option>-XUnboxedTuples</option></entry>
957               <entry>Enable <link linkend="unboxed-tuples">unboxed tuples</link>.</entry>
958               <entry>dynamic</entry>
959               <entry><option>-XNoUnboxedTuples</option></entry>
960             </row>
961             <row>
962               <entry><option>-XStandaloneDeriving</option></entry>
963               <entry>Enable <link linkend="stand-alone-deriving">standalone deriving</link>.</entry>
964               <entry>dynamic</entry>
965               <entry><option>-XNoStandaloneDeriving</option></entry>
966             </row>
967             <row>
968               <entry><option>-XDeriveDataTypeable</option></entry>
969               <entry>Enable <link linkend="deriving-typeable">deriving for the Data and Typeable classes</link>.</entry>
970               <entry>dynamic</entry>
971               <entry><option>-XNoDeriveDataTypeable</option></entry>
972             </row>
973             <row>
974               <entry><option>-XGeneralizedNewtypeDeriving</option></entry>
975               <entry>Enable <link linkend="newtype-deriving">newtype deriving</link>.</entry>
976               <entry>dynamic</entry>
977               <entry><option>-XNoGeneralizedNewtypeDeriving</option></entry>
978             </row>
979             <row>
980               <entry><option>-XTypeSynonymInstances</option></entry>
981               <entry>Enable <link linkend="flexible-instance-head">type synonyms in instance heads</link>.</entry>
982               <entry>dynamic</entry>
983               <entry><option>-XNoTypeSynonymInstances</option></entry>
984             </row>
985             <row>
986               <entry><option>-XFlexibleContexts</option></entry>
987               <entry>Enable <link linkend="flexible-contexts">flexible contexts</link>.</entry>
988               <entry>dynamic</entry>
989               <entry><option>-XNoFlexibleContexts</option></entry>
990             </row>
991             <row>
992               <entry><option>-XFlexibleInstances</option></entry>
993               <entry>Enable <link linkend="instance-rules">flexible instances</link>.
994               Implies <option>-XTypeSynonymInstances</option> </entry>
995               <entry>dynamic</entry>
996               <entry><option>-XNoFlexibleInstances</option></entry>
997             </row>
998             <row>
999               <entry><option>-XConstrainedClassMethods</option></entry>
1000               <entry>Enable <link linkend="class-method-types">constrained class methods</link>.</entry>
1001               <entry>dynamic</entry>
1002               <entry><option>-XNoConstrainedClassMethods</option></entry>
1003             </row>
1004             <row>
1005               <entry><option>-XMultiParamTypeClasses</option></entry>
1006               <entry>Enable <link linkend="multi-param-type-classes">multi parameter type classes</link>.</entry>
1007               <entry>dynamic</entry>
1008               <entry><option>-XNoMultiParamTypeClasses</option></entry>
1009             </row>
1010             <row>
1011               <entry><option>-XFunctionalDependencies</option></entry>
1012               <entry>Enable <link linkend="functional-dependencies">functional dependencies</link>.</entry>
1013               <entry>dynamic</entry>
1014               <entry><option>-XNoFunctionalDependencies</option></entry>
1015             </row>
1016             <row>
1017               <entry><option>-XPackageImports</option></entry>
1018               <entry>Enable <link linkend="package-imports">package-qualified imports</link>.</entry>
1019               <entry>dynamic</entry>
1020               <entry><option>-XNoPackageImports</option></entry>
1021             </row>
1022           </tbody>
1023         </tgroup>
1024       </informaltable>
1025     </sect2>
1026
1027     <sect2>
1028       <title>Warnings</title>
1029       
1030       <para><xref linkend="options-sanity"/></para>
1031
1032     <informaltable>
1033       <tgroup cols="4" align="left" colsep="1" rowsep="1">
1034         <thead>
1035           <row>
1036             <entry>Flag</entry>
1037             <entry>Description</entry>
1038             <entry>Static/Dynamic</entry>
1039             <entry>Reverse</entry>
1040           </row>
1041         </thead>
1042         <tbody>
1043           <row>
1044             <entry><option>-W</option></entry>
1045             <entry>enable normal warnings</entry>
1046             <entry>dynamic</entry>
1047             <entry><option>-w</option></entry>
1048           </row>
1049           <row>
1050             <entry><option>-w</option></entry>
1051             <entry>disable all warnings</entry>
1052             <entry>dynamic</entry>
1053             <entry>-</entry>
1054           </row>
1055           <row>
1056             <entry><option>-Wall</option></entry>
1057             <entry>enable almost all warnings (details in <xref linkend="options-sanity"/>)</entry>
1058             <entry>dynamic</entry>
1059             <entry><option>-w</option></entry>
1060           </row>
1061           <row>
1062             <entry><option>-Werror</option></entry>
1063             <entry>make warnings fatal</entry>
1064             <entry>dynamic</entry>
1065             <entry>-Wwarn</entry>
1066           </row>
1067           <row>
1068             <entry><option>-Wwarn</option></entry>
1069             <entry>make warnings non-fatal</entry>
1070             <entry>dynamic</entry>
1071             <entry>-Werror</entry>
1072           </row>
1073
1074           <row>
1075             <entry><option>-fwarn-unrecognised-pragmas</option></entry>
1076             <entry>warn about uses of pragmas that GHC doesn't recognise</entry>
1077             <entry>dynamic</entry>
1078             <entry><option>-fno-warn-unrecognised-pragmas</option></entry>
1079           </row>
1080
1081           <row>
1082             <entry><option>-fwarn-warnings-deprecations</option></entry>
1083             <entry>warn about uses of functions &amp; types that have warnings or deprecated pragmas</entry>
1084             <entry>dynamic</entry>
1085             <entry><option>-fno-warn-warnings-deprecations</option></entry>
1086           </row>
1087
1088           <row>
1089             <entry><option>-fwarn-deprecated-flags</option></entry>
1090             <entry>warn about uses of commandline flags that are deprecated</entry>
1091             <entry>dynamic</entry>
1092             <entry><option>-fno-warn-deprecated-flags</option></entry>
1093           </row>
1094
1095           <row>
1096             <entry><option>-fwarn-duplicate-exports</option></entry>
1097             <entry>warn when an entity is exported multiple times</entry>
1098             <entry>dynamic</entry>
1099             <entry><option>-fno-warn-duplicate-exports</option></entry>
1100           </row>
1101
1102           <row>
1103             <entry><option>-fwarn-hi-shadowing</option></entry>
1104             <entry>warn when a <literal>.hi</literal> file in the
1105             current directory shadows a library</entry>
1106             <entry>dynamic</entry>
1107             <entry><option>-fno-warn-hi-shadowing</option></entry>
1108           </row>
1109
1110           <row>
1111             <entry><option>-fwarn-identities</option></entry>
1112             <entry>warn about uses of Prelude numeric conversions that are probably
1113                    the identity (and hence could be omitted)</entry>
1114             <entry>dynamic</entry>
1115             <entry><option>-fno-warn-identities</option></entry>
1116           </row>
1117
1118           <row>
1119             <entry><option>-fwarn-implicit-prelude</option></entry>
1120             <entry>warn when the Prelude is implicitly imported</entry>
1121             <entry>dynamic</entry>
1122             <entry><option>-fno-warn-implicit-prelude</option></entry>
1123           </row>
1124
1125           <row>
1126             <entry><option>-fwarn-incomplete-patterns</option></entry>
1127             <entry>warn when a pattern match could fail</entry>
1128             <entry>dynamic</entry>
1129             <entry><option>-fno-warn-incomplete-patterns</option></entry>
1130           </row>
1131
1132           <row>
1133             <entry><option>-fwarn-incomplete-uni-patterns</option></entry>
1134             <entry>warn when a pattern match in a lambda expression or pattern binding could fail</entry>
1135             <entry>dynamic</entry>
1136             <entry><option>-fno-warn-incomplete-uni-patterns</option></entry>
1137           </row>
1138
1139           <row>
1140             <entry><option>-fwarn-incomplete-record-updates</option></entry>
1141             <entry>warn when a record update could fail</entry>
1142             <entry>dynamic</entry>
1143             <entry><option>-fno-warn-incomplete-record-updates</option></entry>
1144           </row>
1145
1146           <row>
1147             <entry><option>-fwarn-lazy-unlifted-bindings</option></entry>
1148             <entry>warn when a pattern binding looks lazy but must be strict</entry>
1149             <entry>dynamic</entry>
1150             <entry><option>-fno-warn-lazy-unlifted-bindings</option></entry>
1151           </row>
1152
1153           <row>
1154             <entry><option>-fwarn-missing-fields</option></entry>
1155             <entry>warn when fields of a record are uninitialised</entry>
1156             <entry>dynamic</entry>
1157             <entry><option>-fno-warn-missing-fields</option></entry>
1158           </row>
1159
1160           <row>
1161             <entry><option>-fwarn-missing-import-lists</option></entry>
1162             <entry>warn when an import declaration does not explicitly 
1163                    list all the names brought into scope</entry>
1164             <entry>dynamic</entry>
1165             <entry><option>-fnowarn-missing-import-lists</option></entry>
1166           </row>
1167
1168           <row>
1169             <entry><option>-fwarn-missing-methods</option></entry>
1170             <entry>warn when class methods are undefined</entry>
1171             <entry>dynamic</entry>
1172             <entry><option>-fno-warn-missing-methods</option></entry>
1173           </row>
1174
1175           <row>
1176             <entry><option>-fwarn-missing-signatures</option></entry>
1177             <entry>warn about top-level functions without signatures</entry>
1178             <entry>dynamic</entry>
1179             <entry><option>-fno-warn-missing-signatures</option></entry>
1180           </row>
1181
1182           <row>
1183             <entry><option>-fwarn-missing-local-sigs</option></entry>
1184             <entry>warn about polymorphic local bindings without signatures</entry>
1185             <entry>dynamic</entry>
1186             <entry><option>-fno-warn-missing-local-sigs</option></entry>
1187           </row>
1188
1189           <row>
1190             <entry><option>-fwarn-name-shadowing</option></entry>
1191             <entry>warn when names are shadowed</entry>
1192             <entry>dynamic</entry>
1193             <entry><option>-fno-warn-name-shadowing</option></entry>
1194           </row>
1195
1196           <row>
1197             <entry><option>-fwarn-orphans</option></entry>
1198             <entry>warn when the module contains <link linkend="orphan-modules">orphan instance declarations
1199             or rewrite rules</link></entry>
1200             <entry>dynamic</entry>
1201             <entry><option>-fno-warn-orphans</option></entry>
1202           </row>
1203
1204           <row>
1205             <entry><option>-fwarn-overlapping-patterns</option></entry>
1206             <entry>warn about overlapping patterns</entry>
1207             <entry>dynamic</entry>
1208             <entry><option>-fno-warn-overlapping-patterns</option></entry>
1209           </row>
1210
1211           <row>
1212             <entry><option>-fwarn-tabs</option></entry>
1213             <entry>warn if there are tabs in the source file</entry>
1214             <entry>dynamic</entry>
1215             <entry><option>-fno-warn-tabs</option></entry>
1216           </row>
1217
1218           <row>
1219             <entry><option>-fwarn-type-defaults</option></entry>
1220             <entry>warn when defaulting happens</entry>
1221             <entry>dynamic</entry>
1222             <entry><option>-fno-warn-type-defaults</option></entry>
1223           </row>
1224
1225           <row>
1226             <entry><option>-fwarn-monomorphism-restriction</option></entry>
1227             <entry>warn when the Monomorphism Restriction is applied</entry>
1228             <entry>dynamic</entry>
1229             <entry><option>-fno-warn-monomorphism-restriction</option></entry>
1230           </row>
1231
1232           <row>
1233             <entry><option>-fwarn-unused-binds</option></entry>
1234             <entry>warn about bindings that are unused</entry>
1235             <entry>dynamic</entry>
1236             <entry><option>-fno-warn-unused-binds</option></entry>
1237           </row>
1238
1239           <row>
1240             <entry><option>-fwarn-unused-imports</option></entry>
1241             <entry>warn about unnecessary imports</entry>
1242             <entry>dynamic</entry>
1243             <entry><option>-fno-warn-unused-imports</option></entry>
1244           </row>
1245
1246           <row>
1247             <entry><option>-fwarn-unused-matches</option></entry>
1248             <entry>warn about variables in patterns that aren't used</entry>
1249             <entry>dynamic</entry>
1250             <entry><option>-fno-warn-unused-matches</option></entry>
1251           </row>
1252
1253           <row>
1254             <entry><option>-fwarn-unused-do-bind</option></entry>
1255             <entry>warn about do bindings that appear to throw away values of types other than <literal>()</literal></entry>
1256             <entry>dynamic</entry>
1257             <entry><option>-fno-warn-unused-do-bind</option></entry>
1258           </row>
1259
1260           <row>
1261             <entry><option>-fwarn-wrong-do-bind</option></entry>
1262             <entry>warn about do bindings that appear to throw away monadic values that you should have bound instead</entry>
1263             <entry>dynamic</entry>
1264             <entry><option>-fno-warn-wrong-do-bind</option></entry>
1265           </row>
1266
1267           </tbody>
1268         </tgroup>
1269       </informaltable>
1270
1271     </sect2>
1272     <sect2>
1273       <title>Optimisation levels</title>
1274
1275       <para><xref linkend="options-optimise"/></para>
1276
1277       <informaltable>
1278         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1279           <thead>
1280             <row>
1281               <entry>Flag</entry>
1282               <entry>Description</entry>
1283               <entry>Static/Dynamic</entry>
1284               <entry>Reverse</entry>
1285             </row>
1286           </thead>
1287           <tbody>
1288             <row>
1289               <entry><option>-O</option></entry>
1290               <entry>Enable default optimisation (level 1)</entry>
1291               <entry>dynamic</entry>
1292               <entry><option>-O0</option></entry>
1293             </row>
1294             <row>
1295               <entry><option>-O</option><replaceable>n</replaceable></entry>
1296               <entry>Set optimisation level <replaceable>n</replaceable></entry>
1297               <entry>dynamic</entry>
1298               <entry><option>-O0</option></entry>
1299             </row>
1300           </tbody>
1301         </tgroup>
1302       </informaltable>
1303               
1304     </sect2>
1305     <sect2>
1306       <title>Individual optimisations</title>
1307
1308       <para><xref linkend="options-f"/></para>
1309
1310       <informaltable>
1311         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1312           <thead>
1313             <row>
1314               <entry>Flag</entry>
1315               <entry>Description</entry>
1316               <entry>Static/Dynamic</entry>
1317               <entry>Reverse</entry>
1318             </row>
1319           </thead>
1320           <tbody>
1321             <row>
1322               <entry><option>-fcase-merge</option></entry>
1323               <entry>Enable case-merging. Implied by <option>-O</option>.</entry>
1324               <entry>dynamic</entry>
1325               <entry><option>-fno-case-merge</option></entry>
1326             </row>
1327
1328             <row>
1329               <entry><option>-fdicts-strict</option></entry>
1330               <entry>Make dictionaries strict</entry>
1331               <entry>static</entry>
1332               <entry><option>-fno-dicts-strict</option></entry>
1333             </row>
1334
1335             <row>
1336               <entry><option>-fmethod-sharing</option></entry>
1337               <entry>Share specialisations of overloaded functions (default)</entry>
1338               <entry>dynamic</entry>
1339               <entry><option>-fno-method-sharing</option></entry>
1340             </row>
1341
1342             <row>
1343               <entry><option>-fdo-eta-reduction</option></entry>
1344               <entry>Enable eta-reduction. Implied by <option>-O</option>.</entry>
1345               <entry>dynamic</entry>
1346               <entry><option>-fno-do-eta-reduction</option></entry>
1347             </row>
1348
1349             <row>
1350               <entry><option>-fdo-lambda-eta-expansion</option></entry>
1351               <entry>Enable lambda eta-reduction</entry>
1352               <entry>dynamic</entry>
1353               <entry><option>-fno-do-lambda-eta-expansion</option></entry>
1354             </row>
1355
1356             <row>
1357               <entry><option>-fexcess-precision</option></entry>
1358               <entry>Enable excess intermediate precision</entry>
1359               <entry>dynamic</entry>
1360               <entry><option>-fno-excess-precision</option></entry>
1361             </row>
1362
1363             <row>
1364               <entry><option>-fignore-asserts</option></entry>
1365               <entry>Ignore assertions in the source</entry>
1366               <entry>dynamic</entry>
1367               <entry><option>-fno-ignore-asserts</option></entry>
1368             </row>
1369
1370             <row>
1371               <entry><option>-fignore-interface-pragmas</option></entry>
1372               <entry>Ignore pragmas in interface files</entry>
1373               <entry>dynamic</entry>
1374               <entry><option>-fno-ignore-interface-pragmas</option></entry>
1375             </row>
1376
1377             <row>
1378               <entry><option>-fomit-interface-pragmas</option></entry>
1379               <entry>Don't generate interface pragmas</entry>
1380               <entry>dynamic</entry>
1381               <entry><option>-fno-omit-interface-pragmas</option></entry>
1382             </row>
1383
1384             <row>
1385               <entry><option>-fmax-worker-args</option></entry>
1386               <entry>If a worker has that many arguments, none will be
1387                 unpacked anymore (default: 10)</entry>
1388               <entry>static</entry>
1389               <entry>-</entry>
1390             </row>
1391
1392             <row>
1393               <entry><option>-fsimplifier-phases</option></entry>
1394               <entry>Set the number of phases for the simplifier (default 2).
1395               Ignored with <option>-O0</option>.</entry>
1396               <entry>dynamic</entry>
1397               <entry>-</entry>
1398             </row>
1399
1400             <row>
1401               <entry><option>-fmax-simplifier-iterations</option></entry>
1402               <entry>Set the max iterations for the simplifier</entry>
1403               <entry>dynamic</entry>
1404               <entry>-</entry>
1405             </row>
1406
1407             <row>
1408               <entry><option>-fno-state-hack</option></entry>
1409               <entry>Turn off the "state hack" whereby any lambda with a real-world state token
1410               as argument is considered to be single-entry.  Hence OK to inline things inside it.</entry>
1411               <entry>static</entry>
1412               <entry>-</entry>
1413             </row>
1414
1415             <row>
1416               <entry><option>-fcse</option></entry>
1417               <entry>Turn on common sub-expression elimination. Implied by <option>-O</option>.</entry>
1418               <entry>dynamic</entry>
1419               <entry>-fno-cse</entry>
1420             </row>
1421
1422             <row>
1423               <entry><option>-fspecialise</option></entry>
1424               <entry>Turn on specialisation of overloaded functions. Implied by <option>-O</option>.</entry>
1425               <entry>dynamic</entry>
1426               <entry>-fno-specialise</entry>
1427             </row>
1428
1429             <row>
1430               <entry><option>-ffull-laziness</option></entry>
1431               <entry>Turn on full laziness (floating bindings outwards). Implied by <option>-O</option>.</entry>
1432               <entry>dynamic</entry>
1433               <entry>-fno-full-laziness</entry>
1434             </row>
1435
1436             <row>
1437               <entry><option>-ffloat-in</option></entry>
1438               <entry>Turn on the float-in transformation. Implied by <option>-O</option>.</entry>
1439               <entry>dynamic</entry>
1440               <entry>-fno-float-in</entry>
1441             </row>
1442
1443             <row>
1444               <entry><option>-fenable-rewrite-rules</option></entry>
1445               <entry>Switch on all rewrite rules (including rules
1446               generated by automatic specialisation of overloaded functions).
1447               Implied by <option>-O</option>. </entry>
1448               <entry>dynamic</entry>
1449               <entry><option>-fno-enable-rewrite-rules</option></entry>
1450             </row>
1451
1452             <row>
1453               <entry><option>-fstrictness</option></entry>
1454               <entry>Turn on strictness analysis. Implied by <option>-O</option>.</entry>
1455               <entry>dynamic</entry>
1456               <entry>-fno-strictness</entry>
1457             </row>
1458
1459             <row>
1460               <entry><option>-fstrictness=before</option>=<replaceable>n</replaceable></entry>
1461               <entry>Run an additional strictness analysis before simplifier
1462 phase <replaceable>n</replaceable></entry>
1463               <entry>dynamic</entry>
1464               <entry>-</entry>
1465             </row>
1466
1467             <row>
1468               <entry><option>-fspec-constr</option></entry>
1469               <entry>Turn on the SpecConstr transformation. Implied by <option>-O2</option>.</entry>
1470               <entry>dynamic</entry>
1471               <entry>-fno-spec-constr</entry>
1472             </row>
1473
1474             <row>
1475               <entry><option>-fspec-constr-threshold</option>=<replaceable>n</replaceable></entry>
1476               <entry>Set the size threshold for the SpecConstr transformation to <replaceable>n</replaceable> (default: 200)</entry>
1477               <entry>static</entry>
1478               <entry><option>-fno-spec-constr-threshold</option></entry>
1479             </row>
1480
1481             <row>
1482               <entry><option>-fspec-constr-count</option>=<replaceable>n</replaceable></entry>
1483               <entry>Set to <replaceable>n</replaceable> (default: 3) the maximum number of 
1484                 specialisations that will be created for any one function
1485                 by the SpecConstr transformation</entry>
1486               <entry>static</entry>
1487               <entry><option>-fno-spec-constr-count</option></entry>
1488             </row>
1489
1490             <row>
1491               <entry><option>-fliberate-case</option></entry>
1492               <entry>Turn on the liberate-case transformation. Implied by <option>-O2</option>.</entry>
1493               <entry>dynamic</entry>
1494               <entry>-fno-liberate-case</entry>
1495             </row>
1496
1497             <row>
1498               <entry><option>-fstatic-argument-transformation</option></entry>
1499               <entry>Turn on the static argument transformation. Implied by <option>-O2</option>.</entry>
1500               <entry>dynamic</entry>
1501               <entry>-fno-static-argument-transformation</entry>
1502             </row>
1503
1504             <row>
1505               <entry><option>-fliberate-case-threshold</option>=<replaceable>n</replaceable></entry>
1506               <entry>Set the size threshold for the liberate-case transformation to <replaceable>n</replaceable> (default: 200)</entry>
1507               <entry>static</entry>
1508               <entry><option>-fno-liberate-case-threshold</option></entry>
1509             </row>
1510
1511             <row>
1512               <entry><option>-funbox-strict-fields</option></entry>
1513               <entry>Flatten strict constructor fields</entry>
1514               <entry>dynamic</entry>
1515               <entry><option>-fno-unbox-strict-fields</option></entry>
1516             </row>
1517
1518             <row>
1519               <entry><option>-funfolding-creation-threshold</option></entry>
1520               <entry>Tweak unfolding settings</entry>
1521               <entry>static</entry>
1522               <entry><option>-fno-unfolding-creation-threshold</option></entry>
1523             </row>
1524
1525             <row>
1526               <entry><option>-funfolding-fun-discount</option></entry>
1527               <entry>Tweak unfolding settings</entry>
1528               <entry>static</entry>
1529               <entry><option>-fno-unfolding-fun-discount</option></entry>
1530             </row>
1531
1532             <row>
1533               <entry><option>-funfolding-keeness-factor</option></entry>
1534               <entry>Tweak unfolding settings</entry>
1535               <entry>static</entry>
1536               <entry><option>-fno-unfolding-keeness-factor</option></entry>
1537             </row>
1538
1539             <row>
1540               <entry><option>-funfolding-use-threshold</option></entry>
1541               <entry>Tweak unfolding settings</entry>
1542               <entry>static</entry>
1543               <entry><option>-fno-unfolding-use-threshold</option></entry>
1544             </row>
1545
1546             <row>
1547               <entry><option>-fno-pre-inlining</option></entry>
1548               <entry>Turn off pre-inlining</entry>
1549               <entry>static</entry>
1550               <entry>-</entry>
1551             </row>
1552
1553             <row>
1554               <entry><option>-fno-opt-coercion</option></entry>
1555               <entry>Turn off the coercion optimiser</entry>
1556               <entry>static</entry>
1557               <entry>-</entry>
1558             </row>
1559
1560             <row>
1561               <entry><option>-feager-blackholing</option></entry>
1562               <entry>Turn on <link linkend="parallel-compile-options">eager blackholing</link></entry>
1563               <entry>dynamic</entry>
1564               <entry>-</entry>
1565             </row>
1566           </tbody>
1567         </tgroup>
1568       </informaltable>
1569     </sect2>
1570
1571     <sect2>
1572       <title>Profiling options</title>
1573       
1574       <para><xref linkend="profiling"/></para>
1575
1576       <informaltable>
1577         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1578           <thead>
1579             <row>
1580               <entry>Flag</entry>
1581               <entry>Description</entry>
1582               <entry>Static/Dynamic</entry>
1583               <entry>Reverse</entry>
1584             </row>
1585           </thead>
1586           <tbody>
1587             <row>
1588               <entry><option>-auto</option></entry>
1589               <entry>Auto-add <literal>_scc_</literal>s to all
1590               exported functions not marked INLINE</entry>
1591               <entry>dynamic</entry>
1592               <entry><option>-no-auto</option></entry>
1593             </row>
1594             <row>
1595               <entry><option>-auto-all</option></entry>
1596               <entry>Auto-add <literal>_scc_</literal>s to all
1597               top-level functions not marked INLINE</entry>
1598               <entry>dynamic</entry>
1599               <entry><option>-no-auto-all</option></entry>
1600             </row>
1601             <row>
1602               <entry><option>-caf-all</option></entry>
1603               <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1604               <entry>dynamic</entry>
1605               <entry><option>-no-caf-all</option></entry>
1606             </row>
1607             <row>
1608               <entry><option>-prof</option></entry>
1609               <entry>Turn on profiling</entry>
1610               <entry>static</entry>
1611               <entry>-</entry>
1612             </row>
1613             <row>
1614               <entry><option>-ticky</option></entry>
1615               <entry><link linkend="ticky-ticky">Turn on ticky-ticky profiling</link></entry>
1616               <entry>static</entry>
1617               <entry>-</entry>
1618             </row>
1619           </tbody>
1620         </tgroup>
1621       </informaltable>
1622     </sect2>
1623
1624     <sect2>
1625       <title>Program coverage options</title>
1626       
1627       <para><xref linkend="hpc"/></para>
1628
1629       <informaltable>
1630         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1631           <thead>
1632             <row>
1633               <entry>Flag</entry>
1634               <entry>Description</entry>
1635               <entry>Static/Dynamic</entry>
1636               <entry>Reverse</entry>
1637             </row>
1638           </thead>
1639           <tbody>
1640             <row>
1641               <entry><option>-fhpc</option></entry>
1642               <entry>Turn on Haskell program coverage instrumentation</entry>
1643               <entry>static</entry>
1644               <entry><option>-</option></entry>
1645             </row>
1646             <row>
1647               <entry><option>-hpcdir dir</option></entry>
1648               <entry>Directory to deposit .mix files during compilation (default is .hpc)</entry>
1649               <entry>dynamic</entry>
1650               <entry><option>-</option></entry>
1651             </row>
1652           </tbody>
1653         </tgroup>
1654       </informaltable>
1655     </sect2>
1656
1657     <sect2>
1658       <title>Haskell pre-processor options</title>
1659
1660       <para><xref linkend="pre-processor"/></para>
1661
1662       <informaltable>
1663         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1664           <thead>
1665             <row>
1666               <entry>Flag</entry>
1667               <entry>Description</entry>
1668               <entry>Static/Dynamic</entry>
1669               <entry>Reverse</entry>
1670             </row>
1671           </thead>
1672           <tbody>
1673             <row>
1674               <entry><option>-F</option></entry>
1675               <entry>
1676                   Enable the use of a pre-processor
1677                   (set with <option>-pgmF</option>)
1678               </entry>
1679               <entry>dynamic</entry>
1680               <entry>-</entry>
1681             </row>
1682           </tbody>
1683         </tgroup>
1684       </informaltable>
1685     </sect2>
1686
1687     <sect2>
1688       <title>C pre-processor options</title>
1689
1690       <para><xref linkend="c-pre-processor"/></para>
1691
1692       <informaltable>
1693         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1694           <thead>
1695             <row>
1696               <entry>Flag</entry>
1697               <entry>Description</entry>
1698               <entry>Static/Dynamic</entry>
1699               <entry>Reverse</entry>
1700             </row>
1701           </thead>
1702           <tbody>
1703             <row>
1704               <entry><option>-cpp</option></entry>
1705               <entry>Run the C pre-processor on Haskell source files</entry>
1706               <entry>dynamic</entry>
1707               <entry>-</entry>
1708             </row>
1709             <row>
1710               <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1711               <entry>Define a symbol in the C pre-processor</entry>
1712               <entry>dynamic</entry>
1713               <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1714             </row>
1715             <row>
1716               <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1717               <entry>Undefine a symbol in the C pre-processor</entry>
1718               <entry>dynamic</entry>
1719               <entry>-</entry>
1720             </row>
1721             <row>
1722               <entry><option>-I</option><replaceable>dir</replaceable></entry>
1723               <entry>Add <replaceable>dir</replaceable> to the
1724               directory search list for <literal>#include</literal> files</entry>
1725               <entry>dynamic</entry>
1726               <entry>-</entry>
1727             </row>
1728           </tbody>
1729         </tgroup>
1730       </informaltable>
1731     </sect2>
1732
1733     <sect2>
1734       <title>Code generation options</title>
1735
1736       <para><xref linkend="options-codegen"/></para>
1737
1738       <informaltable>
1739         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1740           <thead>
1741             <row>
1742               <entry>Flag</entry>
1743               <entry>Description</entry>
1744               <entry>Static/Dynamic</entry>
1745               <entry>Reverse</entry>
1746             </row>
1747           </thead>
1748           <tbody>
1749             <row>
1750               <entry><option>-fasm</option></entry>
1751               <entry>Use the native code generator</entry>
1752               <entry>dynamic</entry>
1753               <entry>-fllvm</entry>
1754             </row>
1755             <row>
1756               <entry><option>-fllvm</option></entry>
1757               <entry>Compile via LLVM</entry>
1758               <entry>dynamic</entry>
1759               <entry>-fasm</entry>
1760             </row>
1761             <row>
1762               <entry><option>-fno-code</option></entry>
1763               <entry>Omit code generation</entry>
1764               <entry>dynamic</entry>
1765               <entry>-</entry>
1766             </row>
1767             <row>
1768               <entry><option>-fbyte-code</option></entry>
1769               <entry>Generate byte-code</entry>
1770               <entry>dynamic</entry>
1771               <entry>-</entry>
1772             </row>
1773             <row>
1774               <entry><option>-fobject-code</option></entry>
1775               <entry>Generate object code</entry>
1776               <entry>dynamic</entry>
1777               <entry>-</entry>
1778             </row>
1779           </tbody>
1780         </tgroup>
1781       </informaltable>
1782     </sect2>
1783
1784     <sect2>
1785       <title>Linking options</title>
1786
1787       <para><xref linkend="options-linker"/></para>
1788
1789       <informaltable>
1790         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1791           <thead>
1792             <row>
1793               <entry>Flag</entry>
1794               <entry>Description</entry>
1795               <entry>Static/Dynamic</entry>
1796               <entry>Reverse</entry>
1797             </row>
1798           </thead>
1799           <tbody>
1800             <row>
1801               <entry><option>-shared</option></entry>
1802               <entry>Generate a shared library (as opposed to an executable)</entry>
1803               <entry>dynamic</entry>
1804               <entry>-</entry>
1805             </row>
1806             <row>
1807               <entry><option>-fPIC</option></entry>
1808               <entry>Generate position-independent code (where available)</entry>
1809               <entry>static</entry>
1810               <entry>-</entry>
1811             </row>
1812             <row>
1813               <entry><option>-dynamic</option></entry>
1814               <entry>Use dynamic Haskell libraries (if available)</entry>
1815               <entry>static</entry>
1816               <entry>-</entry>
1817             </row>
1818             <row>
1819               <entry><option>-dynload</option></entry>
1820               <entry>Selects one of a number of modes for finding shared
1821                 libraries at runtime.</entry>
1822               <entry>static</entry>
1823               <entry>-</entry>
1824             </row>
1825             <row>
1826               <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1827               <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1828                 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1829               <entry>dynamic</entry>
1830               <entry>-</entry>
1831             </row>
1832             <row>
1833               <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1834               <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1835                 directories searched for frameworks.
1836                 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1837               <entry>dynamic</entry>
1838               <entry>-</entry>
1839             </row>
1840             <row>
1841               <entry><option>-l</option><replaceable>lib</replaceable></entry>
1842               <entry>Link in library <replaceable>lib</replaceable></entry>
1843               <entry>dynamic</entry>
1844               <entry>-</entry>
1845             </row>
1846             <row>
1847               <entry><option>-L</option><replaceable>dir</replaceable></entry>
1848               <entry>Add <replaceable>dir</replaceable> to the list of
1849               directories searched for libraries</entry>
1850               <entry>dynamic</entry>
1851               <entry>-</entry>
1852             </row>
1853             <row>
1854               <entry><option>-main-is</option></entry>
1855               <entry>Set main module and function</entry>
1856               <entry>dynamic</entry>
1857               <entry>-</entry>
1858             </row>
1859             <row>
1860               <entry><option>--mk-dll</option></entry>
1861               <entry>DLL-creation mode (Windows only)</entry>
1862               <entry>dynamic</entry>
1863               <entry>-</entry>
1864             </row>
1865             <row>
1866               <entry><option>-no-hs-main</option></entry>
1867               <entry>Don't assume this program contains <literal>main</literal></entry>
1868               <entry>dynamic</entry>
1869               <entry>-</entry>
1870             </row>
1871             <row>
1872               <entry><option>-rtsopts</option>, <option>-rtsopts={none,some,all}</option></entry>
1873               <entry>Control whether the RTS behaviour can be tweaked via command-line
1874           flags and the <literal>GHCRTS</literal> environment
1875           variable. Using <literal>none</literal> means no RTS flags can be given; <literal>some</literal> means only a minimum of safe options can be given (the default), and <literal>all</literal> (or no argument at all) means that all RTS flags are permitted.</entry>
1876               <entry>dynamic</entry>
1877               <entry>-</entry>
1878             </row>
1879             <row>
1880               <entry><option>-with-rtsopts=<replaceable>opts</replaceable></option></entry>
1881               <entry>Set the default RTS options to
1882           <replaceable>opts</replaceable>.</entry>
1883               <entry>dynamic</entry>
1884               <entry>-</entry>
1885             </row>
1886             <row>
1887               <entry><option>-no-link</option></entry>
1888               <entry>Omit linking</entry>
1889               <entry>dynamic</entry>
1890               <entry>-</entry>
1891             </row>
1892             <row>
1893               <entry><option>-split-objs</option></entry>
1894               <entry>Split objects (for libraries)</entry>
1895               <entry>dynamic</entry>
1896               <entry>-</entry>
1897             </row>
1898             <row>
1899               <entry><option>-static</option></entry>
1900               <entry>Use static Haskell libraries</entry>
1901               <entry>static</entry>
1902               <entry>-</entry>
1903             </row>
1904             <row>
1905               <entry><option>-threaded</option></entry>
1906               <entry>Use the threaded runtime</entry>
1907               <entry>static</entry>
1908               <entry>-</entry>
1909             </row>
1910             <row>
1911               <entry><option>-debug</option></entry>
1912               <entry>Use the debugging runtime</entry>
1913               <entry>static</entry>
1914               <entry>-</entry>
1915             </row>
1916             <row>
1917               <entry><option>-eventlog</option></entry>
1918               <entry>Enable runtime event tracing</entry>
1919               <entry>static</entry>
1920               <entry>-</entry>
1921             </row>
1922             <row>
1923               <entry><option>-fno-gen-manifest</option></entry>
1924               <entry>Do not generate a manifest file (Windows only)</entry>
1925               <entry>dynamic</entry>
1926               <entry>-</entry>
1927             </row>
1928             <row>
1929               <entry><option>-fno-embed-manifest</option></entry>
1930               <entry>Do not embed the manifest in the executable (Windows only)</entry>
1931               <entry>dynamic</entry>
1932               <entry>-</entry>
1933             </row>
1934             <row>
1935               <entry><option>-fno-shared-implib</option></entry>
1936               <entry>Don't generate an import library for a DLL (Windows only)</entry>
1937               <entry>dynamic</entry>
1938               <entry>-</entry>
1939             </row>
1940             <row>
1941               <entry><option>-dylib-install-name</option> <replaceable>path</replaceable></entry>
1942               <entry>Set the install name (via <literal>-install_name</literal> passed to Apple's
1943               linker), specifying the full install path of the library file. Any libraries
1944               or executables that link with it later will pick up that path as their
1945               runtime search location for it. (Darwin/MacOS X only)</entry>
1946               <entry>dynamic</entry>
1947               <entry>-</entry>
1948             </row>
1949           </tbody>
1950         </tgroup>
1951       </informaltable>
1952     </sect2>
1953
1954     <sect2>
1955       <title>Replacing phases</title>
1956
1957       <para><xref linkend="replacing-phases"/></para>
1958
1959       <informaltable>
1960         <tgroup cols="4" align="left" colsep="1" rowsep="1">
1961           <thead>
1962             <row>
1963               <entry>Flag</entry>
1964               <entry>Description</entry>
1965               <entry>Static/Dynamic</entry>
1966               <entry>Reverse</entry>
1967             </row>
1968           </thead>
1969           <tbody>
1970             <row>
1971               <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1972               <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1973               <entry>dynamic</entry>
1974               <entry>-</entry>
1975             </row>
1976             <row>
1977               <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1978               <entry>Use <replaceable>cmd</replaceable> as the C
1979               pre-processor (with <option>-cpp</option> only)</entry>
1980               <entry>dynamic</entry>
1981               <entry>-</entry>
1982             </row>
1983             <row>
1984               <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1985               <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1986               <entry>dynamic</entry>
1987               <entry>-</entry>
1988             <row>
1989               <entry><option>-pgmlo</option> <replaceable>cmd</replaceable></entry>
1990               <entry>Use <replaceable>cmd</replaceable> as the LLVM optimiser</entry>
1991               <entry>dynamic</entry>
1992               <entry>-</entry>
1993             </row>
1994             <row>
1995               <entry><option>-pgmlc</option> <replaceable>cmd</replaceable></entry>
1996               <entry>Use <replaceable>cmd</replaceable> as the LLVM compiler</entry>
1997               <entry>dynamic</entry>
1998               <entry>-</entry>
1999             </row>
2000             </row>
2001             <row>
2002               <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
2003               <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
2004               <entry>dynamic</entry>
2005               <entry>-</entry>
2006             </row>
2007             <row>
2008               <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
2009               <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
2010               <entry>dynamic</entry>
2011               <entry>-</entry>
2012             </row>
2013             <row>
2014               <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
2015               <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
2016               <entry>dynamic</entry>
2017               <entry>-</entry>
2018             </row>
2019             <row>
2020               <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
2021               <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
2022               <entry>dynamic</entry>
2023               <entry>-</entry>
2024             </row>
2025             <row>
2026               <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
2027               <entry>Use <replaceable>cmd</replaceable> as the pre-processor
2028               (with <option>-F</option> only)</entry>
2029               <entry>dynamic</entry>
2030               <entry>-</entry>
2031             </row>
2032             <row>
2033               <entry><option>-pgmwindres</option> <replaceable>cmd</replaceable></entry>
2034               <entry>Use <replaceable>cmd</replaceable> as the program for
2035                 embedding manifests on Windows.</entry>
2036               <entry>dynamic</entry>
2037               <entry>-</entry>
2038             </row>
2039           </tbody>
2040         </tgroup>
2041       </informaltable>
2042       <indexterm><primary><option>-pgmL</option></primary></indexterm>
2043       <indexterm><primary><option>-pgmP</option></primary></indexterm>
2044       <indexterm><primary><option>-pgmc</option></primary></indexterm>
2045       <indexterm><primary><option>-pgmlo</option></primary></indexterm>
2046       <indexterm><primary><option>-pgmlc</option></primary></indexterm>
2047       <indexterm><primary><option>-pgma</option></primary></indexterm>
2048       <indexterm><primary><option>-pgml</option></primary></indexterm>
2049       <indexterm><primary><option>-pgmdll</option></primary></indexterm>
2050       <indexterm><primary><option>-pgmF</option></primary></indexterm>
2051
2052     </sect2>
2053
2054     <sect2>
2055       <title>Forcing options to particular phases</title>
2056
2057       <para><xref linkend="forcing-options-through"/></para>
2058
2059       <informaltable>
2060         <tgroup cols="4" align="left" colsep="1" rowsep="1">
2061           <thead>
2062             <row>
2063               <entry>Flag</entry>
2064               <entry>Description</entry>
2065               <entry>Static/Dynamic</entry>
2066               <entry>Reverse</entry>
2067             </row>
2068           </thead>
2069           <tbody>
2070             <row>
2071               <entry><option>-optL</option> <replaceable>option</replaceable></entry>
2072               <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
2073               <entry>dynamic</entry>
2074               <entry>-</entry>
2075             </row>
2076             <row>
2077               <entry><option>-optP</option> <replaceable>option</replaceable></entry>
2078               <entry>pass <replaceable>option</replaceable> to cpp (with
2079               <option>-cpp</option> only)</entry>
2080               <entry>dynamic</entry>
2081               <entry>-</entry>
2082             </row>
2083             <row>
2084               <entry><option>-optF</option> <replaceable>option</replaceable></entry>
2085               <entry>pass <replaceable>option</replaceable> to the
2086               custom pre-processor</entry>
2087               <entry>dynamic</entry>
2088               <entry>-</entry>
2089             </row>
2090             <row>
2091               <entry><option>-optc</option> <replaceable>option</replaceable></entry>
2092               <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
2093               <entry>dynamic</entry>
2094               <entry>-</entry>
2095             </row>
2096             <row>
2097               <entry><option>-optlo</option> <replaceable>option</replaceable></entry>
2098               <entry>pass <replaceable>option</replaceable> to the LLVM optimiser</entry>
2099               <entry>dynamic</entry>
2100               <entry>-</entry>
2101             </row>
2102             <row>
2103               <entry><option>-optlc</option> <replaceable>option</replaceable></entry>
2104               <entry>pass <replaceable>option</replaceable> to the LLVM compiler</entry>
2105               <entry>dynamic</entry>
2106               <entry>-</entry>
2107             </row>
2108             <row>
2109               <entry><option>-optm</option> <replaceable>option</replaceable></entry>
2110               <entry>pass <replaceable>option</replaceable> to the mangler</entry>
2111               <entry>dynamic</entry>
2112               <entry>-</entry>
2113             </row>
2114             <row>
2115               <entry><option>-opta</option> <replaceable>option</replaceable></entry>
2116               <entry>pass <replaceable>option</replaceable> to the assembler</entry>
2117               <entry>dynamic</entry>
2118               <entry>-</entry>
2119             </row>
2120             <row>
2121               <entry><option>-optl</option> <replaceable>option</replaceable></entry>
2122               <entry>pass <replaceable>option</replaceable> to the linker</entry>
2123               <entry>dynamic</entry>
2124               <entry>-</entry>
2125             </row>
2126             <row>
2127               <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
2128               <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
2129               <entry>dynamic</entry>
2130               <entry>-</entry>
2131             </row>
2132             <row>
2133               <entry><option>-optwindres</option> <replaceable>option</replaceable></entry>
2134               <entry>pass <replaceable>option</replaceable> to <literal>windres</literal>.</entry>
2135               <entry>dynamic</entry>
2136               <entry>-</entry>
2137             </row>
2138           </tbody>
2139         </tgroup>
2140       </informaltable>
2141     </sect2>
2142
2143     <sect2>
2144       <title>Platform-specific options</title>
2145       
2146       <para><xref linkend="options-platform"/></para>
2147
2148       <informaltable>
2149         <tgroup cols="4" align="left" colsep="1" rowsep="1">
2150           <thead>
2151             <row>
2152               <entry>Flag</entry>
2153               <entry>Description</entry>
2154               <entry>Static/Dynamic</entry>
2155               <entry>Reverse</entry>
2156             </row>
2157           </thead>
2158           <tbody>
2159             <row>
2160               <entry><option>-msse2</option></entry>
2161               <entry>(x86 only) Use SSE2 for floating point</entry>
2162               <entry>dynamic</entry>
2163               <entry>-</entry>
2164             </row>
2165           </tbody>
2166           <tbody>
2167             <row>
2168               <entry><option>-monly-[432]-regs</option></entry>
2169               <entry>(x86 only) give some registers back to the C compiler</entry>
2170               <entry>dynamic</entry>
2171               <entry>-</entry>
2172             </row>
2173           </tbody>
2174         </tgroup>
2175       </informaltable>
2176     </sect2>
2177
2178          
2179     <sect2>
2180       <title>External core file options</title>
2181
2182       <para><xref linkend="ext-core"/></para>
2183
2184       <informaltable>
2185         <tgroup cols="4" align="left" colsep="1" rowsep="1">
2186           <thead>
2187             <row>
2188               <entry>Flag</entry>
2189               <entry>Description</entry>
2190               <entry>Static/Dynamic</entry>
2191               <entry>Reverse</entry>
2192             </row>
2193           </thead>
2194           <tbody>
2195             <row>
2196               <entry><option>-fext-core</option></entry>
2197               <entry>Generate <filename>.hcr</filename> external Core files</entry>
2198               <entry>dynamic</entry>
2199               <entry>-</entry>
2200             </row>
2201           </tbody>
2202         </tgroup>
2203       </informaltable>
2204     </sect2>
2205
2206
2207     <sect2>
2208       <title>Compiler debugging options</title>
2209
2210       <para><xref linkend="options-debugging"/></para>
2211
2212       <informaltable>
2213         <tgroup cols="4" align="left" colsep="1" rowsep="1">
2214           <thead>
2215             <row>
2216               <entry>Flag</entry>
2217               <entry>Description</entry>
2218               <entry>Static/Dynamic</entry>
2219               <entry>Reverse</entry>
2220             </row>
2221           </thead>
2222           <tbody>
2223             <row>
2224               <entry><option>-dcore-lint</option></entry>
2225               <entry>Turn on internal sanity checking</entry>
2226               <entry>dynamic</entry>
2227               <entry>-</entry>
2228             </row>
2229             <row>
2230               <entry><option>-ddump-asm</option></entry>
2231               <entry>Dump assembly</entry>
2232               <entry>dynamic</entry>
2233               <entry>-</entry>
2234             </row>
2235             <row>
2236               <entry><option>-ddump-bcos</option></entry>
2237               <entry>Dump interpreter byte code</entry>
2238               <entry>dynamic</entry>
2239               <entry>-</entry>
2240             </row>
2241             <row>
2242               <entry><option>-ddump-cmm</option></entry>
2243               <entry>Dump C-- output</entry>
2244               <entry>dynamic</entry>
2245               <entry>-</entry>
2246             </row>
2247             <row>
2248               <entry><option>-ddump-core-stats</option></entry>
2249               <entry>Print a one-line summary of the size of the Core program
2250                      at the end of the optimisation pipeline </entry>
2251               <entry>dynamic</entry>
2252               <entry>-</entry>
2253             </row>
2254             <row>
2255               <entry><option>-ddump-cpranal</option></entry>
2256               <entry>Dump output from CPR analysis</entry>
2257               <entry>dynamic</entry>
2258               <entry>-</entry>
2259             </row>
2260             <row>
2261               <entry><option>-ddump-cse</option></entry>
2262               <entry>Dump CSE output</entry>
2263               <entry>dynamic</entry>
2264               <entry>-</entry>
2265             </row>
2266             <row>
2267               <entry><option>-ddump-deriv</option></entry>
2268               <entry>Dump deriving output</entry>
2269               <entry>dynamic</entry>
2270               <entry>-</entry>
2271             </row>
2272             <row>
2273               <entry><option>-ddump-ds</option></entry>
2274               <entry>Dump desugarer output</entry>
2275               <entry>dynamic</entry>
2276               <entry>-</entry>
2277             </row>
2278             <row>
2279               <entry><option>-ddump-flatC</option></entry>
2280               <entry>Dump &ldquo;flat&rdquo; C</entry>
2281               <entry>dynamic</entry>
2282               <entry>-</entry>
2283             </row>
2284             <row>
2285               <entry><option>-ddump-foreign</option></entry>
2286               <entry>Dump <literal>foreign export</literal> stubs</entry>
2287               <entry>dynamic</entry>
2288               <entry>-</entry>
2289             </row>
2290             <row>
2291               <entry><option>-ddump-hpc</option></entry>
2292               <entry>Dump after instrumentation for program coverage</entry>
2293               <entry>dynamic</entry>
2294               <entry>-</entry>
2295             </row>
2296             <row>
2297               <entry><option>-ddump-inlinings</option></entry>
2298               <entry>Dump inlining info</entry>
2299               <entry>dynamic</entry>
2300               <entry>-</entry>
2301             </row>
2302             <row>
2303               <entry><option>-ddump-llvm</option></entry>
2304               <entry>Dump LLVM intermediate code</entry>
2305               <entry>dynamic</entry>
2306               <entry>-</entry>
2307             </row>
2308             <row>
2309               <entry><option>-ddump-occur-anal</option></entry>
2310               <entry>Dump occurrence analysis output</entry>
2311               <entry>dynamic</entry>
2312               <entry>-</entry>
2313             </row>
2314             <row>
2315               <entry><option>-ddump-opt-cmm</option></entry>
2316               <entry>Dump the results of C-- to C-- optimising passes</entry>
2317               <entry>dynamic</entry>
2318               <entry>-</entry>
2319             </row>
2320             <row>
2321               <entry><option>-ddump-parsed</option></entry>
2322               <entry>Dump parse tree</entry>
2323               <entry>dynamic</entry>
2324               <entry>-</entry>
2325             </row>
2326             <row>
2327               <entry><option>-ddump-prep</option></entry>
2328               <entry>Dump prepared core</entry>
2329               <entry>dynamic</entry>
2330               <entry>-</entry>
2331             </row>
2332             <row>
2333               <entry><option>-ddump-rn</option></entry>
2334               <entry>Dump renamer output</entry>
2335               <entry>dynamic</entry>
2336               <entry>-</entry>
2337             </row>
2338             <row>
2339               <entry><option>-ddump-rule-firings</option></entry>
2340               <entry>Dump rule firing info</entry>
2341               <entry>dynamic</entry>
2342               <entry>-</entry>
2343             </row>
2344             <row>
2345               <entry><option>-ddump-rule-rewrites</option></entry>
2346               <entry>Dump detailed rule firing info</entry>
2347               <entry>dynamic</entry>
2348               <entry>-</entry>
2349             </row>
2350       <row>
2351         <entry><option>-ddump-rules</option></entry>
2352         <entry>Dump rules</entry>
2353         <entry>dynamic</entry>
2354         <entry>-</entry>
2355       </row>
2356       <row>
2357         <entry><option>-ddump-vect</option></entry>
2358         <entry>Dump vectoriser input and output</entry>
2359         <entry>dynamic</entry>
2360         <entry>-</entry>
2361       </row>
2362             <row>
2363               <entry><option>-ddump-simpl</option></entry>
2364               <entry>Dump final simplifier output</entry>
2365               <entry>dynamic</entry>
2366               <entry>-</entry>
2367             </row>
2368             <row>
2369               <entry><option>-ddump-simpl-phases</option></entry>
2370               <entry>Dump output from each simplifier phase</entry>
2371               <entry>dynamic</entry>
2372               <entry>-</entry>
2373             </row>
2374             <row>
2375               <entry><option>-ddump-simpl-iterations</option></entry>
2376               <entry>Dump output from each simplifier iteration</entry>
2377               <entry>dynamic</entry>
2378               <entry>-</entry>
2379             </row>
2380             <row>
2381               <entry><option>-ddump-spec</option></entry>
2382               <entry>Dump specialiser output</entry>
2383               <entry>dynamic</entry>
2384               <entry>-</entry>
2385             </row>
2386             <row>
2387               <entry><option>-ddump-splices</option></entry>
2388               <entry>Dump TH spliced expressions, and what they evaluate to</entry>
2389               <entry>dynamic</entry>
2390               <entry>-</entry>
2391             </row>
2392             <row>
2393               <entry><option>-ddump-stg</option></entry>
2394               <entry>Dump final STG</entry>
2395               <entry>dynamic</entry>
2396               <entry>-</entry>
2397             </row>
2398             <row>
2399               <entry><option>-ddump-stranal</option></entry>
2400               <entry>Dump strictness analyser output</entry>
2401               <entry>dynamic</entry>
2402               <entry>-</entry>
2403             </row>
2404             <row>
2405               <entry><option>-ddump-tc</option></entry>
2406               <entry>Dump typechecker output</entry>
2407               <entry>dynamic</entry>
2408               <entry>-</entry>
2409             </row>
2410             <row>
2411               <entry><option>-ddump-types</option></entry>
2412               <entry>Dump type signatures</entry>
2413               <entry>dynamic</entry>
2414               <entry>-</entry>
2415             </row>
2416             <row>
2417               <entry><option>-ddump-worker-wrapper</option></entry>
2418               <entry>Dump worker-wrapper output</entry>
2419               <entry>dynamic</entry>
2420               <entry>-</entry>
2421             </row>
2422             <row>
2423               <entry><option>-ddump-if-trace</option></entry>
2424               <entry>Trace interface files</entry>
2425               <entry>dynamic</entry>
2426               <entry>-</entry>
2427             </row>
2428       <row>
2429         <entry><option>-ddump-tc-trace</option></entry>
2430         <entry>Trace typechecker</entry>
2431         <entry>dynamic</entry>
2432         <entry>-</entry>
2433       </row>
2434       <row>
2435         <entry><option>-ddump-vt-trace</option></entry>
2436         <entry>Trace vectoriser</entry>
2437         <entry>dynamic</entry>
2438         <entry>-</entry>
2439       </row>
2440             <row>
2441               <entry><option>-ddump-rn-trace</option></entry>
2442               <entry>Trace renamer</entry>
2443               <entry>dynamic</entry>
2444               <entry>-</entry>
2445             </row>
2446             <row>
2447               <entry><option>-ddump-rn-stats</option></entry>
2448               <entry>Renamer stats</entry>
2449               <entry>dynamic</entry>
2450               <entry>-</entry>
2451             </row>
2452             <row>
2453               <entry><option>-ddump-simpl-stats</option></entry>
2454               <entry>Dump simplifier stats</entry>
2455               <entry>dynamic</entry>
2456               <entry>-</entry>
2457             </row>
2458             <row>
2459               <entry><option>-dno-debug-output</option></entry>
2460               <entry>Suppress unsolicited debugging output</entry>
2461               <entry>static</entry>
2462               <entry>-</entry>
2463             </row>
2464             <row>
2465               <entry><option>-dppr-debug</option></entry>
2466               <entry>Turn on debug printing (more verbose)</entry>
2467               <entry>static</entry>
2468               <entry>-</entry>
2469             </row>
2470             <row>
2471               <entry><option>-dsuppress-uniques</option></entry>
2472               <entry>Suppress the printing of uniques in debug output (easier to use <command>diff</command>.</entry>
2473               <entry>static</entry>
2474               <entry>-</entry>
2475             </row>
2476             <row>
2477               <entry><option>-dsuppress-coercions</option></entry>
2478               <entry>Suppress the printing of coercions in Core dumps to make them shorter.</entry>
2479               <entry>static</entry>
2480               <entry>-</entry>
2481             </row>
2482             <row>
2483               <entry><option>-dsuppress-module-prefixes</option></entry>
2484               <entry>Suppress the printing of module qualification prefixes in Core dumps to make them easier to read.</entry>
2485               <entry>static</entry>
2486               <entry>-</entry>
2487             </row>
2488             <row>
2489               <entry><option>-dppr-noprags</option></entry>
2490               <entry>Don't output pragma info in dumps</entry>
2491               <entry>static</entry>
2492               <entry>-</entry>
2493             </row>
2494             <row>
2495               <entry><option>-dppr-user-length</option></entry>
2496               <entry>Set the depth for printing expressions in error msgs</entry>
2497               <entry>static</entry>
2498               <entry>-</entry>
2499             </row>
2500             <row>
2501               <entry><option>-dsource-stats</option></entry>
2502               <entry>Dump haskell source stats</entry>
2503               <entry>dynamic</entry>
2504               <entry>-</entry>
2505             </row>
2506             <row>
2507               <entry><option>-dcmm-lint</option></entry>
2508               <entry>C-- pass sanity checking</entry>
2509               <entry>dynamic</entry>
2510               <entry>-</entry>
2511             </row>
2512             <row>
2513               <entry><option>-dstg-lint</option></entry>
2514               <entry>STG pass sanity checking</entry>
2515               <entry>dynamic</entry>
2516               <entry>-</entry>
2517             </row>
2518             <row>
2519               <entry><option>-dstg-stats</option></entry>
2520               <entry>Dump STG stats</entry>
2521               <entry>dynamic</entry>
2522               <entry>-</entry>
2523             </row>
2524             <row>
2525               <entry><option>-dverbose-core2core</option></entry>
2526               <entry>Show output from each core-to-core pass</entry>
2527               <entry>dynamic</entry>
2528               <entry>-</entry>
2529             </row>
2530             <row>
2531               <entry><option>-dverbose-stg2stg</option></entry>
2532               <entry>Show output from each STG-to-STG pass</entry>
2533               <entry>dynamic</entry>
2534               <entry>-</entry>
2535             </row>
2536             <row>
2537               <entry><option>-dshow-passes</option></entry>
2538               <entry>Print out each pass name as it happens</entry>
2539               <entry>dynamic</entry>
2540               <entry>-</entry>
2541             </row>
2542             <row>
2543               <entry><option>-dfaststring-stats</option></entry>
2544               <entry>Show statistics for fast string usage when finished</entry>
2545               <entry>dynamic</entry>
2546               <entry>-</entry>
2547             </row>
2548           </tbody>
2549         </tgroup>
2550       </informaltable>
2551     </sect2>
2552       
2553     <sect2>
2554       <title>Misc compiler options</title>
2555
2556       <informaltable>
2557         <tgroup cols="4" align="left" colsep="1" rowsep="1">
2558           <thead>
2559             <row>
2560               <entry>Flag</entry>
2561               <entry>Description</entry>
2562               <entry>Static/Dynamic</entry>
2563               <entry>Reverse</entry>
2564             </row>
2565           </thead>
2566           <tbody>
2567             <row>
2568               <entry><option>-fno-hi-version-check</option></entry>
2569               <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
2570               <entry>static</entry>
2571               <entry>-</entry>
2572             </row>
2573             <row>
2574               <entry><option>-dno-black-holing</option></entry>
2575               <entry>Turn off black holing (probably doesn't work)</entry>
2576               <entry>static</entry>
2577               <entry>-</entry>
2578             </row>
2579             <row>
2580               <entry><option>-fhistory-size</option></entry>
2581               <entry>Set simplification history size</entry>
2582               <entry>static</entry>
2583               <entry>-</entry>
2584             </row>
2585             <row>
2586               <entry><option>-funregisterised</option></entry>
2587               <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
2588               <entry>static</entry>
2589               <entry>-</entry>
2590             </row>
2591             <row>
2592               <entry><option>-fno-ghci-sandbox</option></entry>
2593               <entry>Turn off the GHCi sandbox. Means computations are run in teh main thread, rather than a forked thread.</entry>
2594               <entry>dynamic</entry>
2595               <entry>-</entry>
2596             </row>
2597           </tbody>
2598         </tgroup>
2599       </informaltable>
2600     </sect2>
2601   </sect1>
2602
2603
2604 <!--
2605 Still to document:
2606
2607 Misc:
2608   ,  ( "H"                 , HasArg (setHeapSize . fromIntegral . decodeSize) )
2609
2610   -Bdir
2611 -->
2612
2613 <!-- Emacs stuff:
2614      ;;; Local Variables: ***
2615      ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
2616      ;;; End: ***
2617  -->