Don't use old linkable for hs-boot files.
[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>Verbosity options</title>
12
13 <para>More details in <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>-v</option></entry>
28 <entry>verbose mode (equivalent to <option>-v3</option>)</entry>
29 <entry>dynamic</entry>
30 <entry>-</entry>
31 </row>
32 <row>
33 <entry><option>-v</option><replaceable>n</replaceable></entry>
34 <entry>set verbosity level</entry>
35 <entry>dynamic</entry>
36 <entry>-</entry>
37 </row>
38 <row>
39 <entry><option>-fprint-potential-instances</option></entry>
40 <entry>display all available instances in type error messages</entry>
41 <entry>dynamic</entry>
42 <entry>-fno-print-potential-instances</entry>
43 </row>
44 <row>
45 <entry><option>-fprint-explicit-foralls</option></entry>
46 <entry>Print explicit <literal>forall</literal> quantification in types. See also <option>-XExplicitForAll</option></entry>
47 <entry>dynamic</entry>
48 <entry>-fno-print-explicit-foralls</entry>
49 </row>
50 <row>
51 <entry><option>-fprint-explicit-kinds</option></entry>
52 <entry>Print explicit kind foralls and kind arguments in types. See also <option>-XKindSignature</option></entry>
53 <entry>dynamic</entry>
54 <entry>-fno-print-explicit-kinds</entry>
55 </row>
56 <row>
57 <entry><option>-fprint-unicode-syntax</option></entry>
58 <entry>Use unicode syntax when printing expressions, types and kinds. See also <option>-XUnicodeSyntax</option></entry>
59 <entry>dynamic</entry>
60 <entry>-fno-print-unicode-syntax</entry>
61 </row>
62 <row>
63 <entry><option>-fprint-expanded-synonyms</option></entry>
64 <entry>In type errors, also print type-synonym-expanded types.</entry>
65 <entry>dynamic</entry>
66 <entry>-fno-print-expanded-synonyms</entry>
67 </row>
68 <row>
69 <entry><option>-ferror-spans</option></entry>
70 <entry>output full span in error messages</entry>
71 <entry>dynamic</entry>
72 <entry>-</entry>
73 </row>
74 <row>
75 <entry><option>-H</option><replaceable>size</replaceable></entry>
76 <entry>Set the minimum heap size to <replaceable>size</replaceable></entry>
77 <entry>dynamic</entry>
78 <entry>-</entry>
79 </row>
80 <row>
81 <entry><option>-Rghc-timing</option></entry>
82 <entry>Summarise timing stats for GHC (same as <literal>+RTS -tstderr</literal>)</entry>
83 <entry>dynamic</entry>
84 <entry>-</entry>
85 </row>
86 </tbody>
87 </tgroup>
88 </informaltable>
89
90 </sect2>
91 <sect2>
92 <title>Alternative modes of operation</title>
93
94 <para>More details in <xref linkend="modes"/></para>
95
96 <informaltable>
97 <tgroup cols="4" align="left" colsep="1" rowsep="1">
98 <thead>
99 <row>
100 <entry>Flag</entry>
101 <entry>Description</entry>
102 <entry>Static/Dynamic</entry>
103 <entry>Reverse</entry>
104 </row>
105 </thead>
106 <tbody>
107 <row>
108 <entry><option>--help</option>,<option>-?</option></entry>
109 <entry>Display help</entry>
110 <entry>mode</entry>
111 <entry>-</entry>
112 </row>
113
114 <row>
115 <entry><option>--interactive</option></entry>
116 <entry>Interactive mode - normally used by just running <command>ghci</command>;
117 see <xref linkend="ghci"/> for details.</entry>
118 <entry>mode</entry>
119 <entry>-</entry>
120 </row>
121 <row>
122 <entry><option>--make</option></entry>
123 <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>;
124 see <xref linkend="make-mode"/> for details..</entry>
125 <entry>mode</entry>
126 <entry>-</entry>
127 </row>
128 <row>
129 <entry><option>-e <replaceable>expr</replaceable></option></entry>
130 <entry>Evaluate <replaceable>expr</replaceable>;
131 see <xref linkend="eval-mode"/> for details.</entry>
132 <entry>mode</entry>
133 <entry>-</entry>
134 </row>
135
136 <row>
137 <entry><option>--show-iface</option></entry>
138 <entry>Display the contents of an interface file.</entry>
139 <entry>mode</entry>
140 <entry>-</entry>
141 </row>
142
143 <row>
144 <entry><option>-M</option></entry>
145 <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>;
146 see <xref linkend="makefile-dependencies"/> for details.</entry>
147 <entry>mode</entry>
148 <entry>-</entry>
149 </row>
150
151
152 <row>
153 <entry><option>--supported-extensions</option>, <option>--supported-languages</option></entry>
154 <entry>display the supported language extensions</entry>
155 <entry>mode</entry>
156 <entry>-</entry>
157 </row>
158 <row>
159 <entry><option>--show-options</option></entry>
160 <entry>display the supported command line options</entry>
161 <entry>mode</entry>
162 <entry>-</entry>
163 </row>
164 <row>
165 <entry><option>--info</option></entry>
166 <entry>display information about the compiler</entry>
167 <entry>mode</entry>
168 <entry>-</entry>
169 </row>
170 <row>
171 <entry><option>--version, -V</option></entry>
172 <entry>display GHC version</entry>
173 <entry>mode</entry>
174 <entry>-</entry>
175 </row>
176 <row>
177 <entry><option>--numeric-version</option></entry>
178 <entry>display GHC version (numeric only)</entry>
179 <entry>mode</entry>
180 <entry>-</entry>
181 </row>
182 <row>
183 <entry><option>--print-libdir</option></entry>
184 <entry>display GHC library directory</entry>
185 <entry>mode</entry>
186 <entry>-</entry>
187 </row>
188
189 </tbody>
190 </tgroup>
191 </informaltable>
192 </sect2>
193
194 <sect2>
195 <title>Which phases to run</title>
196
197 <para><xref linkend="options-order"/></para>
198
199 <informaltable>
200 <tgroup cols="4" align="left" colsep="1" rowsep="1">
201 <thead>
202 <row>
203 <entry>Flag</entry>
204 <entry>Description</entry>
205 <entry>Static/Dynamic</entry>
206 <entry>Reverse</entry>
207 </row>
208 </thead>
209 <tbody>
210 <row>
211 <entry><option>-E</option></entry>
212 <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
213 <entry>mode</entry>
214 <entry>-</entry>
215 </row>
216 <row>
217 <entry><option>-C</option></entry>
218 <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
219 <entry>mode</entry>
220 <entry>-</entry>
221 </row>
222 <row>
223 <entry><option>-S</option></entry>
224 <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
225 <entry>mode</entry>
226 <entry>-</entry>
227 </row>
228 <row>
229 <entry><option>-c</option></entry>
230 <entry>Stop after generating object (<literal>.o</literal>) file</entry>
231 <entry>mode</entry>
232 <entry>-</entry>
233 </row>
234 <row>
235 <entry><option>-x</option> <replaceable>suffix</replaceable></entry>
236 <entry>Override default behaviour for source files</entry>
237 <entry>dynamic</entry>
238 <entry>-</entry>
239 </row>
240 </tbody>
241 </tgroup>
242 </informaltable>
243 </sect2>
244
245 <sect2>
246 <title>Redirecting output</title>
247
248 <para><xref linkend="options-output"/></para>
249
250 <informaltable>
251 <tgroup cols="4" align="left" colsep="1" rowsep="1">
252 <thead>
253 <row>
254 <entry>Flag</entry>
255 <entry>Description</entry>
256 <entry>Static/Dynamic</entry>
257 <entry>Reverse</entry>
258 </row>
259 </thead>
260 <tbody>
261 <row>
262 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
263 <entry>set the suffix to use for intermediate C files</entry>
264 <entry>dynamic</entry>
265 <entry>-</entry>
266 </row>
267 <row>
268 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
269 <entry>set directory for interface files</entry>
270 <entry>dynamic</entry>
271 <entry>-</entry>
272 </row>
273 <row>
274 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
275 <entry>set the suffix to use for interface files</entry>
276 <entry>dynamic</entry>
277 <entry>-</entry>
278 </row>
279 <row>
280 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
281 <entry>set output filename</entry>
282 <entry>dynamic</entry>
283 <entry>-</entry>
284 </row>
285 <row>
286 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
287 <entry>set directory for object files</entry>
288 <entry>dynamic</entry>
289 <entry>-</entry>
290 </row>
291 <row>
292 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
293 <entry>set the filename in which to put the interface</entry>
294 <entry>dynamic</entry>
295 <entry></entry>
296 </row>
297 <row>
298 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
299 <entry>set the output file suffix</entry>
300 <entry>dynamic</entry>
301 <entry>-</entry>
302 </row>
303 <row>
304 <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
305 <entry>redirect FFI stub files</entry>
306 <entry>dynamic</entry>
307 <entry>-</entry>
308 </row>
309 <row>
310 <entry><option>-dumpdir</option> <replaceable>dir</replaceable></entry>
311 <entry>redirect dump files</entry>
312 <entry>dynamic</entry>
313 <entry>-</entry>
314 </row>
315 <row>
316 <entry><option>-outputdir</option> <replaceable>dir</replaceable></entry>
317 <entry>set output directory</entry>
318 <entry>dynamic</entry>
319 <entry>-</entry>
320 </row>
321 </tbody>
322 </tgroup>
323 </informaltable>
324 </sect2>
325
326 <sect2>
327 <title>Keeping intermediate files</title>
328
329 <para><xref linkend="keeping-intermediates"/></para>
330
331 <informaltable>
332 <tgroup cols="4" align="left" colsep="1" rowsep="1">
333 <thead>
334 <row>
335 <entry>Flag</entry>
336 <entry>Description</entry>
337 <entry>Static/Dynamic</entry>
338 <entry>Reverse</entry>
339 </row>
340 </thead>
341 <tbody>
342 <row>
343 <entry><option>-keep-hc-file</option> or
344 <option>-keep-hc-files</option></entry>
345 <entry>retain intermediate <literal>.hc</literal> files</entry>
346 <entry>dynamic</entry>
347 <entry>-</entry>
348 </row>
349 <row>
350 <entry><option>-keep-llvm-file</option> or
351 <option>-keep-llvm-files</option></entry>
352 <entry>retain intermediate LLVM <literal>.ll</literal> files</entry>
353 <entry>dynamic</entry>
354 <entry>-</entry>
355 </row>
356 <row>
357 <entry><option>-keep-s-file</option> or
358 <option>-keep-s-files</option></entry>
359 <entry>retain intermediate <literal>.s</literal> files</entry>
360 <entry>dynamic</entry>
361 <entry>-</entry>
362 </row>
363 <row>
364 <entry><option>-keep-tmp-files</option></entry>
365 <entry>retain all intermediate temporary files</entry>
366 <entry>dynamic</entry>
367 <entry>-</entry>
368 </row>
369 </tbody>
370 </tgroup>
371 </informaltable>
372 </sect2>
373
374 <sect2>
375 <title>Temporary files</title>
376
377 <para><xref linkend="temp-files"/></para>
378
379 <informaltable>
380 <tgroup cols="4" align="left" colsep="1" rowsep="1">
381 <thead>
382 <row>
383 <entry>Flag</entry>
384 <entry>Description</entry>
385 <entry>Static/Dynamic</entry>
386 <entry>Reverse</entry>
387 </row>
388 </thead>
389 <tbody>
390 <row>
391 <entry><option>-tmpdir</option></entry>
392 <entry>set the directory for temporary files</entry>
393 <entry>dynamic</entry>
394 <entry>-</entry>
395 </row>
396 </tbody>
397 </tgroup>
398 </informaltable>
399 </sect2>
400
401 <sect2>
402 <title>Finding imports</title>
403
404 <para><xref linkend="search-path"/></para>
405
406 <informaltable>
407 <tgroup cols="4" align="left" colsep="1" rowsep="1">
408 <thead>
409 <row>
410 <entry>Flag</entry>
411
412 <entry>Description</entry>
413 <entry>Static/Dynamic</entry>
414 <entry>Reverse</entry>
415 </row>
416 </thead>
417 <tbody>
418 <row>
419 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
420 <entry>add <replaceable>dir</replaceable>,
421 <replaceable>dir2</replaceable>, etc. to import path</entry>
422 <entry>dynamic/<literal>:set</literal></entry>
423 <entry>-</entry>
424 </row>
425 <row>
426 <entry><option>-i</option></entry>
427 <entry>Empty the import directory list</entry>
428 <entry>dynamic/<literal>:set</literal></entry>
429 <entry>-</entry>
430 </row>
431 </tbody>
432 </tgroup>
433 </informaltable>
434 </sect2>
435
436 <sect2>
437 <title>Interface file options</title>
438
439 <para><xref linkend="hi-options"/></para>
440
441 <informaltable>
442 <tgroup cols="4" align="left" colsep="1" rowsep="1">
443 <thead>
444 <row>
445 <entry>Flag</entry>
446
447 <entry>Description</entry>
448 <entry>Static/Dynamic</entry>
449 <entry>Reverse</entry>
450 </row>
451 </thead>
452 <tbody>
453 <row>
454 <entry><option>-ddump-hi</option></entry>
455 <entry>Dump the new interface to stdout</entry>
456 <entry>dynamic</entry>
457 <entry>-</entry>
458 </row>
459 <row>
460 <entry><option>-ddump-hi-diffs</option></entry>
461 <entry>Show the differences vs. the old interface</entry>
462 <entry>dynamic</entry>
463 <entry>-</entry>
464 </row>
465 <row>
466 <entry><option>-ddump-minimal-imports</option></entry>
467 <entry>Dump a minimal set of imports</entry>
468 <entry>dynamic</entry>
469 <entry>-</entry>
470 </row>
471 <row>
472 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
473 <entry>See <xref linkend="modes"/>.</entry>
474 </row>
475 </tbody>
476 </tgroup>
477 </informaltable>
478 </sect2>
479
480 <sect2>
481 <title>Recompilation checking</title>
482
483 <para><xref linkend="recomp"/></para>
484
485 <informaltable>
486 <tgroup cols="4" align="left" colsep="1" rowsep="1">
487 <thead>
488 <row>
489 <entry>Flag</entry>
490
491 <entry>Description</entry>
492 <entry>Static/Dynamic</entry>
493 <entry>Reverse</entry>
494 </row>
495 </thead>
496 <tbody>
497 <row>
498 <entry><option>-fforce-recomp</option></entry>
499 <entry>Turn off recompilation checking. This is implied by any
500 <option>-ddump-X</option> option when compiling a single
501 file (i.e. when using <literal>-c</literal>).</entry>
502 <entry>dynamic</entry>
503 <entry><option>-fno-force-recomp</option></entry>
504 </row>
505 </tbody>
506 </tgroup>
507 </informaltable>
508 </sect2>
509
510 <sect2 id="interactive-mode-options">
511 <title>Interactive-mode options</title>
512
513 <para><xref linkend="ghci-dot-files"/></para>
514
515 <informaltable>
516 <tgroup cols="4" align="left" colsep="1" rowsep="1">
517 <thead>
518 <row>
519 <entry>Flag</entry>
520 <entry>Description</entry>
521 <entry>Static/Dynamic</entry>
522 <entry>Reverse</entry>
523 </row>
524 </thead>
525 <tbody>
526 <row>
527 <entry><option>-ignore-dot-ghci</option></entry>
528 <entry>Disable reading of <filename>.ghci</filename> files</entry>
529 <entry>dynamic</entry>
530 <entry>-</entry>
531 </row>
532 <row>
533 <entry><option>-ghci-script</option></entry>
534 <entry>Read additional <filename>.ghci</filename> files</entry>
535 <entry>dynamic</entry>
536 <entry>-</entry>
537 </row>
538 <row>
539 <entry><option>-fbreak-on-error</option></entry>
540 <entry><link linkend="ghci-debugger-exceptions">Break on uncaught exceptions and errors</link></entry>
541 <entry>dynamic</entry>
542 <entry><option>-fno-break-on-error</option></entry>
543 </row>
544 <row>
545 <entry><option>-fbreak-on-exception</option></entry>
546 <entry><link linkend="ghci-debugger-exceptions">Break on any exception thrown</link></entry>
547 <entry>dynamic</entry>
548 <entry><option>-fno-break-on-exception</option></entry>
549 </row>
550 <row>
551 <entry><option>-fghci-hist-size=<replaceable>n</replaceable></option></entry>
552 <entry><link linkend="ghci-debugger">Set the number of entries GHCi keeps for <literal>:history</literal></link></entry>
553 <entry>dynamic</entry>
554 <entry><option>(default is 50)</option></entry>
555 </row>
556 <row>
557 <entry><option>-fprint-evld-with-show</option></entry>
558 <entry><link linkend="breakpoints">Enable usage of Show instances in <literal>:print</literal></link></entry>
559 <entry>dynamic</entry>
560 <entry><option>-fno-print-evld-with-show</option></entry>
561 </row>
562 <row>
563 <entry><option>-fprint-bind-result</option></entry>
564 <entry><link linkend="ghci-stmts">Turn on printing of binding results in GHCi</link></entry>
565 <entry>dynamic</entry>
566 <entry><option>-fno-print-bind-result</option></entry>
567 </row>
568 <row>
569 <entry><option>-fno-print-bind-contents</option></entry>
570 <entry><link linkend="breakpoints">Turn off printing of binding contents in GHCi</link></entry>
571 <entry>dynamic</entry>
572 <entry>-</entry>
573 </row>
574 <row>
575 <entry><option>-fno-implicit-import-qualified</option></entry>
576 <entry><link linkend="ghci-import-qualified">Turn off
577 implicit qualified import of everything in GHCi</link></entry>
578 <entry>dynamic</entry>
579 <entry>-</entry>
580 </row>
581 <row>
582 <entry><option>-interactive-print</option></entry>
583 <entry><link linkend="ghci-interactive-print">Select the function
584 to use for printing evaluated expressions in GHCi</link></entry>
585 <entry>dynamic</entry>
586 <entry>-</entry>
587 </row>
588
589 </tbody>
590 </tgroup>
591 </informaltable>
592 </sect2>
593
594 <sect2>
595 <title>Packages</title>
596
597 <para><xref linkend="packages"/></para>
598
599 <informaltable>
600 <tgroup cols="4" align="left" colsep="1" rowsep="1">
601 <thead>
602 <row>
603 <entry>Flag</entry>
604 <entry>Description</entry>
605 <entry>Static/Dynamic</entry>
606 <entry>Reverse</entry>
607 </row>
608 </thead>
609 <tbody>
610 <row>
611 <entry><option>-this-package-key</option> <replaceable>P</replaceable></entry>
612 <entry>Compile to be part of package <replaceable>P</replaceable></entry>
613 <entry>dynamic</entry>
614 <entry>-</entry>
615 </row>
616 <row>
617 <entry><option>-package</option> <replaceable>P</replaceable></entry>
618 <entry>Expose package <replaceable>P</replaceable></entry>
619 <entry>dynamic/<literal>:set</literal></entry>
620 <entry>-</entry>
621 </row>
622 <row>
623 <entry><option>-hide-all-packages</option></entry>
624 <entry>Hide all packages by default</entry>
625 <entry>dynamic</entry>
626 <entry>-</entry>
627 </row>
628 <row>
629 <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
630 <entry>Hide package <replaceable>P</replaceable></entry>
631 <entry>dynamic/<literal>:set</literal></entry>
632 <entry>-</entry>
633 </row>
634 <row>
635 <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
636 <entry>Ignore package <replaceable>P</replaceable></entry>
637 <entry>dynamic/<literal>:set</literal></entry>
638 <entry>-</entry>
639 </row>
640 <row>
641 <entry><option>-package-db</option> <replaceable>file</replaceable></entry>
642 <entry>Add <replaceable>file</replaceable> to the package db stack.</entry>
643 <entry>dynamic</entry>
644 <entry>-</entry>
645 </row>
646 <row>
647 <entry><option>-clear-package-db</option></entry>
648 <entry>Clear the package db stack.</entry>
649 <entry>dynamic</entry>
650 <entry>-</entry>
651 </row>
652 <row>
653 <entry><option>-no-global-package-db</option></entry>
654 <entry>Remove the global package db from the stack.</entry>
655 <entry>dynamic</entry>
656 <entry>-</entry>
657 </row>
658 <row>
659 <entry><option>-global-package-db</option></entry>
660 <entry>Add the global package db to the stack.</entry>
661 <entry>dynamic</entry>
662 <entry>-</entry>
663 </row>
664 <row>
665 <entry><option>-no-user-package-db</option></entry>
666 <entry>Remove the user's package db from the stack.</entry>
667 <entry>dynamic</entry>
668 <entry>-</entry>
669 </row>
670 <row>
671 <entry><option>-user-package-db</option></entry>
672 <entry>Add the user's package db to the stack.</entry>
673 <entry>dynamic</entry>
674 <entry>-</entry>
675 </row>
676 <row>
677 <entry><option>-no-auto-link-packages</option></entry>
678 <entry>Don't automatically link in the base and rts packages.</entry>
679 <entry>dynamic</entry>
680 <entry>-</entry>
681 </row>
682 <row>
683 <entry><option>-trust</option> <replaceable>P</replaceable></entry>
684 <entry>Expose package <replaceable>P</replaceable> and set it to be
685 trusted</entry>
686 <entry>dynamic/<literal>:set</literal></entry>
687 <entry>-</entry>
688 </row>
689 <row>
690 <entry><option>-distrust</option> <replaceable>P</replaceable></entry>
691 <entry>Expose package <replaceable>P</replaceable> and set it to be
692 distrusted</entry>
693 <entry>dynamic/<literal>:set</literal></entry>
694 <entry>-</entry>
695 </row>
696 <row>
697 <entry><option>-distrust-all</option> </entry>
698 <entry>Distrust all packages by default</entry>
699 <entry>dynamic/<literal>:set</literal></entry>
700 <entry>-</entry>
701 </row>
702 </tbody>
703 </tgroup>
704 </informaltable>
705 </sect2>
706
707 <sect2>
708 <title>Language options</title>
709
710 <para>Language options can be enabled either by a command-line option
711 <option>-Xblah</option>, or by a <literal>{-# LANGUAGE blah #-}</literal>
712 pragma in the file itself. See <xref linkend="options-language"/>. Some
713 options are enabled using <option>-f*</option> flags.</para>
714
715 <informaltable>
716 <tgroup cols="5" align="left" colsep="1" rowsep="1">
717 <thead>
718 <row>
719 <entry>Flag</entry>
720 <entry>Description</entry>
721 <entry>Static/Dynamic</entry>
722 <entry>Reverse</entry>
723 <entry>Since</entry>
724 </row>
725 </thead>
726 <tbody>
727 <row>
728 <entry><option>-fconstraint-solver-iterations=</option><replaceable>n</replaceable></entry>
729 <entry>Set the iteration limit for the type-constraint solver.
730 The default limit is 4. Typically one iteration
731 suffices; so please yell if you find you need to set
732 it higher than the default. Zero means infinity. </entry>
733 <entry>dynamic</entry>
734 <entry></entry>
735 </row>
736 <row>
737 <entry><option>-freduction-depth=</option><replaceable>n</replaceable></entry>
738 <entry>Set the <link linkend="undecidable-instances">limit for type simplification</link>.
739 Default is 200; zero means infinity.</entry>
740 <entry>dynamic</entry>
741 <entry></entry>
742 </row>
743 <row>
744 <entry><option>-fcontext-stack=</option><replaceable>n</replaceable></entry>
745 <entry>Deprecated. Use <option>-freduction-depth=</option><replaceable>n</replaceable> instead.</entry>
746 <entry>dynamic</entry>
747 <entry></entry>
748 <entry></entry>
749 </row>
750 <row>
751 <entry><option>-fglasgow-exts</option></entry>
752 <entry>Deprecated. Enable most language extensions; see <xref linkend="options-language"/> for exactly which ones.</entry>
753 <entry>dynamic</entry>
754 <entry><option>-fno-glasgow-exts</option></entry>
755 <entry></entry>
756 </row>
757 <row>
758 <entry><option>-firrefutable-tuples</option></entry>
759 <entry>Make tuple pattern matching irrefutable</entry>
760 <entry>dynamic</entry>
761 <entry><option>-fno-irrefutable-tuples</option></entry>
762 <entry></entry>
763 </row>
764 <row>
765 <entry><option>-fpackage-trust</option></entry>
766 <entry>Enable <link linkend="safe-haskell">Safe Haskell</link> trusted package requirement for trustworthy modules.</entry>
767 <entry>dynamic</entry>
768 <entry><option>-</option></entry>
769 <entry></entry>
770 </row>
771 <row>
772 <entry><option>-ftype-function-depth=</option><replaceable>n</replaceable></entry>
773 <entry>Deprecated. Use <option>-freduction-depth=</option><replaceable>n</replaceable> instead.</entry>
774 <entry>dynamic</entry>
775 <entry></entry>
776 <entry></entry>
777 </row>
778 <row>
779 <entry><option>-XAllowAmbiguousTypes</option></entry>
780 <entry>Allow the user to write <link linkend="ambiguity">ambiguous types</link>,
781 and the type inference engine to infer them.
782 </entry>
783 <entry>dynamic</entry>
784 <entry><option>-XNoAllowAmbiguousTypes</option></entry>
785 <entry>7.8.1</entry>
786 </row>
787 <row>
788 <entry><option>-XArrows</option></entry>
789 <entry>Enable <link linkend="arrow-notation">arrow
790 notation</link> extension</entry>
791 <entry>dynamic</entry>
792 <entry><option>-XNoArrows</option></entry>
793 <entry>6.8.1</entry>
794 </row>
795 <row>
796 <entry><option>-XApplicativeDo</option></entry>
797 <entry>Enable <link linkend="applicative-do">Applicative
798 do-notation desugaring</link>.</entry>
799 <entry>dynamic</entry>
800 <entry><option>-XNoApplicativeDo</option></entry>
801 <entry>7.12.1</entry>
802 </row>
803 <row>
804 <entry><option>-XAutoDeriveTypeable</option></entry>
805 <entry>As of GHC 7.10, this option is not needed, and should
806 not be used. Automatically <link linkend="deriving-typeable">derive Typeable instances for every datatype and type class declaration</link>.
807 Implies <option>-XDeriveDataTypeable</option>.</entry>
808 <entry>dynamic</entry>
809 <entry><option>-XNoAutoDeriveTypeable</option></entry>
810 <entry>7.8.1</entry>
811 </row>
812 <row>
813 <entry><option>-XBangPatterns</option></entry>
814 <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
815 <entry>dynamic</entry>
816 <entry><option>-XNoBangPatterns</option></entry>
817 <entry>6.8.1</entry>
818 </row>
819 <row>
820 <entry><option>-XBinaryLiterals</option></entry>
821 <entry>Enable support for <link linkend="binary-literals">binary literals</link>.</entry>
822 <entry>dynamic</entry>
823 <entry><option>-XNoBinaryLiterals</option></entry>
824 <entry>7.10.1</entry>
825 </row>
826 <row>
827 <entry><option>-XCApiFFI</option></entry>
828 <entry>Enable <link linkend="ffi-capi">the CAPI calling convention</link>.</entry>
829 <entry>dynamic</entry>
830 <entry><option>-XNoCAPIFFI</option></entry>
831 <entry>7.10.1</entry>
832 </row>
833 <row>
834 <entry><option>-XConstrainedClassMethods</option></entry>
835 <entry>Enable <link linkend="class-method-types">constrained class methods</link>.</entry>
836 <entry>dynamic</entry>
837 <entry><option>-XNoConstrainedClassMethods</option></entry>
838 <entry>6.8.1</entry>
839 </row>
840 <row>
841 <entry><option>-XConstraintKinds</option></entry>
842 <entry>Enable a <link linkend="constraint-kind">kind of constraints</link>.</entry>
843 <entry>dynamic</entry>
844 <entry><option>-XNoConstraintKinds</option></entry>
845 <entry>7.4.1</entry>
846 </row>
847 <row>
848 <entry><option>-XCPP</option></entry>
849 <entry>Enable the <link linkend="c-pre-processor">C preprocessor</link>.</entry>
850 <entry>dynamic</entry>
851 <entry><option>-XNoCPP</option></entry>
852 <entry>6.8.1</entry>
853 </row>
854 <row>
855 <entry><option>-XDataKinds</option></entry>
856 <entry>Enable <link linkend="promotion">datatype promotion</link>.</entry>
857 <entry>dynamic</entry>
858 <entry><option>-XNoDataKinds</option></entry>
859 <entry>7.4.1</entry>
860 </row>
861 <row>
862 <entry><option>-XDefaultSignatures</option></entry>
863 <entry>Enable <link linkend="class-default-signatures">default signatures</link>.</entry>
864 <entry>dynamic</entry>
865 <entry><option>-XNoDefaultSignatures</option></entry>
866 <entry>7.2.1</entry>
867 </row>
868 <row>
869 <entry><option>-XDeriveAnyClass</option></entry>
870 <entry>Enable <link linkend="derive-any-class">deriving for any
871 class</link>.</entry>
872 <entry>dynamic</entry>
873 <entry><option>-XNoDeriveAnyClass</option></entry>
874 <entry>7.10.1</entry>
875 </row>
876 <row>
877 <entry><option>-XDeriveDataTypeable</option></entry>
878 <entry>Enable <link linkend="deriving-typeable">deriving for the Data class</link>.
879 Implied by <option>-XAutoDeriveTypeable</option>.</entry>
880 <entry>dynamic</entry>
881 <entry><option>-XNoDeriveDataTypeable</option></entry>
882 <entry>6.8.1</entry>
883 </row>
884 <row>
885 <entry><option>-XDeriveFunctor</option></entry>
886 <entry>Enable <link linkend="deriving-extra">deriving for the Functor class</link>.
887 Implied by <option>-XDeriveTraversable</option>.</entry>
888 <entry>dynamic</entry>
889 <entry><option>-XNoDeriveFunctor</option></entry>
890 <entry>7.10.1</entry>
891 </row>
892 <row>
893 <entry><option>-XDeriveFoldable</option></entry>
894 <entry>Enable <link linkend="deriving-extra">deriving for the Foldable class</link>.
895 Implied by <option>-XDeriveTraversable</option>.</entry>
896 <entry>dynamic</entry>
897 <entry><option>-XNoDeriveFoldable</option></entry>
898 <entry>7.10.1</entry>
899 </row>
900 <row>
901 <entry><option>-XDeriveGeneric</option></entry>
902 <entry>Enable <link linkend="deriving-typeable">deriving for the Generic class</link>.</entry>
903 <entry>dynamic</entry>
904 <entry><option>-XNoDeriveGeneric</option></entry>
905 <entry>7.2.1</entry>
906 </row>
907 <row>
908 <entry><option>-XDeriveLift</option></entry>
909 <entry>Enable <link linkend="deriving-lift">deriving for the Lift class</link>.</entry>
910 <entry>dynamic</entry>
911 <entry><option>-XNoDeriveLift</option></entry>
912 </row>
913 <row>
914 <entry><option>-XDeriveTraversable</option></entry>
915 <entry>Enable <link linkend="deriving-extra">deriving for the Traversable class</link>.
916 Implies <option>-XDeriveFunctor</option> and <option>-XDeriveFoldable</option>.</entry>
917 <entry>dynamic</entry>
918 <entry><option>-XNoDeriveTraversable</option></entry>
919 <entry>7.10.1</entry>
920 </row>
921 <row>
922 <entry><option>-XDisambiguateRecordFields</option></entry>
923 <entry>Enable <link linkend="disambiguate-fields">record field disambiguation</link>.
924 Implied by <option>-XRecordWildCards</option>.</entry>
925 <entry>dynamic</entry>
926 <entry><option>-XNoDisambiguateRecordFields</option></entry>
927 <entry>6.8.1</entry>
928 </row>
929 <row>
930 <entry><option>-XEmptyCase</option></entry>
931 <entry>Allow <link linkend="empty-case">empty case alternatives</link>.</entry>
932 <entry>dynamic</entry>
933 <entry><option>-XNoEmptyCase</option></entry>
934 <entry>7.8.1</entry>
935 </row>
936 <row>
937 <entry><option>-XEmptyDataDecls</option></entry>
938 <entry>Enable empty data declarations.</entry>
939 <entry>dynamic</entry>
940 <entry><option>-XNoEmptyDataDecls</option></entry>
941 <entry>6.8.1</entry>
942 </row>
943 <row>
944 <entry><option>-XExistentialQuantification</option></entry>
945 <entry>Enable <link linkend="existential-quantification">existential quantification</link>.</entry>
946 <entry>dynamic</entry>
947 <entry><option>-XNoExistentialQuantification</option></entry>
948 <entry>6.8.1</entry>
949 </row>
950 <row>
951 <entry><option>-XExplicitForAll</option></entry>
952 <entry>Enable <link linkend="explicit-foralls">explicit universal quantification</link>.
953 Implied by <option>-XScopedTypeVariables</option>,
954 <option>-XLiberalTypeSynonyms</option>,
955 <option>-XRankNTypes</option> and
956 <option>-XExistentialQuantification</option>.
957 </entry>
958 <entry>dynamic</entry>
959 <entry><option>-XNoExplicitForAll</option></entry>
960 <entry>6.12.1</entry>
961 </row>
962 <row>
963 <entry><option>-XExplicitNamespaces</option></entry>
964 <entry>Enable using the keyword <literal>type</literal> to specify the namespace of
965 entries in imports and exports (<xref linkend="explicit-namespaces"/>).
966 Implied by <option>-XTypeOperators</option> and <option>-XTypeFamilies</option>.</entry>
967 <entry>dynamic</entry>
968 <entry><option>-XNoExplicitNamespaces</option></entry>
969 <entry>7.6.1</entry>
970 </row>
971 <row>
972 <entry><option>-XExtendedDefaultRules</option></entry>
973 <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module.</entry>
974 <entry>dynamic</entry>
975 <entry><option>-XNoExtendedDefaultRules</option></entry>
976 <entry>6.8.1</entry>
977 </row>
978 <row>
979 <entry><option>-XFlexibleContexts</option></entry>
980 <entry>Enable <link linkend="flexible-contexts">flexible contexts</link>.
981 Implied by <option>-XImplicitParams</option>.</entry>
982 <entry>dynamic</entry>
983 <entry><option>-XNoFlexibleContexts</option></entry>
984 <entry>6.8.1</entry>
985 </row>
986 <row>
987 <entry><option>-XFlexibleInstances</option></entry>
988 <entry>Enable <link linkend="instance-rules">flexible instances</link>.
989 Implies <option>-XTypeSynonymInstances</option>. Implied by <option>-XImplicitParams</option>.</entry>
990 <entry>dynamic</entry>
991 <entry><option>-XNoFlexibleInstances</option></entry>
992 <entry>6.8.1</entry>
993 </row>
994 <row>
995 <entry><option>-XForeignFunctionInterface</option></entry>
996 <entry>Enable <link linkend="ffi">foreign function interface</link>.</entry>
997 <entry>dynamic</entry>
998 <entry><option>-XNoForeignFunctionInterface</option></entry>
999 <entry>6.8.1</entry>
1000 </row>
1001 <row>
1002 <entry><option>-XFunctionalDependencies</option></entry>
1003 <entry>Enable <link linkend="functional-dependencies">functional dependencies</link>.
1004 Implies <option>-XMultiParamTypeClasses</option>.</entry>
1005 <entry>dynamic</entry>
1006 <entry><option>-XNoFunctionalDependencies</option></entry>
1007 <entry>6.8.1</entry>
1008 </row>
1009 <row>
1010 <entry><option>-XGADTs</option></entry>
1011 <entry>Enable <link linkend="gadt">generalised algebraic data types</link>.
1012 Implies <option>-XGADTSyntax</option> and <option>-XMonoLocalBinds</option>.</entry>
1013 <entry>dynamic</entry>
1014 <entry><option>-XNoGADTs</option></entry>
1015 <entry>6.8.1</entry>
1016 </row>
1017 <row>
1018 <entry><option>-XGADTSyntax</option></entry>
1019 <entry>Enable <link linkend="gadt-style">generalised algebraic data type syntax</link>.
1020 </entry>
1021 <entry>dynamic</entry>
1022 <entry><option>-XNoGADTSyntax</option></entry>
1023 <entry>7.2.1</entry>
1024 </row>
1025 <row>
1026 <entry><option>-XGeneralizedNewtypeDeriving</option></entry>
1027 <entry>Enable <link linkend="newtype-deriving">newtype deriving</link>.</entry>
1028 <entry>dynamic</entry>
1029 <entry><option>-XNoGeneralizedNewtypeDeriving</option></entry>
1030 <entry>6.8.1</entry>
1031 </row>
1032 <row>
1033 <entry><option>-XGenerics</option></entry>
1034 <entry>Deprecated, does nothing. No longer enables <link linkend="generic-classes">generic classes</link>.
1035 See also GHC's support for
1036 <link linkend="generic-programming">generic programming</link>.</entry>
1037 <entry>dynamic</entry>
1038 <entry><option>-XNoGenerics</option></entry>
1039 <entry>6.8.1</entry>
1040 </row>
1041 <row>
1042 <entry><option>-XImplicitParams</option></entry>
1043 <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
1044 Implies <option>-XFlexibleContexts</option> and <option>-XFlexibleInstances</option>.</entry>
1045 <entry>dynamic</entry>
1046 <entry><option>-XNoImplicitParams</option></entry>
1047 <entry>6.8.1</entry>
1048 </row>
1049 <row>
1050 <entry><option>-XNoImplicitPrelude</option></entry>
1051 <entry>Don't implicitly <literal>import Prelude</literal>.
1052 Implied by <option>-XRebindableSyntax</option>.</entry>
1053 <entry>dynamic</entry>
1054 <entry><option>-XImplicitPrelude</option></entry>
1055 <entry>6.8.1</entry>
1056 </row>
1057 <row>
1058 <entry><option>-XImpredicativeTypes</option></entry>
1059 <entry>Enable <link linkend="impredicative-polymorphism">impredicative types</link>.
1060 Implies <option>-XRankNTypes</option>.</entry>
1061 <entry>dynamic</entry>
1062 <entry><option>-XNoImpredicativeTypes</option></entry>
1063 <entry>6.10.1</entry>
1064 </row>
1065 <row>
1066 <entry><option>-XIncoherentInstances</option></entry>
1067 <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.
1068 Implies <option>-XOverlappingInstances</option>.</entry>
1069 <entry>dynamic</entry>
1070 <entry><option>-XNoIncoherentInstances</option></entry>
1071 <entry>6.8.1</entry>
1072 </row>
1073 <row>
1074 <entry><option>-XInstanceSigs</option></entry>
1075 <entry>Enable <link linkend="instance-sigs">instance signatures</link>.</entry>
1076 <entry>dynamic</entry>
1077 <entry><option>-XNoInstanceSigs</option></entry>
1078 <entry>7.10.1</entry>
1079 </row>
1080 <row>
1081 <entry><option>-XInterruptibleFFI</option></entry>
1082 <entry>Enable interruptible FFI.</entry>
1083 <entry>dynamic</entry>
1084 <entry><option>-XNoInterruptibleFFI</option></entry>
1085 <entry>7.2.1</entry>
1086 </row>
1087 <row>
1088 <entry><option>-XKindSignatures</option></entry>
1089 <entry>Enable <link linkend="kinding">kind signatures</link>.
1090 Implied by <option>-XTypeFamilies</option> and <option>-XPolyKinds</option>.</entry>
1091 <entry>dynamic</entry>
1092 <entry><option>-XNoKindSignatures</option></entry>
1093 <entry>6.8.1</entry>
1094 </row>
1095 <row>
1096 <entry><option>-XLambdaCase</option></entry>
1097 <entry>Enable <link linkend="lambda-case">lambda-case expressions</link>.</entry>
1098 <entry>dynamic</entry>
1099 <entry><option>-XNoLambdaCase</option></entry>
1100 <entry>7.6.1</entry>
1101 </row>
1102 <row>
1103 <entry><option>-XLiberalTypeSynonyms</option></entry>
1104 <entry>Enable <link linkend="type-synonyms">liberalised type synonyms</link>.</entry>
1105 <entry>dynamic</entry>
1106 <entry><option>-XNoLiberalTypeSynonyms</option></entry>
1107 <entry>6.8.1</entry>
1108 </row>
1109 <row>
1110 <entry><option>-XMagicHash</option></entry>
1111 <entry>Allow "#" as a <link linkend="magic-hash">postfix modifier on identifiers</link>.</entry>
1112 <entry>dynamic</entry>
1113 <entry><option>-XNoMagicHash</option></entry>
1114 <entry>6.8.1</entry>
1115 </row>
1116 <row>
1117 <entry><option>-XMonadComprehensions</option></entry>
1118 <entry>Enable <link linkend="monad-comprehensions">monad comprehensions</link>.</entry>
1119 <entry>dynamic</entry>
1120 <entry><option>-XNoMonadComprehensions</option></entry>
1121 <entry>7.2.1</entry>
1122 </row>
1123 <row>
1124 <entry><option>-XMonoLocalBinds</option></entry>
1125 <entry>Enable <link linkend="mono-local-binds">do not generalise local bindings</link>.
1126 Implied by <option>-XTypeFamilies</option> and <option>-XGADTs</option>.
1127 </entry>
1128 <entry>dynamic</entry>
1129 <entry><option>-XNoMonoLocalBinds</option></entry>
1130 <entry>6.12.1</entry>
1131 </row>
1132 <row>
1133 <entry><option>-XNoMonomorphismRestriction</option></entry>
1134 <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link>.</entry>
1135 <entry>dynamic</entry>
1136 <entry><option>-XMonomorphismRestriction</option></entry>
1137 <entry>6.8.1</entry>
1138 </row>
1139 <row>
1140 <entry><option>-XMultiParamTypeClasses</option></entry>
1141 <entry>Enable <link linkend="multi-param-type-classes">multi parameter type classes</link>.
1142 Implied by <option>-XFunctionalDependencies</option>.</entry>
1143 <entry>dynamic</entry>
1144 <entry><option>-XNoMultiParamTypeClasses</option></entry>
1145 <entry>6.8.1</entry>
1146 </row>
1147 <row>
1148 <entry><option>-XMultiWayIf</option></entry>
1149 <entry>Enable <link linkend="multi-way-if">multi-way if-expressions</link>.</entry>
1150 <entry>dynamic</entry>
1151 <entry><option>-XNoMultiWayIf</option></entry>
1152 <entry>7.6.1</entry>
1153 </row>
1154 <row>
1155 <entry><option>-XNamedFieldPuns</option></entry>
1156 <entry>Enable <link linkend="record-puns">record puns</link>.</entry>
1157 <entry>dynamic</entry>
1158 <entry><option>-XNoNamedFieldPuns</option></entry>
1159 <entry>6.10.1</entry>
1160 </row>
1161 <row>
1162 <entry><option>-XNamedWildCards</option></entry>
1163 <entry>Enable <link linkend="named-wildcards">named wildcards</link>.</entry>
1164 <entry>dynamic</entry>
1165 <entry><option>-XNoNamedWildCards</option></entry>
1166 <entry>7.10.1</entry>
1167 </row>
1168 <row>
1169 <entry><option>-XNegativeLiterals</option></entry>
1170 <entry>Enable support for <link linkend="negative-literals">negative literals</link>.</entry>
1171 <entry>dynamic</entry>
1172 <entry><option>-XNoNegativeLiterals</option></entry>
1173 <entry>7.8.1</entry>
1174 </row>
1175 <row>
1176 <entry><option>-XNoNPlusKPatterns</option></entry>
1177 <entry>Disable support for <literal>n+k</literal> patterns.</entry>
1178 <entry>dynamic</entry>
1179 <entry><option>-XNPlusKPatterns</option></entry>
1180 <entry>6.12.1</entry>
1181 </row>
1182 <row>
1183 <entry><option>-XNullaryTypeClasses</option></entry>
1184 <entry>Deprecated, does nothing. <link linkend="nullary-type-classes">nullary (no parameter) type classes</link> are now enabled using <option>-XMultiParamTypeClasses</option>.</entry>
1185 <entry>dynamic</entry>
1186 <entry><option>-XNoNullaryTypeClasses</option></entry>
1187 <entry>7.8.1</entry>
1188 </row>
1189 <row>
1190 <entry><option>-XNumDecimals</option></entry>
1191 <entry>Enable support for 'fractional' integer literals.</entry>
1192 <entry>dynamic</entry>
1193 <entry><option>-XNoNumDecimals</option></entry>
1194 <entry>7.8.1</entry>
1195 </row>
1196 <row>
1197 <entry><option>-XOverlappingInstances</option></entry>
1198 <entry>Enable <link linkend="instance-overlap">overlapping instances</link>.</entry>
1199 <entry>dynamic</entry>
1200 <entry><option>-XNoOverlappingInstances</option></entry>
1201 <entry>6.8.1</entry>
1202 </row>
1203 <row>
1204 <entry><option>-XOverloadedLists</option></entry>
1205 <entry>Enable <link linkend="overloaded-lists">overloaded lists</link>.
1206 </entry>
1207 <entry>dynamic</entry>
1208 <entry><option>-XNoOverloadedLists</option></entry>
1209 <entry>7.8.1</entry>
1210 </row>
1211 <row>
1212 <entry><option>-XOverloadedStrings</option></entry>
1213 <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
1214 </entry>
1215 <entry>dynamic</entry>
1216 <entry><option>-XNoOverloadedStrings</option></entry>
1217 <entry>6.8.1</entry>
1218 </row>
1219 <row>
1220 <entry><option>-XPackageImports</option></entry>
1221 <entry>Enable <link linkend="package-imports">package-qualified imports</link>.</entry>
1222 <entry>dynamic</entry>
1223 <entry><option>-XNoPackageImports</option></entry>
1224 <entry>6.10.1</entry>
1225 </row>
1226 <row>
1227 <entry><option>-XParallelArrays</option></entry>
1228 <entry>Enable parallel arrays.
1229 Implies <option>-XParallelListComp</option>.</entry>
1230 <entry>dynamic</entry>
1231 <entry><option>-XNoParallelArrays</option></entry>
1232 <entry>7.4.1</entry>
1233 </row>
1234 <row>
1235 <entry><option>-XParallelListComp</option></entry>
1236 <entry>Enable <link linkend="parallel-list-comprehensions">parallel list comprehensions</link>.
1237 Implied by <option>-XParallelArrays</option>.</entry>
1238 <entry>dynamic</entry>
1239 <entry><option>-XNoParallelListComp</option></entry>
1240 <entry>6.8.1</entry>
1241 </row>
1242 <row>
1243 <entry><option>-XPartialTypeSignatures</option></entry>
1244 <entry>Enable <link linkend="partial-type-signatures">partial type signatures</link>.</entry>
1245 <entry>dynamic</entry>
1246 <entry><option>-XNoPartialTypeSignatures</option></entry>
1247 <entry>7.10.1</entry>
1248 </row>
1249 <row>
1250 <entry><option>-XPatternGuards</option></entry>
1251 <entry>Enable <link linkend="pattern-guards">pattern guards</link>.</entry>
1252 <entry>dynamic</entry>
1253 <entry><option>-XNoPatternGuards</option></entry>
1254 <entry>6.8.1</entry>
1255 </row>
1256 <row>
1257 <entry><option>-XPatternSynonyms</option></entry>
1258 <entry>Enable <link linkend="pattern-synonyms">pattern synonyms</link>.</entry>
1259 <entry>dynamic</entry>
1260 <entry><option>-XNoPatternSynonyms</option></entry>
1261 <entry>7.10.1</entry>
1262 </row>
1263 <row>
1264 <entry><option>-XPolyKinds</option></entry>
1265 <entry>Enable <link linkend="kind-polymorphism">kind polymorphism</link>.
1266 Implies <option>-XKindSignatures</option>.</entry>
1267 <entry>dynamic</entry>
1268 <entry><option>-XNoPolyKinds</option></entry>
1269 <entry>7.4.1</entry>
1270 </row>
1271 <row>
1272 <entry><option>-XPolymorphicComponents</option></entry>
1273 <entry>Enable <link linkend="universal-quantification">polymorphic components for data constructors</link>.</entry>
1274 <entry>dynamic, synonym for <option>-XRankNTypes</option></entry>
1275 <entry><option>-XNoPolymorphicComponents</option></entry>
1276 <entry>6.8.1</entry>
1277 </row>
1278 <row>
1279 <entry><option>-XPostfixOperators</option></entry>
1280 <entry>Enable <link linkend="postfix-operators">postfix operators</link>.</entry>
1281 <entry>dynamic</entry>
1282 <entry><option>-XNoPostfixOperators</option></entry>
1283 <entry>7.10.1</entry>
1284 </row>
1285 <row>
1286 <entry><option>-XQuasiQuotes</option></entry>
1287 <entry>Enable <link linkend="th-quasiquotation">quasiquotation</link>.</entry>
1288 <entry>dynamic</entry>
1289 <entry><option>-XNoQuasiQuotes</option></entry>
1290 <entry>6.10.1</entry>
1291 </row>
1292 <row>
1293 <entry><option>-XRank2Types</option></entry>
1294 <entry>Enable <link linkend="universal-quantification">rank-2 types</link>.</entry>
1295 <entry>dynamic, synonym for <option>-XRankNTypes</option></entry>
1296 <entry><option>-XNoRank2Types</option></entry>
1297 <entry>6.8.1</entry>
1298 </row>
1299 <row>
1300 <entry><option>-XRankNTypes</option></entry>
1301 <entry>Enable <link linkend="universal-quantification">rank-N types</link>.
1302 Implied by <option>-XImpredicativeTypes</option>.</entry>
1303 <entry>dynamic</entry>
1304 <entry><option>-XNoRankNTypes</option></entry>
1305 <entry>6.8.1</entry>
1306 </row>
1307 <row>
1308 <entry><option>-XRebindableSyntax</option></entry>
1309 <entry>Employ <link linkend="rebindable-syntax">rebindable syntax</link>.
1310 Implies <option>-XNoImplicitPrelude</option>.</entry>
1311 <entry>dynamic</entry>
1312 <entry><option>-XNoRebindableSyntax</option></entry>
1313 <entry>7.0.1</entry>
1314 </row>
1315 <row>
1316 <entry><option>-XRecordWildCards</option></entry>
1317 <entry>Enable <link linkend="record-wildcards">record wildcards</link>.
1318 Implies <option>-XDisambiguateRecordFields</option>.</entry>
1319 <entry>dynamic</entry>
1320 <entry><option>-XNoRecordWildCards</option></entry>
1321 <entry>6.8.1</entry>
1322 </row>
1323 <row>
1324 <entry><option>-XRecursiveDo</option></entry>
1325 <entry>Enable <link linkend="recursive-do-notation">recursive do (mdo) notation</link>.</entry>
1326 <entry>dynamic</entry>
1327 <entry><option>-XNoRecursiveDo</option></entry>
1328 <entry>6.8.1</entry>
1329 </row>
1330 <row>
1331 <entry><option>-XRelaxedPolyRec</option></entry>
1332 <entry><emphasis>(deprecated)</emphasis> Relaxed checking for
1333 <link linkend="typing-binds">mutually-recursive polymorphic functions</link>.</entry>
1334 <entry>dynamic</entry>
1335 <entry><option>-XNoRelaxedPolyRec</option></entry>
1336 <entry>6.8.1</entry>
1337 </row>
1338 <row>
1339 <entry><option>-XRoleAnnotations</option></entry>
1340 <entry>Enable <link linkend="role-annotations">role annotations</link>.</entry>
1341 <entry>dynamic</entry>
1342 <entry><option>-XNoRoleAnnotations</option></entry>
1343 <entry>7.10.1</entry>
1344 </row>
1345 <row>
1346 <entry><option>-XSafe</option></entry>
1347 <entry>Enable the <link linkend="safe-haskell">Safe Haskell</link> Safe mode.</entry>
1348 <entry>dynamic</entry>
1349 <entry><option>-</option></entry>
1350 <entry>7.2.1</entry>
1351 </row>
1352 <row>
1353 <entry><option>-XScopedTypeVariables</option></entry>
1354 <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
1355 </entry>
1356 <entry>dynamic</entry>
1357 <entry><option>-XNoScopedTypeVariables</option></entry>
1358 <entry>6.8.1</entry>
1359 </row>
1360 <row>
1361 <entry><option>-XStandaloneDeriving</option></entry>
1362 <entry>Enable <link linkend="stand-alone-deriving">standalone deriving</link>.</entry>
1363 <entry>dynamic</entry>
1364 <entry><option>-XNoStandaloneDeriving</option></entry>
1365 <entry>6.8.1</entry>
1366 </row>
1367 <row>
1368 <entry><option>-XStrictData</option></entry>
1369 <entry>Enable <link linkend="strict-data">default strict datatype fields</link>.</entry>
1370 <entry>dynamic</entry>
1371 <entry><option>-XNoStrictData</option></entry>
1372 </row>
1373 <row>
1374 <entry><option>-XTemplateHaskell</option></entry>
1375 <entry>Enable <link linkend="template-haskell">Template Haskell</link>.</entry>
1376 <entry>dynamic</entry>
1377 <entry><option>-XNoTemplateHaskell</option></entry>
1378 <entry>6.8.1</entry>
1379 </row>
1380 <row>
1381 <entry><option>-XNoTraditionalRecordSyntax</option></entry>
1382 <entry>Disable support for traditional record syntax (as supported by Haskell 98) <literal>C {f = x}</literal></entry>
1383 <entry>dynamic</entry>
1384 <entry><option>-XTraditionalRecordSyntax</option></entry>
1385 <entry>7.4.1</entry>
1386 </row>
1387 <row>
1388 <entry><option>-XTransformListComp</option></entry>
1389 <entry>Enable <link linkend="generalised-list-comprehensions">generalised list comprehensions</link>.</entry>
1390 <entry>dynamic</entry>
1391 <entry><option>-XNoTransformListComp</option></entry>
1392 <entry>6.10.1</entry>
1393 </row>
1394 <row>
1395 <entry><option>-XTrustworthy</option></entry>
1396 <entry>Enable the <link linkend="safe-haskell">Safe Haskell</link> Trustworthy mode.</entry>
1397 <entry>dynamic</entry>
1398 <entry><option>-</option></entry>
1399 <entry>7.2.1</entry>
1400 </row>
1401 <row>
1402 <entry><option>-XTupleSections</option></entry>
1403 <entry>Enable <link linkend="tuple-sections">tuple sections</link>.</entry>
1404 <entry>dynamic</entry>
1405 <entry><option>-XNoTupleSections</option></entry>
1406 <entry>7.10.1</entry>
1407 </row>
1408 <row>
1409 <entry><option>-XTypeFamilies</option></entry>
1410 <entry>Enable <link linkend="type-families">type families</link>.
1411 Implies <option>-XExplicitNamespaces</option>, <option>-XKindSignatures</option>
1412 and <option>-XMonoLocalBinds</option>.</entry>
1413 <entry>dynamic</entry>
1414 <entry><option>-XNoTypeFamilies</option></entry>
1415 <entry>6.8.1</entry>
1416 </row>
1417 <row>
1418 <entry><option>-XTypeOperators</option></entry>
1419 <entry>Enable <link linkend="type-operators">type operators</link>.
1420 Implies <option>-XExplicitNamespaces</option>.</entry>
1421 <entry>dynamic</entry>
1422 <entry><option>-XNoTypeOperators</option></entry>
1423 <entry>6.8.1</entry>
1424 </row>
1425 <row>
1426 <entry><option>-XTypeSynonymInstances</option></entry>
1427 <entry>Enable <link linkend="flexible-instance-head">type synonyms in instance heads</link>.
1428 Implied by <option>-XFlexibleInstances</option>.</entry>
1429 <entry>dynamic</entry>
1430 <entry><option>-XNoTypeSynonymInstances</option></entry>
1431 <entry>6.8.1</entry>
1432 </row>
1433 <row>
1434 <entry><option>-XUnboxedTuples</option></entry>
1435 <entry>Enable <link linkend="unboxed-tuples">unboxed tuples</link>.</entry>
1436 <entry>dynamic</entry>
1437 <entry><option>-XNoUnboxedTuples</option></entry>
1438 <entry>6.8.1</entry>
1439 </row>
1440 <row>
1441 <entry><option>-XUndecidableInstances</option></entry>
1442 <entry>Enable <link linkend="undecidable-instances">undecidable instances</link>.</entry>
1443 <entry>dynamic</entry>
1444 <entry><option>-XNoUndecidableInstances</option></entry>
1445 <entry>6.8.1</entry>
1446 </row>
1447 <row>
1448 <entry><option>-XUnicodeSyntax</option></entry>
1449 <entry>Enable <link linkend="unicode-syntax">unicode syntax</link>.</entry>
1450 <entry>dynamic</entry>
1451 <entry><option>-XNoUnicodeSyntax</option></entry>
1452 <entry>6.8.1</entry>
1453 </row>
1454 <row>
1455 <entry><option>-XUnliftedFFITypes</option></entry>
1456 <entry>Enable unlifted FFI types.</entry>
1457 <entry>dynamic</entry>
1458 <entry><option>-XNoUnliftedFFITypes</option></entry>
1459 <entry>6.8.1</entry>
1460 </row>
1461 <row>
1462 <entry><option>-XUnsafe</option></entry>
1463 <entry>Enable <link linkend="safe-haskell">Safe Haskell</link> Unsafe mode.</entry>
1464 <entry>dynamic</entry>
1465 <entry><option>-</option></entry>
1466 <entry>7.4.1</entry>
1467 </row>
1468 <row>
1469 <entry><option>-XViewPatterns</option></entry>
1470 <entry>Enable <link linkend="view-patterns">view patterns</link>.</entry>
1471 <entry>dynamic</entry>
1472 <entry><option>-XNoViewPatterns</option></entry>
1473 <entry>6.10.1</entry>
1474 </row>
1475 </tbody>
1476 </tgroup>
1477 </informaltable>
1478 </sect2>
1479
1480 <sect2>
1481 <title>Warnings</title>
1482
1483 <para><xref linkend="options-sanity"/></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>-W</option></entry>
1498 <entry>enable normal warnings</entry>
1499 <entry>dynamic</entry>
1500 <entry><option>-w</option></entry>
1501 </row>
1502 <row>
1503 <entry><option>-w</option></entry>
1504 <entry>disable all warnings</entry>
1505 <entry>dynamic</entry>
1506 <entry>-</entry>
1507 </row>
1508 <row>
1509 <entry><option>-Wall</option></entry>
1510 <entry>enable almost all warnings (details in <xref linkend="options-sanity"/>)</entry>
1511 <entry>dynamic</entry>
1512 <entry><option>-w</option></entry>
1513 </row>
1514 <row>
1515 <entry><option>-Werror</option></entry>
1516 <entry>make warnings fatal</entry>
1517 <entry>dynamic</entry>
1518 <entry>-Wwarn</entry>
1519 </row>
1520 <row>
1521 <entry><option>-Wwarn</option></entry>
1522 <entry>make warnings non-fatal</entry>
1523 <entry>dynamic</entry>
1524 <entry>-Werror</entry>
1525 </row>
1526
1527 <row>
1528 <entry><option>-fdefer-type-errors</option></entry>
1529 <entry>
1530 Turn type errors into warnings, <link linkend="defer-type-errors">
1531 deferring the error until runtime</link>. Implies
1532 <option>-fdefer-typed-holes</option>. See also
1533 <option>-fwarn-deferred-type-errors</option>
1534 </entry>
1535 <entry>dynamic</entry>
1536 <entry><option>-fno-defer-type-errors</option></entry>
1537 </row>
1538
1539 <row>
1540 <entry><option>-fdefer-typed-holes</option></entry>
1541 <entry>
1542 Convert <link linkend="typed-holes">typed hole</link> errors
1543 into warnings, <link linkend="defer-type-errors">deferring the
1544 error until runtime</link>. Implied by
1545 <option>-fdefer-type-errors</option>. See also
1546 <option>-fwarn-typed-holes</option>.
1547 </entry>
1548 <entry>dynamic</entry>
1549 <entry><option>-fno-defer-typed-holes</option></entry>
1550 </row>
1551
1552 <row>
1553 <entry><option>-fhelpful-errors</option></entry>
1554 <entry>Make suggestions for mis-spelled names.</entry>
1555 <entry>dynamic</entry>
1556 <entry><option>-fno-helpful-errors</option></entry>
1557 </row>
1558
1559 <row>
1560 <entry><option>-fwarn-deprecated-flags</option></entry>
1561 <entry>warn about uses of commandline flags that are deprecated</entry>
1562 <entry>dynamic</entry>
1563 <entry><option>-fno-warn-deprecated-flags</option></entry>
1564 </row>
1565
1566 <row>
1567 <entry><option>-fwarn-duplicate-constraints</option></entry>
1568 <entry>warn when a constraint appears duplicated in a type signature</entry>
1569 <entry>dynamic</entry>
1570 <entry><option>-fno-warn-duplicate-constraints</option></entry>
1571 </row>
1572
1573 <row>
1574 <entry><option>-fwarn-duplicate-exports</option></entry>
1575 <entry>warn when an entity is exported multiple times</entry>
1576 <entry>dynamic</entry>
1577 <entry><option>-fno-warn-duplicate-exports</option></entry>
1578 </row>
1579
1580 <row>
1581 <entry><option>-fwarn-hi-shadowing</option></entry>
1582 <entry>warn when a <literal>.hi</literal> file in the
1583 current directory shadows a library</entry>
1584 <entry>dynamic</entry>
1585 <entry><option>-fno-warn-hi-shadowing</option></entry>
1586 </row>
1587
1588 <row>
1589 <entry><option>-fwarn-identities</option></entry>
1590 <entry>warn about uses of Prelude numeric conversions that are probably
1591 the identity (and hence could be omitted)</entry>
1592 <entry>dynamic</entry>
1593 <entry><option>-fno-warn-identities</option></entry>
1594 </row>
1595
1596 <row>
1597 <entry><option>-fwarn-implicit-prelude</option></entry>
1598 <entry>warn when the Prelude is implicitly imported</entry>
1599 <entry>dynamic</entry>
1600 <entry><option>-fno-warn-implicit-prelude</option></entry>
1601 </row>
1602
1603 <row>
1604 <entry><option>-fwarn-incomplete-patterns</option></entry>
1605 <entry>warn when a pattern match could fail</entry>
1606 <entry>dynamic</entry>
1607 <entry><option>-fno-warn-incomplete-patterns</option></entry>
1608 </row>
1609
1610 <row>
1611 <entry><option>-fwarn-incomplete-uni-patterns</option></entry>
1612 <entry>warn when a pattern match in a lambda expression or pattern binding could fail</entry>
1613 <entry>dynamic</entry>
1614 <entry><option>-fno-warn-incomplete-uni-patterns</option></entry>
1615 </row>
1616
1617 <row>
1618 <entry><option>-fwarn-incomplete-record-updates</option></entry>
1619 <entry>warn when a record update could fail</entry>
1620 <entry>dynamic</entry>
1621 <entry><option>-fno-warn-incomplete-record-updates</option></entry>
1622 </row>
1623
1624 <row>
1625 <entry><option>-fwarn-lazy-unlifted-bindings</option></entry>
1626 <entry><emphasis>(deprecated)</emphasis> warn when a pattern binding looks lazy but must be strict</entry>
1627 <entry>dynamic</entry>
1628 <entry><option>-fno-warn-lazy-unlifted-bindings</option></entry>
1629 </row>
1630
1631 <row>
1632 <entry><option>-fwarn-missing-fields</option></entry>
1633 <entry>warn when fields of a record are uninitialised</entry>
1634 <entry>dynamic</entry>
1635 <entry><option>-fno-warn-missing-fields</option></entry>
1636 </row>
1637
1638 <row>
1639 <entry><option>-fwarn-missing-import-lists</option></entry>
1640 <entry>warn when an import declaration does not explicitly
1641 list all the names brought into scope</entry>
1642 <entry>dynamic</entry>
1643 <entry><option>-fnowarn-missing-import-lists</option></entry>
1644 </row>
1645
1646 <row>
1647 <entry><option>-fwarn-missing-methods</option></entry>
1648 <entry>warn when class methods are undefined</entry>
1649 <entry>dynamic</entry>
1650 <entry><option>-fno-warn-missing-methods</option></entry>
1651 </row>
1652
1653 <row>
1654 <entry><option>-fwarn-missing-signatures</option></entry>
1655 <entry>warn about top-level functions without signatures</entry>
1656 <entry>dynamic</entry>
1657 <entry><option>-fno-warn-missing-signatures</option></entry>
1658 </row>
1659
1660 <row>
1661 <entry><option>-fwarn-missing-exported-sigs</option></entry>
1662 <entry>warn about top-level functions without signatures, only if they are exported. takes precedence over -fwarn-missing-signatures</entry>
1663 <entry>dynamic</entry>
1664 <entry><option>-fno-warn-missing-exported-sigs</option></entry>
1665 </row>
1666
1667 <row>
1668 <entry><option>-fwarn-missing-local-sigs</option></entry>
1669 <entry>warn about polymorphic local bindings without signatures</entry>
1670 <entry>dynamic</entry>
1671 <entry><option>-fno-warn-missing-local-sigs</option></entry>
1672 </row>
1673
1674 <row>
1675 <entry><option>-fwarn-monomorphism-restriction</option></entry>
1676 <entry>warn when the Monomorphism Restriction is applied</entry>
1677 <entry>dynamic</entry>
1678 <entry><option>-fno-warn-monomorphism-restriction</option></entry>
1679 </row>
1680
1681 <row>
1682 <entry><option>-fwarn-name-shadowing</option></entry>
1683 <entry>warn when names are shadowed</entry>
1684 <entry>dynamic</entry>
1685 <entry><option>-fno-warn-name-shadowing</option></entry>
1686 </row>
1687
1688 <row>
1689 <entry><option>-fwarn-orphans, -fwarn-auto-orphans</option></entry>
1690 <entry>warn when the module contains <link linkend="orphan-modules">orphan instance declarations
1691 or rewrite rules</link></entry>
1692 <entry>dynamic</entry>
1693 <entry><option>-fno-warn-orphans, -fno-warn-auto-orphans</option></entry>
1694 </row>
1695
1696 <row>
1697 <entry><option>-fwarn-overlapping-patterns</option></entry>
1698 <entry>warn about overlapping patterns</entry>
1699 <entry>dynamic</entry>
1700 <entry><option>-fno-warn-overlapping-patterns</option></entry>
1701 </row>
1702
1703 <row>
1704 <entry><option>-fwarn-tabs</option></entry>
1705 <entry>warn if there are tabs in the source file</entry>
1706 <entry>dynamic</entry>
1707 <entry><option>-fno-warn-tabs</option></entry>
1708 </row>
1709
1710 <row>
1711 <entry><option>-fwarn-type-defaults</option></entry>
1712 <entry>warn when defaulting happens</entry>
1713 <entry>dynamic</entry>
1714 <entry><option>-fno-warn-type-defaults</option></entry>
1715 </row>
1716
1717 <row>
1718 <entry><option>-fwarn-unrecognised-pragmas</option></entry>
1719 <entry>warn about uses of pragmas that GHC doesn't recognise</entry>
1720 <entry>dynamic</entry>
1721 <entry><option>-fno-warn-unrecognised-pragmas</option></entry>
1722 </row>
1723
1724 <row>
1725 <entry><option>-fwarn-unticked-promoted-constructors</option></entry>
1726 <entry>warn if promoted constructors are not ticked </entry>
1727 <entry>dynamic</entry>
1728 <entry><option>-fno-warn-unticked-promoted-constructors</option></entry>
1729 </row>
1730
1731 <row>
1732 <entry><option>-fwarn-unused-binds</option></entry>
1733 <entry>warn about bindings that are unused.
1734 Alias for <option>-fwarn-unused-top-binds</option>,
1735 <option>-fwarn-unused-local-binds</option> and
1736 <option>-fwarn-unused-pattern-binds</option></entry>
1737 <entry>dynamic</entry>
1738 <entry><option>-fno-warn-unused-binds</option></entry>
1739 </row>
1740
1741 <row>
1742 <entry><option>-fwarn-unused-top-binds</option></entry>
1743 <entry>warn about top-level bindings that are unused</entry>
1744 <entry>dynamic</entry>
1745 <entry><option>-fno-warn-unused-top-binds</option></entry>
1746 </row>
1747
1748 <row>
1749 <entry><option>-fwarn-unused-local-binds</option></entry>
1750 <entry>warn about local bindings that are unused</entry>
1751 <entry>dynamic</entry>
1752 <entry><option>-fno-warn-unused-local-binds</option></entry>
1753 </row>
1754
1755 <row>
1756 <entry><option>-fwarn-unused-pattern-binds</option></entry>
1757 <entry>warn about pattern match bindings that are unused</entry>
1758 <entry>dynamic</entry>
1759 <entry><option>-fno-warn-unused-pattern-binds</option></entry>
1760 </row>
1761
1762 <row>
1763 <entry><option>-fwarn-unused-imports</option></entry>
1764 <entry>warn about unnecessary imports</entry>
1765 <entry>dynamic</entry>
1766 <entry><option>-fno-warn-unused-imports</option></entry>
1767 </row>
1768
1769 <row>
1770 <entry><option>-fwarn-unused-matches</option></entry>
1771 <entry>warn about variables in patterns that aren't used</entry>
1772 <entry>dynamic</entry>
1773 <entry><option>-fno-warn-unused-matches</option></entry>
1774 </row>
1775
1776 <row>
1777 <entry><option>-fwarn-unused-do-bind</option></entry>
1778 <entry>warn about do bindings that appear to throw away values of types other than <literal>()</literal></entry>
1779 <entry>dynamic</entry>
1780 <entry><option>-fno-warn-unused-do-bind</option></entry>
1781 </row>
1782
1783 <row>
1784 <entry><option>-fwarn-wrong-do-bind</option></entry>
1785 <entry>warn about do bindings that appear to throw away monadic values that you should have bound instead</entry>
1786 <entry>dynamic</entry>
1787 <entry><option>-fno-warn-wrong-do-bind</option></entry>
1788 </row>
1789
1790 <row>
1791 <entry><option>-fwarn-unsafe</option></entry>
1792 <entry>warn if the module being compiled is regarded to be unsafe.
1793 Should be used to check the safety status of modules when using safe
1794 inference. Works on all module types, even those using explicit
1795 <link linkend="safe-haskell">Safe Haskell</link> modes (such as
1796 <option>-XTrustworthy</option>) and so can be used to have the
1797 compiler check any assumptions made.</entry>
1798 <entry>dynamic</entry>
1799 <entry><option>-fno-warn-unsafe</option></entry>
1800 </row>
1801
1802 <row>
1803 <entry><option>-fwarn-safe</option></entry>
1804 <entry>warn if the module being compiled is regarded to be safe.
1805 Should be used to check the safety status of modules when using safe
1806 inference. Works on all module types, even those using explicit
1807 <link linkend="safe-haskell">Safe Haskell</link> modes (such as
1808 <option>-XTrustworthy</option>) and so can be used to have the
1809 compiler check any assumptions made.</entry>
1810 <entry>dynamic</entry>
1811 <entry><option>-fno-warn-safe</option></entry>
1812 </row>
1813
1814 <row>
1815 <entry><option>-fwarn-trustworthy-safe</option></entry>
1816 <entry>warn if the module being compiled is marked as
1817 <option>-XTrustworthy</option> but it could instead be marked as
1818 <option>-XSafe</option>, a more informative bound. Can be used to
1819 detect once a Safe Haskell bound can be improved as dependencies
1820 are updated.</entry>
1821 <entry>dynamic</entry>
1822 <entry><option>-fno-warn-safe</option></entry>
1823 </row>
1824
1825 <row>
1826 <entry><option>-fwarn-warnings-deprecations</option></entry>
1827 <entry>warn about uses of functions &amp; types that have warnings or deprecated pragmas</entry>
1828 <entry>dynamic</entry>
1829 <entry><option>-fno-warn-warnings-deprecations</option></entry>
1830 </row>
1831
1832 <row>
1833 <entry><option>-fwarn-amp</option></entry>
1834 <entry><emphasis>(deprecated)</emphasis> warn on definitions conflicting with the Applicative-Monad Proposal (AMP)</entry>
1835 <entry>dynamic</entry>
1836 <entry><option>-fno-warn-amp</option></entry>
1837 </row>
1838
1839 <row>
1840 <entry><option>-fwarn-deferred-type-errors</option></entry>
1841 <entry>
1842 Report warnings when <link linkend="defer-type-errors">deferred type errors</link>
1843 are enabled. This option is enabled by default. See <option>-fdefer-type-errors</option>.
1844 </entry>
1845 <entry>dynamic</entry>
1846 <entry><option>-fno-warn-deferred-type-errors</option></entry>
1847 </row>
1848
1849 <row>
1850 <entry><option>-fwarn-typed-holes</option></entry>
1851 <entry>
1852 Report warnings when <link linkend="typed-holes">typed hole</link>
1853 errors are <link linkend="defer-type-errors">deferred until
1854 runtime</link>. See <option>-fdefer-typed-holes</option>.
1855 </entry>
1856 <entry>dynamic</entry>
1857 <entry><option>-fno-warn-typed-holes</option></entry>
1858 </row>
1859
1860 <row>
1861 <entry><option>-fwarn-partial-type-signatures</option></entry>
1862 <entry>
1863 warn about holes in partial type signatures when
1864 <option>-XPartialTypesignatures</option> is enabled. Not
1865 applicable when <option>-XPartialTypesignatures</option> is not
1866 enabled, in which case errors are generated for such holes.
1867 See <xref linkend="partial-type-signatures"/>.
1868 </entry>
1869 <entry>dynamic</entry>
1870 <entry><option>-fno-warn-partial-type-signatures</option></entry>
1871 </row>
1872
1873 <row>
1874 <entry><option>-fwarn-deriving-typeable</option></entry>
1875 <entry>
1876 warn when encountering a request to derive an instance of
1877 class <literal>Typeable</literal>. As of GHC 7.10, such
1878 declarations are unnecessary and are ignored by the compiler
1879 because GHC has a custom solver for discharging this type of
1880 constraint.
1881 </entry>
1882 <entry>dynamic</entry>
1883 <entry><option>-fno-warn-deriving-typeable</option></entry>
1884 </row>
1885
1886
1887 </tbody>
1888 </tgroup>
1889 </informaltable>
1890
1891 </sect2>
1892 <sect2>
1893 <title>Optimisation levels</title>
1894
1895 <para>These options are described in more detail in <xref linkend="options-optimise"/>.</para>
1896
1897 <informaltable>
1898 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1899 <thead>
1900 <row>
1901 <entry>Flag</entry>
1902 <entry>Description</entry>
1903 <entry>Static/Dynamic</entry>
1904 <entry>Reverse</entry>
1905 </row>
1906 </thead>
1907 <tbody>
1908 <row>
1909 <entry><option>-O0</option></entry>
1910 <entry>Disable optimisations (default)</entry>
1911 <entry>dynamic</entry>
1912 <entry><option>-O</option></entry>
1913 </row>
1914 <row>
1915 <entry><option>-O</option> or <option>-O1</option></entry>
1916 <entry>Enable level 1 optimisations</entry>
1917 <entry>dynamic</entry>
1918 <entry><option>-O0</option></entry>
1919 </row>
1920 <row>
1921 <entry><option>-O2</option></entry>
1922 <entry>Enable level 2 optimisations</entry>
1923 <entry>dynamic</entry>
1924 <entry><option>-O0</option></entry>
1925 </row>
1926 <row>
1927 <entry><option>-Odph</option></entry>
1928 <entry>Enable level 2 optimisations, set <option>-fmax-simplifier-iterations=20</option>
1929 and <option>-fsimplifier-phases=3</option>.</entry>
1930 <entry>dynamic</entry>
1931 <entry>-</entry>
1932 </row>
1933 </tbody>
1934 </tgroup>
1935 </informaltable>
1936
1937 <para>See <xref linkend="options-f-compact"/> for a list of optimisations enabled on level 1 and level 2.</para>
1938
1939 </sect2>
1940 <sect2 id="options-f-compact">
1941 <title>Individual optimisations</title>
1942
1943 <para>These options are described in more detail in <xref linkend="options-f"/>.
1944 If a flag is implied by <option>-O</option> then it is also implied by
1945 <option>-O2</option> (unless flag description explicitly says otherwise).
1946 If a flag is implied by <option>-O0</option> only then the flag is not
1947 implied by <option>-O</option> and <option>-O2</option>.
1948 </para>
1949
1950 <informaltable>
1951 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1952 <thead>
1953 <row>
1954 <entry>Flag</entry>
1955 <entry>Description</entry>
1956 <entry>Static/Dynamic</entry>
1957 <entry>Reverse</entry>
1958 </row>
1959 </thead>
1960 <tbody>
1961 <row>
1962 <entry><option>-fcall-arity</option></entry>
1963 <entry>Enable call-arity optimisation. Implied by <option>-O</option>.</entry>
1964 <entry>dynamic</entry>
1965 <entry><option>-fno-call-arity</option></entry>
1966 </row>
1967
1968 <row>
1969 <entry><option>-fcase-merge</option></entry>
1970 <entry>Enable case-merging. Implied by <option>-O</option>.</entry>
1971 <entry>dynamic</entry>
1972 <entry><option>-fno-case-merge</option></entry>
1973 </row>
1974
1975 <row>
1976 <entry><option>-fcmm-elim-common-blocks</option></entry>
1977 <entry>Enable Cmm common block elimination. Implied by <option>-O</option>.</entry>
1978 <entry>dynamic</entry>
1979 <entry><option>-fno-cmm-elim-common-blocks</option></entry>
1980 </row>
1981
1982 <row>
1983 <entry><option>-fcmm-sink</option></entry>
1984 <entry>Enable Cmm sinking. Implied by <option>-O</option>.</entry>
1985 <entry>dynamic</entry>
1986 <entry><option>-fno-cmm-sink</option></entry>
1987 </row>
1988
1989 <row>
1990 <entry><option>-fcpr-anal</option></entry>
1991 <entry>Turn on CPR analysis in the demand analyser. Implied by
1992 <option>-O</option>.</entry>
1993 <entry>dynamic</entry>
1994 <entry><option>-fno-cpr-anal</option></entry>
1995 </row>
1996
1997 <row>
1998 <entry><option>-fcse</option></entry>
1999 <entry>Enable common sub-expression elimination. Implied by <option>-O</option>.</entry>
2000 <entry>dynamic</entry>
2001 <entry><option>-fno-cse</option></entry>
2002 </row>
2003
2004 <row>
2005 <entry><option>-fdicts-cheap</option></entry>
2006 <entry>Make dictionary-valued expressions seem cheap to the optimiser.</entry>
2007 <entry>dynamic</entry>
2008 <entry><option>-fno-dicts-cheap</option></entry>
2009 </row>
2010
2011 <row>
2012 <entry><option>-fdicts-strict</option></entry>
2013 <entry>Make dictionaries strict</entry>
2014 <entry>dynamic</entry>
2015 <entry><option>-fno-dicts-strict</option></entry>
2016 </row>
2017
2018 <row>
2019 <entry><option>-fdmd-tx-dict-sel</option>
2020 </entry>
2021 <entry>Use a special demand transformer for dictionary selectors.
2022 Always enabled by default.
2023 </entry>
2024 <entry>dynamic</entry>
2025 <entry><option>-fno-dmd-tx-dict-sel</option></entry>
2026 </row>
2027
2028 <row>
2029 <entry><option>-fdo-eta-reduction</option></entry>
2030 <entry>Enable eta-reduction. Implied by <option>-O</option>.</entry>
2031 <entry>dynamic</entry>
2032 <entry><option>-fno-do-eta-reduction</option></entry>
2033 </row>
2034
2035 <row>
2036 <entry><option>-fdo-lambda-eta-expansion</option></entry>
2037 <entry>Enable lambda eta-expansion. Always enabled by default.</entry>
2038 <entry>dynamic</entry>
2039 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
2040 </row>
2041
2042 <row>
2043 <entry><option>-feager-blackholing</option></entry>
2044 <entry>Turn on <link linkend="parallel-compile-options">eager blackholing</link></entry>
2045 <entry>dynamic</entry>
2046 <entry>-</entry>
2047 </row>
2048
2049 <row>
2050 <entry><option>-fenable-rewrite-rules</option></entry>
2051 <entry>Switch on all rewrite rules (including rules
2052 generated by automatic specialisation of overloaded functions).
2053 Implied by <option>-O</option>. </entry>
2054 <entry>dynamic</entry>
2055 <entry><option>-fno-enable-rewrite-rules</option></entry>
2056 </row>
2057
2058 <row>
2059 <entry><option>-fexcess-precision</option></entry>
2060 <entry>Enable excess intermediate precision</entry>
2061 <entry>dynamic</entry>
2062 <entry><option>-fno-excess-precision</option></entry>
2063 </row>
2064
2065 <row>
2066 <entry><option>-fexpose-all-unfoldings</option></entry>
2067 <entry>Expose all unfoldings, even for very large or recursive functions.</entry>
2068 <entry>dynamic</entry>
2069 <entry><option>-fno-expose-all-unfoldings</option></entry>
2070 </row>
2071
2072 <row>
2073 <entry><option>-ffloat-in</option></entry>
2074 <entry>Turn on the float-in transformation. Implied by <option>-O</option>.</entry>
2075 <entry>dynamic</entry>
2076 <entry><option>-fno-float-in</option></entry>
2077 </row>
2078
2079 <row>
2080 <entry><option>-ffull-laziness</option></entry>
2081 <entry>Turn on full laziness (floating bindings outwards). Implied by <option>-O</option>.</entry>
2082 <entry>dynamic</entry>
2083 <entry><option>-fno-full-laziness</option></entry>
2084 </row>
2085
2086 <row>
2087 <entry><option>-ffun-to-thunk</option></entry>
2088 <entry>Allow worker-wrapper to convert a function closure into a
2089 thunk if the function does not use any of its arguments. Off by
2090 default.</entry>
2091 <entry>dynamic</entry>
2092 <entry><option>-fno-fun-to-thunk</option></entry>
2093 </row>
2094
2095 <row>
2096 <entry><option>-fignore-asserts</option></entry>
2097 <entry>Ignore assertions in the source. Implied by <option>-O</option>.</entry>
2098 <entry>dynamic</entry>
2099 <entry><option>-fno-ignore-asserts</option></entry>
2100 </row>
2101
2102 <row>
2103 <entry><option>-fignore-interface-pragmas</option></entry>
2104 <entry>Ignore pragmas in interface files. Implied by <option>-O0</option> only.</entry>
2105 <entry>dynamic</entry>
2106 <entry><option>-fno-ignore-interface-pragmas</option></entry>
2107 </row>
2108
2109 <row>
2110 <entry><option>-flate-dmd-anal</option></entry>
2111 <entry>Run demand analysis again, at the end of the simplification
2112 pipeline</entry>
2113 <entry>dynamic</entry>
2114 <entry><option>-fno-late-dmd-anal</option></entry>
2115 </row>
2116
2117 <row>
2118 <entry><option>-fliberate-case</option></entry>
2119 <entry>Turn on the liberate-case transformation. Implied by <option>-O2</option>.</entry>
2120 <entry>dynamic</entry>
2121 <entry>-fno-liberate-case</entry>
2122 </row>
2123
2124 <row>
2125 <entry><option>-fliberate-case-threshold</option>=<replaceable>n</replaceable></entry>
2126 <entry>Set the size threshold for the liberate-case transformation to <replaceable>n</replaceable> (default: 2000)</entry>
2127 <entry>dynamic</entry>
2128 <entry><option>-fno-liberate-case-threshold</option></entry>
2129 </row>
2130
2131 <row>
2132 <entry><option>-floopification</option></entry>
2133 <entry>Turn saturated self-recursive tail-calls into local jumps in the generated assembly.
2134 Implied by <option>-O</option>.</entry>
2135 <entry>dynamic</entry>
2136 <entry><option>-fno-loopification</option></entry>
2137 </row>
2138
2139 <row>
2140 <entry><option>-fmax-inline-alloc-size</option>=<replaceable>n</replaceable></entry>
2141 <entry>Set the maximum size of inline array allocations to
2142 <replaceable>n</replaceable> bytes (default: 128). GHC
2143 will allocate non-pinned arrays of statically known size
2144 in the current nursery block if they're no bigger than
2145 <replaceable>n</replaceable> bytes, ignoring GC overheap.
2146 This value should be quite a bit smaller than the block
2147 size (typically: 4096).</entry>
2148 <entry>dynamic</entry>
2149 <entry>-</entry>
2150 </row>
2151
2152 <row>
2153 <entry>
2154 <option>-fmax-inline-memcpy-insns</option>=<replaceable>n</replaceable>
2155 </entry>
2156 <entry>Inline <literal>memcpy</literal> calls if they would generate no more
2157 than <replaceable>n</replaceable> pseudo instructions
2158 (default: 32).
2159 </entry>
2160 <entry>dynamic</entry>
2161 <entry>-</entry>
2162 </row>
2163
2164 <row>
2165 <entry>
2166 <option>-fmax-inline-memset-insns</option>=<replaceable>n</replaceable>
2167 </entry>
2168 <entry>Inline <literal>memset</literal> calls if they would generate no more
2169 than <replaceable>n</replaceable> pseudo instructions
2170 (default: 32).
2171 </entry>
2172 <entry>dynamic</entry>
2173 <entry>-</entry>
2174 </row>
2175
2176 <row>
2177 <entry><option>-fmax-relevant-binds=<replaceable>n</replaceable></option></entry>
2178 <entry>Set the maximum number of bindings to display in type error messages (default 6).</entry>
2179 <entry>dynamic</entry>
2180 <entry><option>-fno-max-relevant-bindings</option></entry>
2181 </row>
2182
2183 <row>
2184 <entry><option>-fmax-simplifier-iterations=<replaceable>n</replaceable></option></entry>
2185 <entry>Set the max iterations for the simplifier (default 4).</entry>
2186 <entry>dynamic</entry>
2187 <entry>-</entry>
2188 </row>
2189
2190 <row>
2191 <entry><option>-fmax-worker-args=<replaceable>n</replaceable></option></entry>
2192 <entry>If a worker has that many arguments, none will be
2193 unpacked anymore (default: 10)</entry>
2194 <entry>dynamic</entry>
2195 <entry>-</entry>
2196 </row>
2197
2198 <row>
2199 <entry><option>-fno-opt-coercion</option></entry>
2200 <entry>Turn off the coercion optimiser</entry>
2201 <entry>static</entry>
2202 <entry>-</entry>
2203 </row>
2204
2205 <row>
2206 <entry><option>-fno-pre-inlining</option></entry>
2207 <entry>Turn off pre-inlining</entry>
2208 <entry>dynamic</entry>
2209 <entry>-</entry>
2210 </row>
2211
2212 <row>
2213 <entry><option>-fno-state-hack</option></entry>
2214 <entry>Turn off the "state hack" whereby any lambda with a real-world state token
2215 as argument is considered to be single-entry. Hence OK to inline things inside it.</entry>
2216 <entry>static</entry>
2217 <entry>-</entry>
2218 </row>
2219
2220 <row>
2221 <entry><option>-fomit-interface-pragmas</option></entry>
2222 <entry>Don't generate interface pragmas. Implied by <option>-O0</option> only.</entry>
2223 <entry>dynamic</entry>
2224 <entry><option>-fno-omit-interface-pragmas</option></entry>
2225 </row>
2226
2227 <row>
2228 <entry><option>-fomit-yields</option></entry>
2229 <entry>Omit heap checks when no allocation is being performed.</entry>
2230 <entry>dynamic</entry>
2231 <entry><option>-fno-omit-yields</option></entry>
2232 </row>
2233
2234 <row>
2235 <entry><option>-fpedantic-bottoms</option></entry>
2236 <entry>Make GHC be more precise about its treatment of bottom (but see also
2237 <option>-fno-state-hack</option>). In particular, GHC will not
2238 eta-expand through a case expression.</entry>
2239 <entry>dynamic</entry>
2240 <entry><option>-fno-pedantic-bottoms</option></entry>
2241 </row>
2242
2243 <row>
2244 <entry><option>-fregs-graph</option></entry>
2245 <entry>Use the graph colouring register allocator for register allocation
2246 in the native code generator. Implied by <option>-O2</option>.</entry>
2247 <entry>dynamic</entry>
2248 <entry><option>-fno-regs-graph</option></entry>
2249 </row>
2250
2251 <row>
2252 <entry><option>-fregs-iterative</option></entry>
2253 <entry>Use the iterative coalescing graph colouring register allocator
2254 in the native code generator.</entry>
2255 <entry>dynamic</entry>
2256 <entry><option>-fno-regs-iterative</option></entry>
2257 </row>
2258
2259 <row>
2260 <entry><option>-fsimplifier-phases=<replaceable>n</replaceable></option></entry>
2261 <entry>Set the number of phases for the simplifier (default 2).
2262 Ignored with <option>-O0</option>.</entry>
2263 <entry>dynamic</entry>
2264 <entry>-</entry>
2265 </row>
2266
2267 <row>
2268 <entry><option>-fsimpl-tick-factor=<replaceable>n</replaceable></option></entry>
2269 <entry>Set the percentage factor for simplifier ticks (default 100)</entry>
2270 <entry>dynamic</entry>
2271 <entry>-</entry>
2272 </row>
2273
2274 <row>
2275 <entry><option>-fspec-constr</option></entry>
2276 <entry>Turn on the SpecConstr transformation. Implied by <option>-O2</option>.</entry>
2277 <entry>dynamic</entry>
2278 <entry><option>-fno-spec-constr</option></entry>
2279 </row>
2280
2281 <row>
2282 <entry><option>-fspec-constr-count</option>=<replaceable>n</replaceable></entry>
2283 <entry>Set to <replaceable>n</replaceable> (default: 3) the maximum number of
2284 specialisations that will be created for any one function
2285 by the SpecConstr transformation</entry>
2286 <entry>dynamic</entry>
2287 <entry><option>-fno-spec-constr-count</option></entry>
2288 </row>
2289
2290 <row>
2291 <entry><option>-fspec-constr-threshold</option>=<replaceable>n</replaceable></entry>
2292 <entry>Set the size threshold for the SpecConstr transformation
2293 to <replaceable>n</replaceable> (default: 2000)</entry>
2294 <entry>dynamic</entry>
2295 <entry><option>-fno-spec-constr-threshold</option></entry>
2296 </row>
2297
2298 <row>
2299 <entry><option>-fspecialise</option></entry>
2300 <entry>Turn on specialisation of overloaded functions. Implied by <option>-O</option>.</entry>
2301 <entry>dynamic</entry>
2302 <entry><option>-fno-specialise</option></entry>
2303 </row>
2304
2305 <row>
2306 <entry><option>-fcross-module-specialise</option></entry>
2307 <entry>Turn on specialisation of overloaded functions imported from other modules.</entry>
2308 <entry>dynamic</entry>
2309 <entry><option>-fno-cross-module-specialise</option></entry>
2310 </row>
2311
2312 <row>
2313 <entry><option>-fstatic-argument-transformation</option></entry>
2314 <entry>Turn on the static argument transformation.</entry>
2315 <entry>dynamic</entry>
2316 <entry><option>-fno-static-argument-transformation</option></entry>
2317 </row>
2318
2319 <row>
2320 <entry><option>-fstrictness</option></entry>
2321 <entry>Turn on strictness analysis. Implied by <option>-O</option>.</entry>
2322 <entry>dynamic</entry>
2323 <entry><option>-fno-strictness</option></entry>
2324 </row>
2325
2326 <row>
2327 <entry><option>-fstrictness-before</option>=<replaceable>n</replaceable></entry>
2328 <entry>Run an additional strictness analysis before simplifier
2329 phase <replaceable>n</replaceable></entry>
2330 <entry>dynamic</entry>
2331 <entry>-</entry>
2332 </row>
2333
2334 <row>
2335 <entry><option>-funbox-small-strict-fields</option></entry>
2336 <entry>Flatten strict constructor fields with a
2337 pointer-sized representation. Implied by <option>-O</option>.</entry>
2338 <entry>dynamic</entry>
2339 <entry><option>-fno-unbox-small-strict-fields</option></entry>
2340 </row>
2341
2342 <row>
2343 <entry><option>-funbox-strict-fields</option></entry>
2344 <entry>Flatten strict constructor fields</entry>
2345 <entry>dynamic</entry>
2346 <entry><option>-fno-unbox-strict-fields</option></entry>
2347 </row>
2348
2349 <row>
2350 <entry><option>-funfolding-creation-threshold=<replaceable>n</replaceable></option></entry>
2351 <entry>Tweak unfolding settings. Default: 750</entry>
2352 <entry>dynamic</entry>
2353 <entry>-</entry>
2354 </row>
2355
2356 <row>
2357 <entry><option>-funfolding-dict-discount=<replaceable>n</replaceable></option></entry>
2358 <entry>Tweak unfolding settings. Default: 30</entry>
2359 <entry>dynamic</entry>
2360 <entry>-</entry>
2361 </row>
2362
2363 <row>
2364 <entry><option>-funfolding-fun-discount=<replaceable>n</replaceable></option></entry>
2365 <entry>Tweak unfolding settings. Default: 60</entry>
2366 <entry>dynamic</entry>
2367 <entry>-</entry>
2368 </row>
2369
2370 <row>
2371 <entry><option>-funfolding-keeness-factor=<replaceable>n</replaceable></option></entry>
2372 <entry>Tweak unfolding settings. Default: 1.5</entry>
2373 <entry>dynamic</entry>
2374 <entry>-</entry>
2375 </row>
2376
2377 <row>
2378 <entry><option>-funfolding-use-threshold=<replaceable>n</replaceable></option></entry>
2379 <entry>Tweak unfolding settings. Default: 60</entry>
2380 <entry>dynamic</entry>
2381 <entry>-</entry>
2382 </row>
2383
2384 <row>
2385 <entry><option>-fvectorisation-avoidance</option></entry>
2386 <entry>Enable vectorisation avoidance. Always enabled by default.</entry>
2387 <entry>dynamic</entry>
2388 <entry><option>-fno-vectorisation-avoidance</option></entry>
2389 </row>
2390
2391 <row>
2392 <entry><option>-fvectorise</option></entry>
2393 <entry>Enable vectorisation of nested data parallelism</entry>
2394 <entry>dynamic</entry>
2395 <entry><option>-fno-vectorise</option></entry>
2396 </row>
2397
2398 </tbody>
2399 </tgroup>
2400 </informaltable>
2401 </sect2>
2402
2403 <sect2>
2404 <title>Profiling options</title>
2405
2406 <para><xref linkend="profiling"/></para>
2407
2408 <informaltable>
2409 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2410 <thead>
2411 <row>
2412 <entry>Flag</entry>
2413 <entry>Description</entry>
2414 <entry>Static/Dynamic</entry>
2415 <entry>Reverse</entry>
2416 </row>
2417 </thead>
2418 <tbody>
2419 <row>
2420 <entry><option>-prof</option></entry>
2421 <entry>Turn on profiling</entry>
2422 <entry>dynamic</entry>
2423 <entry>-</entry>
2424 </row>
2425 <row>
2426 <entry><option>-fprof-auto</option></entry>
2427 <entry>Auto-add <literal>SCC</literal>s to all bindings
2428 not marked INLINE</entry>
2429 <entry>dynamic</entry>
2430 <entry><option>-fno-prof-auto</option></entry>
2431 </row>
2432 <row>
2433 <entry><option>-fprof-auto-top</option></entry>
2434 <entry>Auto-add <literal>SCC</literal>s to all top-level
2435 bindings not marked INLINE</entry>
2436 <entry>dynamic</entry>
2437 <entry><option>-fno-prof-auto</option></entry>
2438 </row>
2439 <row>
2440 <entry><option>-fprof-auto-exported</option></entry>
2441 <entry>Auto-add <literal>SCC</literal>s to all exported
2442 bindings not marked INLINE</entry>
2443 <entry>dynamic</entry>
2444 <entry><option>-fno-prof-auto</option></entry>
2445 </row>
2446 <row>
2447 <entry><option>-fprof-cafs</option></entry>
2448 <entry>Auto-add <literal>SCC</literal>s to all CAFs</entry>
2449 <entry>dynamic</entry>
2450 <entry><option>-fno-prof-cafs</option></entry>
2451 </row>
2452 <row>
2453 <entry><option>-fno-prof-count-entries</option></entry>
2454 <entry>Do not collect entry counts</entry>
2455 <entry>dynamic</entry>
2456 <entry><option>-fprof-count-entries</option></entry>
2457 </row>
2458 <row>
2459 <entry><option>-ticky</option></entry>
2460 <entry><link linkend="ticky-ticky">Turn on ticky-ticky profiling</link></entry>
2461 <entry>dynamic</entry>
2462 <entry>-</entry>
2463 </row>
2464 </tbody>
2465 </tgroup>
2466 </informaltable>
2467 </sect2>
2468
2469 <sect2>
2470 <title>Program coverage options</title>
2471
2472 <para><xref linkend="hpc"/></para>
2473
2474 <informaltable>
2475 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2476 <thead>
2477 <row>
2478 <entry>Flag</entry>
2479 <entry>Description</entry>
2480 <entry>Static/Dynamic</entry>
2481 <entry>Reverse</entry>
2482 </row>
2483 </thead>
2484 <tbody>
2485 <row>
2486 <entry><option>-fhpc</option></entry>
2487 <entry>Turn on Haskell program coverage instrumentation</entry>
2488 <entry>dynamic</entry>
2489 <entry><option>-</option></entry>
2490 </row>
2491 <row>
2492 <entry><option>-hpcdir dir</option></entry>
2493 <entry>Directory to deposit .mix files during compilation (default is .hpc)</entry>
2494 <entry>dynamic</entry>
2495 <entry><option>-</option></entry>
2496 </row>
2497 </tbody>
2498 </tgroup>
2499 </informaltable>
2500 </sect2>
2501
2502 <sect2>
2503 <title>Haskell pre-processor options</title>
2504
2505 <para><xref linkend="pre-processor"/></para>
2506
2507 <informaltable>
2508 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2509 <thead>
2510 <row>
2511 <entry>Flag</entry>
2512 <entry>Description</entry>
2513 <entry>Static/Dynamic</entry>
2514 <entry>Reverse</entry>
2515 </row>
2516 </thead>
2517 <tbody>
2518 <row>
2519 <entry><option>-F</option></entry>
2520 <entry>
2521 Enable the use of a pre-processor
2522 (set with <option>-pgmF</option>)
2523 </entry>
2524 <entry>dynamic</entry>
2525 <entry>-</entry>
2526 </row>
2527 </tbody>
2528 </tgroup>
2529 </informaltable>
2530 </sect2>
2531
2532 <sect2>
2533 <title>C pre-processor options</title>
2534
2535 <para><xref linkend="c-pre-processor"/></para>
2536
2537 <informaltable>
2538 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2539 <thead>
2540 <row>
2541 <entry>Flag</entry>
2542 <entry>Description</entry>
2543 <entry>Static/Dynamic</entry>
2544 <entry>Reverse</entry>
2545 </row>
2546 </thead>
2547 <tbody>
2548 <row>
2549 <entry><option>-cpp</option></entry>
2550 <entry>Run the C pre-processor on Haskell source files</entry>
2551 <entry>dynamic</entry>
2552 <entry>-</entry>
2553 </row>
2554 <row>
2555 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
2556 <entry>Define a symbol in the C pre-processor</entry>
2557 <entry>dynamic</entry>
2558 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
2559 </row>
2560 <row>
2561 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
2562 <entry>Undefine a symbol in the C pre-processor</entry>
2563 <entry>dynamic</entry>
2564 <entry>-</entry>
2565 </row>
2566 <row>
2567 <entry><option>-I</option><replaceable>dir</replaceable></entry>
2568 <entry>Add <replaceable>dir</replaceable> to the
2569 directory search list for <literal>#include</literal> files</entry>
2570 <entry>dynamic</entry>
2571 <entry>-</entry>
2572 </row>
2573 </tbody>
2574 </tgroup>
2575 </informaltable>
2576 </sect2>
2577
2578 <sect2>
2579 <title>Code generation options</title>
2580
2581 <para><xref linkend="options-codegen"/></para>
2582
2583 <informaltable>
2584 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2585 <thead>
2586 <row>
2587 <entry>Flag</entry>
2588 <entry>Description</entry>
2589 <entry>Static/Dynamic</entry>
2590 <entry>Reverse</entry>
2591 </row>
2592 </thead>
2593 <tbody>
2594 <row>
2595 <entry><option>-fasm</option></entry>
2596 <entry>Use the <link linkend="native-code-gen">native code
2597 generator</link></entry>
2598 <entry>dynamic</entry>
2599 <entry>-fllvm</entry>
2600 </row>
2601 <row>
2602 <entry><option>-fllvm</option></entry>
2603 <entry>Compile using the <link linkend="llvm-code-gen">LLVM code
2604 generator</link></entry>
2605 <entry>dynamic</entry>
2606 <entry>-fasm</entry>
2607 </row>
2608 <row>
2609 <entry><option>-fno-code</option></entry>
2610 <entry>Omit code generation</entry>
2611 <entry>dynamic</entry>
2612 <entry>-</entry>
2613 </row>
2614 <row>
2615 <entry><option>-fwrite-interface</option></entry>
2616 <entry>Always write interface files</entry>
2617 <entry>dynamic</entry>
2618 <entry>-</entry>
2619 </row>
2620 <row>
2621 <entry><option>-fbyte-code</option></entry>
2622 <entry>Generate byte-code</entry>
2623 <entry>dynamic</entry>
2624 <entry>-</entry>
2625 </row>
2626 <row>
2627 <entry><option>-fobject-code</option></entry>
2628 <entry>Generate object code</entry>
2629 <entry>dynamic</entry>
2630 <entry>-</entry>
2631 </row>
2632 </tbody>
2633 </tgroup>
2634 </informaltable>
2635 </sect2>
2636
2637 <sect2>
2638 <title>Linking options</title>
2639
2640 <para><xref linkend="options-linker"/></para>
2641
2642 <informaltable>
2643 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2644 <thead>
2645 <row>
2646 <entry>Flag</entry>
2647 <entry>Description</entry>
2648 <entry>Static/Dynamic</entry>
2649 <entry>Reverse</entry>
2650 </row>
2651 </thead>
2652 <tbody>
2653 <row>
2654 <entry><option>-shared</option></entry>
2655 <entry>Generate a shared library (as opposed to an executable)</entry>
2656 <entry>dynamic</entry>
2657 <entry>-</entry>
2658 </row>
2659 <row>
2660 <entry><option>-staticlib</option></entry>
2661 <entry>On Darwin/OS X/iOS only, generate a standalone static library
2662 (as opposed to an executable).
2663 This is the usual way to compile for iOS.
2664 </entry>
2665 <entry>dynamic</entry>
2666 <entry>-</entry>
2667 </row>
2668 <row>
2669 <entry><option>-fPIC</option></entry>
2670 <entry>Generate position-independent code (where available)</entry>
2671 <entry>dynamic</entry>
2672 <entry>-</entry>
2673 </row>
2674 <row>
2675 <entry><option>-dynamic</option></entry>
2676 <entry>Use dynamic Haskell libraries (if available)</entry>
2677 <entry>dynamic</entry>
2678 <entry>-</entry>
2679 </row>
2680 <row>
2681 <entry><option>-dynamic-too</option></entry>
2682 <entry>Build dynamic object files <emphasis>as well as</emphasis> static object files during compilation</entry>
2683 <entry>dynamic</entry>
2684 <entry>-</entry>
2685 </row>
2686 <row>
2687 <entry><option>-dyno</option></entry>
2688 <entry>Set the output path for the <emphasis>dynamically</emphasis> linked objects</entry>
2689 <entry>dynamic</entry>
2690 <entry>-</entry>
2691 </row>
2692 <row>
2693 <entry><option>-dynosuf</option></entry>
2694 <entry>Set the output suffix for dynamic object files</entry>
2695 <entry>dynamic</entry>
2696 <entry>-</entry>
2697 </row>
2698 <row>
2699 <entry><option>-dynload</option></entry>
2700 <entry>Selects one of a number of modes for finding shared
2701 libraries at runtime.</entry>
2702 <entry>dynamic</entry>
2703 <entry>-</entry>
2704 </row>
2705 <row>
2706 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
2707 <entry>On Darwin/OS X/iOS only, link in the framework <replaceable>name</replaceable>.
2708 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
2709 <entry>dynamic</entry>
2710 <entry>-</entry>
2711 </row>
2712 <row>
2713 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
2714 <entry>On Darwin/OS X/iOS only, add <replaceable>dir</replaceable> to the list of
2715 directories searched for frameworks.
2716 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
2717 <entry>dynamic</entry>
2718 <entry>-</entry>
2719 </row>
2720 <row>
2721 <entry><option>-l</option><replaceable>lib</replaceable></entry>
2722 <entry>Link in library <replaceable>lib</replaceable></entry>
2723 <entry>dynamic</entry>
2724 <entry>-</entry>
2725 </row>
2726 <row>
2727 <entry><option>-L</option><replaceable>dir</replaceable></entry>
2728 <entry>Add <replaceable>dir</replaceable> to the list of
2729 directories searched for libraries</entry>
2730 <entry>dynamic</entry>
2731 <entry>-</entry>
2732 </row>
2733 <row>
2734 <entry><option>-main-is</option></entry>
2735 <entry>Set main module and function</entry>
2736 <entry>dynamic</entry>
2737 <entry>-</entry>
2738 </row>
2739 <row>
2740 <entry><option>--mk-dll</option></entry>
2741 <entry>DLL-creation mode (Windows only)</entry>
2742 <entry>dynamic</entry>
2743 <entry>-</entry>
2744 </row>
2745 <row>
2746 <entry><option>-no-hs-main</option></entry>
2747 <entry>Don't assume this program contains <literal>main</literal></entry>
2748 <entry>dynamic</entry>
2749 <entry>-</entry>
2750 </row>
2751 <row>
2752 <entry><option>-rtsopts</option>, <option>-rtsopts={none,some,all}</option></entry>
2753 <entry>Control whether the RTS behaviour can be tweaked via command-line
2754 flags and the <literal>GHCRTS</literal> environment
2755 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>
2756 <entry>dynamic</entry>
2757 <entry>-</entry>
2758 </row>
2759 <row>
2760 <entry><option>-with-rtsopts=<replaceable>opts</replaceable></option></entry>
2761 <entry>Set the default RTS options to
2762 <replaceable>opts</replaceable>.</entry>
2763 <entry>dynamic</entry>
2764 <entry>-</entry>
2765 </row>
2766 <row>
2767 <entry><option>-no-rtsopts-suggestions</option></entry>
2768 <entry>Don't print RTS suggestions about linking with
2769 <literal>-rtsopts</literal>.
2770 </entry>
2771 <entry>dynamic</entry>
2772 <entry>-</entry>
2773 </row>
2774 <row>
2775 <entry><option>-no-link</option></entry>
2776 <entry>Omit linking</entry>
2777 <entry>dynamic</entry>
2778 <entry>-</entry>
2779 </row>
2780 <row>
2781 <entry><option>-split-objs</option></entry>
2782 <entry>Split objects (for libraries)</entry>
2783 <entry>dynamic</entry>
2784 <entry>-</entry>
2785 </row>
2786 <row>
2787 <entry><option>-static</option></entry>
2788 <entry>Use static Haskell libraries</entry>
2789 <entry>dynamic</entry>
2790 <entry>-</entry>
2791 </row>
2792 <row>
2793 <entry><option>-threaded</option></entry>
2794 <entry>Use the threaded runtime</entry>
2795 <entry>dynamic</entry>
2796 <entry>-</entry>
2797 </row>
2798 <row>
2799 <entry><option>-debug</option></entry>
2800 <entry>Use the debugging runtime</entry>
2801 <entry>dynamic</entry>
2802 <entry>-</entry>
2803 </row>
2804 <row>
2805 <entry><option>-ticky</option></entry>
2806 <entry>For linking, this simply implies <option>-debug</option>;
2807 see <xref linkend="ticky-ticky"/>.</entry>
2808 <entry>dynamic</entry>
2809 <entry>-</entry>
2810 </row>
2811 <row>
2812 <entry><option>-eventlog</option></entry>
2813 <entry>Enable runtime event tracing</entry>
2814 <entry>dynamic</entry>
2815 <entry>-</entry>
2816 </row>
2817 <row>
2818 <entry><option>-fno-gen-manifest</option></entry>
2819 <entry>Do not generate a manifest file (Windows only)</entry>
2820 <entry>dynamic</entry>
2821 <entry>-</entry>
2822 </row>
2823 <row>
2824 <entry><option>-fno-embed-manifest</option></entry>
2825 <entry>Do not embed the manifest in the executable (Windows only)</entry>
2826 <entry>dynamic</entry>
2827 <entry>-</entry>
2828 </row>
2829 <row>
2830 <entry><option>-fno-shared-implib</option></entry>
2831 <entry>Don't generate an import library for a DLL (Windows only)</entry>
2832 <entry>dynamic</entry>
2833 <entry>-</entry>
2834 </row>
2835 <row>
2836 <entry><option>-dylib-install-name</option> <replaceable>path</replaceable></entry>
2837 <entry>Set the install name (via <literal>-install_name</literal> passed to Apple's
2838 linker), specifying the full install path of the library file. Any libraries
2839 or executables that link with it later will pick up that path as their
2840 runtime search location for it. (Darwin/OS X only)</entry>
2841 <entry>dynamic</entry>
2842 <entry>-</entry>
2843 </row>
2844 <row>
2845 <entry><option>-rdynamic</option></entry>
2846 <entry>This instructs the linker to add all symbols, not only used ones, to the
2847 dynamic symbol table. Currently Linux and Windows/MinGW32 only.
2848 This is equivalent to using <literal>-optl -rdynamic</literal> on Linux,
2849 and <literal>-optl -export-all-symbols</literal> on Windows.</entry>
2850 <entry>dynamic</entry>
2851 <entry>-</entry>
2852 </row>
2853 </tbody>
2854 </tgroup>
2855 </informaltable>
2856 </sect2>
2857
2858 <sect2>
2859 <title>Plugin options</title>
2860
2861 <para><xref linkend="compiler-plugins"/></para>
2862
2863 <informaltable>
2864 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2865 <thead>
2866 <row>
2867 <entry>Flag</entry>
2868 <entry>Description</entry>
2869 <entry>Static/Dynamic</entry>
2870 <entry>Reverse</entry>
2871 </row>
2872 </thead>
2873 <tbody>
2874 <row>
2875 <entry><option>-fplugin</option>=<replaceable>module</replaceable></entry>
2876 <entry>Load a plugin exported by a given module</entry>
2877 <entry>dynamic</entry>
2878 <entry>-</entry>
2879 </row>
2880 <row>
2881 <entry><option>-fplugin-opt</option>=<replaceable>module:args</replaceable></entry>
2882 <entry>Give arguments to a plugin module; module must be specified with <option>-fplugin</option></entry>
2883 <entry>dynamic</entry>
2884 <entry>-</entry>
2885 </row>
2886 </tbody>
2887 </tgroup>
2888 </informaltable>
2889 </sect2>
2890
2891
2892 <sect2>
2893 <title>Replacing phases</title>
2894
2895 <para><xref linkend="replacing-phases"/></para>
2896
2897 <informaltable>
2898 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2899 <thead>
2900 <row>
2901 <entry>Flag</entry>
2902 <entry>Description</entry>
2903 <entry>Static/Dynamic</entry>
2904 <entry>Reverse</entry>
2905 </row>
2906 </thead>
2907 <tbody>
2908 <row>
2909 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
2910 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
2911 <entry>dynamic</entry>
2912 <entry>-</entry>
2913 </row>
2914 <row>
2915 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
2916 <entry>Use <replaceable>cmd</replaceable> as the C
2917 pre-processor (with <option>-cpp</option> only)</entry>
2918 <entry>dynamic</entry>
2919 <entry>-</entry>
2920 </row>
2921 <row>
2922 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
2923 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
2924 <entry>dynamic</entry>
2925 <entry>-</entry>
2926 </row>
2927 <row>
2928 <entry><option>-pgmlo</option> <replaceable>cmd</replaceable></entry>
2929 <entry>Use <replaceable>cmd</replaceable> as the LLVM optimiser</entry>
2930 <entry>dynamic</entry>
2931 <entry>-</entry>
2932 </row>
2933 <row>
2934 <entry><option>-pgmlc</option> <replaceable>cmd</replaceable></entry>
2935 <entry>Use <replaceable>cmd</replaceable> as the LLVM compiler</entry>
2936 <entry>dynamic</entry>
2937 <entry>-</entry>
2938 </row>
2939 <row>
2940 <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
2941 <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
2942 <entry>dynamic</entry>
2943 <entry>-</entry>
2944 </row>
2945 <row>
2946 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
2947 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
2948 <entry>dynamic</entry>
2949 <entry>-</entry>
2950 </row>
2951 <row>
2952 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
2953 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
2954 <entry>dynamic</entry>
2955 <entry>-</entry>
2956 </row>
2957 <row>
2958 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
2959 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
2960 <entry>dynamic</entry>
2961 <entry>-</entry>
2962 </row>
2963 <row>
2964 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
2965 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
2966 (with <option>-F</option> only)</entry>
2967 <entry>dynamic</entry>
2968 <entry>-</entry>
2969 </row>
2970 <row>
2971 <entry><option>-pgmwindres</option> <replaceable>cmd</replaceable></entry>
2972 <entry>Use <replaceable>cmd</replaceable> as the program for
2973 embedding manifests on Windows.</entry>
2974 <entry>dynamic</entry>
2975 <entry>-</entry>
2976 </row>
2977 <row>
2978 <entry><option>-pgmlibtool</option> <replaceable>cmd</replaceable></entry>
2979 <entry>Use <replaceable>cmd</replaceable> as the command for libtool
2980 (with <option>-staticlib</option> only).</entry>
2981 <entry>dynamic</entry>
2982 <entry>-</entry>
2983 </row>
2984 </tbody>
2985 </tgroup>
2986 </informaltable>
2987 <indexterm><primary><option>-pgmL</option></primary></indexterm>
2988 <indexterm><primary><option>-pgmP</option></primary></indexterm>
2989 <indexterm><primary><option>-pgmc</option></primary></indexterm>
2990 <indexterm><primary><option>-pgmlo</option></primary></indexterm>
2991 <indexterm><primary><option>-pgmlc</option></primary></indexterm>
2992 <indexterm><primary><option>-pgma</option></primary></indexterm>
2993 <indexterm><primary><option>-pgml</option></primary></indexterm>
2994 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
2995 <indexterm><primary><option>-pgmF</option></primary></indexterm>
2996
2997 </sect2>
2998
2999 <sect2>
3000 <title>Forcing options to particular phases</title>
3001
3002 <para><xref linkend="forcing-options-through"/></para>
3003
3004 <informaltable>
3005 <tgroup cols="4" align="left" colsep="1" rowsep="1">
3006 <thead>
3007 <row>
3008 <entry>Flag</entry>
3009 <entry>Description</entry>
3010 <entry>Static/Dynamic</entry>
3011 <entry>Reverse</entry>
3012 </row>
3013 </thead>
3014 <tbody>
3015 <row>
3016 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
3017 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
3018 <entry>dynamic</entry>
3019 <entry>-</entry>
3020 </row>
3021 <row>
3022 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
3023 <entry>pass <replaceable>option</replaceable> to cpp (with
3024 <option>-cpp</option> only)</entry>
3025 <entry>dynamic</entry>
3026 <entry>-</entry>
3027 </row>
3028 <row>
3029 <entry><option>-optF</option> <replaceable>option</replaceable></entry>
3030 <entry>pass <replaceable>option</replaceable> to the
3031 custom pre-processor</entry>
3032 <entry>dynamic</entry>
3033 <entry>-</entry>
3034 </row>
3035 <row>
3036 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
3037 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
3038 <entry>dynamic</entry>
3039 <entry>-</entry>
3040 </row>
3041 <row>
3042 <entry><option>-optlo</option> <replaceable>option</replaceable></entry>
3043 <entry>pass <replaceable>option</replaceable> to the LLVM optimiser</entry>
3044 <entry>dynamic</entry>
3045 <entry>-</entry>
3046 </row>
3047 <row>
3048 <entry><option>-optlc</option> <replaceable>option</replaceable></entry>
3049 <entry>pass <replaceable>option</replaceable> to the LLVM compiler</entry>
3050 <entry>dynamic</entry>
3051 <entry>-</entry>
3052 </row>
3053 <row>
3054 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
3055 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
3056 <entry>dynamic</entry>
3057 <entry>-</entry>
3058 </row>
3059 <row>
3060 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
3061 <entry>pass <replaceable>option</replaceable> to the linker</entry>
3062 <entry>dynamic</entry>
3063 <entry>-</entry>
3064 </row>
3065 <row>
3066 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
3067 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
3068 <entry>dynamic</entry>
3069 <entry>-</entry>
3070 </row>
3071 <row>
3072 <entry><option>-optwindres</option> <replaceable>option</replaceable></entry>
3073 <entry>pass <replaceable>option</replaceable> to <literal>windres</literal>.</entry>
3074 <entry>dynamic</entry>
3075 <entry>-</entry>
3076 </row>
3077 </tbody>
3078 </tgroup>
3079 </informaltable>
3080 </sect2>
3081
3082 <sect2>
3083 <title>Platform-specific options</title>
3084
3085 <para><xref linkend="options-platform"/></para>
3086
3087 <informaltable>
3088 <tgroup cols="4" align="left" colsep="1" rowsep="1">
3089 <thead>
3090 <row>
3091 <entry>Flag</entry>
3092 <entry>Description</entry>
3093 <entry>Static/Dynamic</entry>
3094 <entry>Reverse</entry>
3095 </row>
3096 </thead>
3097 <tbody>
3098 <row>
3099 <entry><option>-msse2</option></entry>
3100 <entry>(x86 only) Use SSE2 for floating point</entry>
3101 <entry>dynamic</entry>
3102 <entry>-</entry>
3103 </row>
3104 </tbody>
3105 </tgroup>
3106 </informaltable>
3107 </sect2>
3108
3109
3110 <sect2>
3111 <title>Compiler debugging options</title>
3112
3113 <para><xref linkend="options-debugging"/></para>
3114
3115 <informaltable>
3116 <tgroup cols="4" align="left" colsep="1" rowsep="1">
3117 <thead>
3118 <row>
3119 <entry>Flag</entry>
3120 <entry>Description</entry>
3121 <entry>Static/Dynamic</entry>
3122 <entry>Reverse</entry>
3123 </row>
3124 </thead>
3125 <tbody>
3126 <row>
3127 <entry><option>-dcore-lint</option></entry>
3128 <entry>Turn on internal sanity checking</entry>
3129 <entry>dynamic</entry>
3130 <entry>-</entry>
3131 </row>
3132 <row>
3133 <entry><option>-ddump-to-file</option></entry>
3134 <entry>Dump to files instead of stdout</entry>
3135 <entry>dynamic</entry>
3136 <entry>-</entry>
3137 </row>
3138 <row>
3139 <entry><option>-ddump-asm</option></entry>
3140 <entry>Dump assembly</entry>
3141 <entry>dynamic</entry>
3142 <entry>-</entry>
3143 </row>
3144 <row>
3145 <entry><option>-ddump-bcos</option></entry>
3146 <entry>Dump interpreter byte code</entry>
3147 <entry>dynamic</entry>
3148 <entry>-</entry>
3149 </row>
3150 <row>
3151 <entry><option>-ddump-cmm</option></entry>
3152 <entry>Dump C-- output</entry>
3153 <entry>dynamic</entry>
3154 <entry>-</entry>
3155 </row>
3156 <row>
3157 <entry><option>-ddump-core-stats</option></entry>
3158 <entry>Print a one-line summary of the size of the Core program
3159 at the end of the optimisation pipeline </entry>
3160 <entry>dynamic</entry>
3161 <entry>-</entry>
3162 </row>
3163 <row>
3164 <entry><option>-ddump-cse</option></entry>
3165 <entry>Dump CSE output</entry>
3166 <entry>dynamic</entry>
3167 <entry>-</entry>
3168 </row>
3169 <row>
3170 <entry><option>-ddump-deriv</option></entry>
3171 <entry>Dump deriving output</entry>
3172 <entry>dynamic</entry>
3173 <entry>-</entry>
3174 </row>
3175 <row>
3176 <entry><option>-ddump-ds</option></entry>
3177 <entry>Dump desugarer output</entry>
3178 <entry>dynamic</entry>
3179 <entry>-</entry>
3180 </row>
3181 <row>
3182 <entry><option>-ddump-foreign</option></entry>
3183 <entry>Dump <literal>foreign export</literal> stubs</entry>
3184 <entry>dynamic</entry>
3185 <entry>-</entry>
3186 </row>
3187 <row>
3188 <entry><option>-ddump-hpc</option></entry>
3189 <entry>Dump after instrumentation for program coverage</entry>
3190 <entry>dynamic</entry>
3191 <entry>-</entry>
3192 </row>
3193 <row>
3194 <entry><option>-ddump-inlinings</option></entry>
3195 <entry>Dump inlining info</entry>
3196 <entry>dynamic</entry>
3197 <entry>-</entry>
3198 </row>
3199 <row>
3200 <entry><option>-ddump-llvm</option></entry>
3201 <entry>Dump LLVM intermediate code</entry>
3202 <entry>dynamic</entry>
3203 <entry>-</entry>
3204 </row>
3205 <row>
3206 <entry><option>-ddump-occur-anal</option></entry>
3207 <entry>Dump occurrence analysis output</entry>
3208 <entry>dynamic</entry>
3209 <entry>-</entry>
3210 </row>
3211 <row>
3212 <entry><option>-ddump-opt-cmm</option></entry>
3213 <entry>Dump the results of C-- to C-- optimising passes</entry>
3214 <entry>dynamic</entry>
3215 <entry>-</entry>
3216 </row>
3217 <row>
3218 <entry><option>-ddump-parsed</option></entry>
3219 <entry>Dump parse tree</entry>
3220 <entry>dynamic</entry>
3221 <entry>-</entry>
3222 </row>
3223 <row>
3224 <entry><option>-ddump-prep</option></entry>
3225 <entry>Dump prepared core</entry>
3226 <entry>dynamic</entry>
3227 <entry>-</entry>
3228 </row>
3229 <row>
3230 <entry><option>-ddump-rn</option></entry>
3231 <entry>Dump renamer output</entry>
3232 <entry>dynamic</entry>
3233 <entry>-</entry>
3234 </row>
3235 <row>
3236 <entry><option>-ddump-rule-firings</option></entry>
3237 <entry>Dump rule firing info</entry>
3238 <entry>dynamic</entry>
3239 <entry>-</entry>
3240 </row>
3241 <row>
3242 <entry><option>-ddump-rule-rewrites</option></entry>
3243 <entry>Dump detailed rule firing info</entry>
3244 <entry>dynamic</entry>
3245 <entry>-</entry>
3246 </row>
3247 <row>
3248 <entry><option>-ddump-rules</option></entry>
3249 <entry>Dump rules</entry>
3250 <entry>dynamic</entry>
3251 <entry>-</entry>
3252 </row>
3253 <row>
3254 <entry><option>-ddump-vect</option></entry>
3255 <entry>Dump vectoriser input and output</entry>
3256 <entry>dynamic</entry>
3257 <entry>-</entry>
3258 </row>
3259 <row>
3260 <entry><option>-ddump-simpl</option></entry>
3261 <entry>Dump final simplifier output</entry>
3262 <entry>dynamic</entry>
3263 <entry>-</entry>
3264 </row>
3265 <row>
3266 <entry><option>-ddump-simpl-iterations</option></entry>
3267 <entry>Dump output from each simplifier iteration</entry>
3268 <entry>dynamic</entry>
3269 <entry>-</entry>
3270 </row>
3271 <row>
3272 <entry><option>-ddump-spec</option></entry>
3273 <entry>Dump specialiser output</entry>
3274 <entry>dynamic</entry>
3275 <entry>-</entry>
3276 </row>
3277 <row>
3278 <entry><option>-ddump-splices</option></entry>
3279 <entry>Dump TH spliced expressions, and what they evaluate to</entry>
3280 <entry>dynamic</entry>
3281 <entry>-</entry>
3282 </row>
3283 <row>
3284 <entry><option>-ddump-stg</option></entry>
3285 <entry>Dump final STG</entry>
3286 <entry>dynamic</entry>
3287 <entry>-</entry>
3288 </row>
3289 <row>
3290 <entry><option>-ddump-stranal</option></entry>
3291 <entry>Dump strictness analyser output</entry>
3292 <entry>dynamic</entry>
3293 <entry>-</entry>
3294 </row>
3295 <row>
3296 <entry><option>-ddump-strsigs</option></entry>
3297 <entry>Dump strictness signatures</entry>
3298 <entry>dynamic</entry>
3299 <entry>-</entry>
3300 </row>
3301 <row>
3302 <entry><option>-ddump-tc</option></entry>
3303 <entry>Dump typechecker output</entry>
3304 <entry>dynamic</entry>
3305 <entry>-</entry>
3306 </row>
3307 <row>
3308 <entry><option>-dth-dec-file</option></entry>
3309 <entry>Show evaluated TH declarations in a .th.hs file</entry>
3310 <entry>dynamic</entry>
3311 <entry>-</entry>
3312 </row>
3313 <row>
3314 <entry><option>-ddump-types</option></entry>
3315 <entry>Dump type signatures</entry>
3316 <entry>dynamic</entry>
3317 <entry>-</entry>
3318 </row>
3319 <row>
3320 <entry><option>-ddump-worker-wrapper</option></entry>
3321 <entry>Dump worker-wrapper output</entry>
3322 <entry>dynamic</entry>
3323 <entry>-</entry>
3324 </row>
3325 <row>
3326 <entry><option>-ddump-if-trace</option></entry>
3327 <entry>Trace interface files</entry>
3328 <entry>dynamic</entry>
3329 <entry>-</entry>
3330 </row>
3331 <row>
3332 <entry><option>-ddump-tc-trace</option></entry>
3333 <entry>Trace typechecker</entry>
3334 <entry>dynamic</entry>
3335 <entry>-</entry>
3336 </row>
3337 <row>
3338 <entry><option>-ddump-vt-trace</option></entry>
3339 <entry>Trace vectoriser</entry>
3340 <entry>dynamic</entry>
3341 <entry>-</entry>
3342 </row>
3343 <row>
3344 <entry><option>-ddump-rn-trace</option></entry>
3345 <entry>Trace renamer</entry>
3346 <entry>dynamic</entry>
3347 <entry>-</entry>
3348 </row>
3349 <row>
3350 <entry><option>-ddump-rn-stats</option></entry>
3351 <entry>Renamer stats</entry>
3352 <entry>dynamic</entry>
3353 <entry>-</entry>
3354 </row>
3355 <row>
3356 <entry><option>-ddump-simpl-stats</option></entry>
3357 <entry>Dump simplifier stats</entry>
3358 <entry>dynamic</entry>
3359 <entry>-</entry>
3360 </row>
3361 <row>
3362 <entry><option>-dno-debug-output</option></entry>
3363 <entry>Suppress unsolicited debugging output</entry>
3364 <entry>static</entry>
3365 <entry>-</entry>
3366 </row>
3367 <row>
3368 <entry><option>-dppr-debug</option></entry>
3369 <entry>Turn on debug printing (more verbose)</entry>
3370 <entry>static</entry>
3371 <entry>-</entry>
3372 </row>
3373 <row>
3374 <entry><option>-dppr-user-length</option></entry>
3375 <entry>Set the depth for printing expressions in error msgs</entry>
3376 <entry>dynamic</entry>
3377 <entry>-</entry>
3378 </row>
3379 <row>
3380 <entry><option>-dppr-colsNNN</option></entry>
3381 <entry>Set the width of debugging output. For example <option>-dppr-cols200</option></entry>
3382 <entry>dynamic</entry>
3383 <entry>-</entry>
3384 </row>
3385 <row>
3386 <entry><option>-dppr-case-as-let</option></entry>
3387 <entry>Print single alternative case expressions as strict lets.</entry>
3388 <entry>dynamic</entry>
3389 <entry>-</entry>
3390 </row>
3391 <row>
3392 <entry><option>-dsuppress-all</option></entry>
3393 <entry>In core dumps, suppress everything (except for uniques) that is suppressible.</entry>
3394 <entry>dynamic</entry>
3395 <entry>-</entry>
3396 </row>
3397 <row>
3398 <entry><option>-dsuppress-uniques</option></entry>
3399 <entry>Suppress the printing of uniques in debug output (easier to use <command>diff</command>)</entry>
3400 <entry>dynamic</entry>
3401 <entry>-</entry>
3402 </row>
3403 <row>
3404 <entry><option>-dsuppress-idinfo</option></entry>
3405 <entry>Suppress extended information about identifiers where they are bound</entry>
3406 <entry>dynamic</entry>
3407 <entry>-</entry>
3408 </row>
3409 <row>
3410 <entry><option>-dsuppress-unfoldings</option></entry>
3411 <entry>Suppress the printing of the stable unfolding of a variable at its binding site</entry>
3412 <entry>dynamic</entry>
3413 <entry>-</entry>
3414 </row>
3415 <row>
3416 <entry><option>-dsuppress-module-prefixes</option></entry>
3417 <entry>Suppress the printing of module qualification prefixes</entry>
3418 <entry>dynamic</entry>
3419 <entry>-</entry>
3420 </row>
3421 <row>
3422 <entry><option>-dsuppress-type-signatures</option></entry>
3423 <entry>Suppress type signatures</entry>
3424 <entry>dynamic</entry>
3425 <entry>-</entry>
3426 </row>
3427 <row>
3428 <entry><option>-dsuppress-type-applications</option></entry>
3429 <entry>Suppress type applications</entry>
3430 <entry>dynamic</entry>
3431 <entry>-</entry>
3432 </row>
3433 <row>
3434 <entry><option>-dsuppress-coercions</option></entry>
3435 <entry>Suppress the printing of coercions in Core dumps to make them shorter</entry>
3436 <entry>dynamic</entry>
3437 <entry>-</entry>
3438 </row>
3439 <row>
3440 <entry><option>-dsource-stats</option></entry>
3441 <entry>Dump haskell source stats</entry>
3442 <entry>dynamic</entry>
3443 <entry>-</entry>
3444 </row>
3445 <row>
3446 <entry><option>-dcmm-lint</option></entry>
3447 <entry>C-- pass sanity checking</entry>
3448 <entry>dynamic</entry>
3449 <entry>-</entry>
3450 </row>
3451 <row>
3452 <entry><option>-dstg-lint</option></entry>
3453 <entry>STG pass sanity checking</entry>
3454 <entry>dynamic</entry>
3455 <entry>-</entry>
3456 </row>
3457 <row>
3458 <entry><option>-dstg-stats</option></entry>
3459 <entry>Dump STG stats</entry>
3460 <entry>dynamic</entry>
3461 <entry>-</entry>
3462 </row>
3463 <row>
3464 <entry><option>-dverbose-core2core</option></entry>
3465 <entry>Show output from each core-to-core pass</entry>
3466 <entry>dynamic</entry>
3467 <entry>-</entry>
3468 </row>
3469 <row>
3470 <entry><option>-dverbose-stg2stg</option></entry>
3471 <entry>Show output from each STG-to-STG pass</entry>
3472 <entry>dynamic</entry>
3473 <entry>-</entry>
3474 </row>
3475 <row>
3476 <entry><option>-dshow-passes</option></entry>
3477 <entry>Print out each pass name as it happens</entry>
3478 <entry>dynamic</entry>
3479 <entry>-</entry>
3480 </row>
3481 <row>
3482 <entry><option>-dfaststring-stats</option></entry>
3483 <entry>Show statistics for fast string usage when finished</entry>
3484 <entry>dynamic</entry>
3485 <entry>-</entry>
3486 </row>
3487 <row>
3488 <entry><option>-frule-check</option></entry>
3489 <entry>Report sites with rules that could have fired but didn't.
3490 Takes a string argument.</entry>
3491 <entry>dynamic</entry>
3492 <entry>-</entry>
3493 </row>
3494 </tbody>
3495 </tgroup>
3496 </informaltable>
3497 </sect2>
3498
3499 <sect2>
3500 <title>Misc compiler options</title>
3501
3502 <informaltable>
3503 <tgroup cols="4" align="left" colsep="1" rowsep="1">
3504 <thead>
3505 <row>
3506 <entry>Flag</entry>
3507 <entry>Description</entry>
3508 <entry>Static/Dynamic</entry>
3509 <entry>Reverse</entry>
3510 </row>
3511 </thead>
3512 <tbody>
3513 <row>
3514 <entry><option>-j<replaceable>N</replaceable></option></entry>
3515 <entry>When compiling with <literal>--make</literal>, compile <replaceable>N</replaceable> modules in parallel.</entry>
3516 <entry>dynamic</entry>
3517 <entry>-</entry>
3518 </row>
3519 <row>
3520 <entry><option>-fno-hi-version-check</option></entry>
3521 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
3522 <entry>dynamic</entry>
3523 <entry>-</entry>
3524 </row>
3525 <row>
3526 <entry><option>-fhistory-size</option></entry>
3527 <entry>Set simplification history size</entry>
3528 <entry>dynamic</entry>
3529 <entry>-</entry>
3530 </row>
3531 <row>
3532 <entry><option>-fno-ghci-history</option></entry>
3533 <entry>Do not use the load/store the GHCi command history from/to <literal>ghci_history</literal>.</entry>
3534 <entry>dynamic</entry>
3535 <entry>-</entry>
3536 </row>
3537 <row>
3538 <entry><option>-fno-ghci-sandbox</option></entry>
3539 <entry>Turn off the GHCi sandbox. Means computations are run in the main thread, rather than a forked thread.</entry>
3540 <entry>dynamic</entry>
3541 <entry>-</entry>
3542 </row>
3543 </tbody>
3544 </tgroup>
3545 </informaltable>
3546 </sect2>
3547 </sect1>
3548
3549
3550 <!--
3551 Still to document:
3552
3553 Misc:
3554 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
3555
3556 -Bdir
3557 -->
3558
3559 <!-- Emacs stuff:
3560 ;;; Local Variables: ***
3561 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
3562 ;;; ispell-local-dictionary: "british" ***
3563 ;;; End: ***
3564 -->