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