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