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