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