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