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