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