1 <sect1 id="flag-reference">
2 <title>Flag reference</title>
4 <para>This section is a quick-reference for GHC's command-line
5 flags. For each flag, we also list its static/dynamic status (see
6 <xref linkend="static-dynamic-flags">), and the flag's opposite
10 <title>Help and verbosity options (<xref linkend="options-help">)</title>
13 <tgroup cols=3 align=left colsep=1 rowsep=1>
17 <entry>Description</entry>
18 <entry>Static/Dynamic</entry>
19 <entry>Reverse</entry>
24 <entry><option>-?</option></entry>
30 <entry><option>-help</option></entry>
36 <entry><option>-v</option></entry>
37 <entry>verbose mode (equivalent to <option>-v3</option>)</entry>
38 <entry>dynamic</entry>
42 <entry><option>-v</option><replaceable>n</replaceable></entry>
43 <entry>set verbosity level</entry>
44 <entry>dynamic</entry>
48 <entry><option>––version</option></entry>
49 <entry>display GHC version</entry>
54 <entry><option>––numeric-version</option></entry>
55 <entry>display GHC version (numeric only)</entry>
60 <entry><option>––print-libdir</option></entry>
61 <entry>display GHC library directory</entry>
71 <title>Which phases to run (<xref linkend="options-order">)</title>
74 <tgroup cols=3 align=left colsep=1 rowsep=1>
78 <entry>Description</entry>
79 <entry>Static/Dynamic</entry>
80 <entry>Reverse</entry>
85 <entry><option>-E</option></entry>
86 <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
91 <entry><option>-C</option></entry>
92 <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
97 <entry><option>-S</option></entry>
98 <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
103 <entry><option>-c</option></entry>
104 <entry>Stop after compiling to object code (<literal>.o</literal> file)</entry>
105 <entry>static</entry>
114 <title>Redirecting output (<xref linkend="options-output">)</title>
117 <tgroup cols=3 align=left colsep=1 rowsep=1>
121 <entry>Description</entry>
122 <entry>Static/Dynamic</entry>
123 <entry>Reverse</entry>
128 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
129 <entry>set the suffix to use for intermediate C files</entry>
130 <entry>static</entry>
134 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
135 <entry>set directory for interface files</entry>
136 <entry>static</entry>
140 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
141 <entry>set the suffix to use for interface files</entry>
142 <entry>static</entry>
146 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
147 <entry>set output filename</entry>
148 <entry>static</entry>
152 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
153 <entry>set output directory</entry>
154 <entry>static</entry>
158 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
159 <entry>set the filename in which to put the interface</entry>
160 <entry>static</entry>
164 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
165 <entry>set the output file suffix</entry>
166 <entry>static</entry>
175 <title>Keeping intermediate files (<xref linkend="keeping-intermediates">)</title>
178 <tgroup cols=3 align=left colsep=1 rowsep=1>
182 <entry>Description</entry>
183 <entry>Static/Dynamic</entry>
184 <entry>Reverse</entry>
189 <entry><option>-keep-hc-file</option></entry>
190 <entry>retain intermediate <literal>.hc</literal> files</entry>
191 <entry>static</entry>
195 <entry><option>-keep-s-file</option></entry>
196 <entry>retain intermediate <literal>.s</literal> files</entry>
197 <entry>static</entry>
201 <entry><option>-keep-raw-s-file</option></entry>
202 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
203 <entry>static</entry>
207 <entry><option>-keep-tmp-files</option></entry>
208 <entry>retain all intermediate temporary files</entry>
209 <entry>static</entry>
218 <title>Temporary files (<xref linkend="temp-files">)</title>
221 <tgroup cols=3 align=left colsep=1 rowsep=1>
225 <entry>Description</entry>
226 <entry>Static/Dynamic</entry>
227 <entry>Reverse</entry>
232 <entry><option>-tmpdir</option></entry>
233 <entry>set the directory for temporary files</entry>
234 <entry>static</entry>
243 <title>Finding imports (<xref linkend="options-finding-imports">)</title>
246 <tgroup cols=3 align=left colsep=1 rowsep=1>
251 <entry>Description</entry>
252 <entry>Static/Dynamic</entry>
253 <entry>Reverse</entry>
258 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
259 <entry>add <replaceable>dir</replaceable>,
260 <replaceable>dir2</replaceable>, etc. to import path</entry>
261 <entry>static</entry>
265 <entry><option>-i</option></entry>
266 <entry>Empty the import directory list</entry>
267 <entry>static</entry>
276 <title>Interface file options (<xref linkend="hi-options">)</title>
279 <tgroup cols=3 align=left colsep=1 rowsep=1>
284 <entry>Description</entry>
285 <entry>Static/Dynamic</entry>
286 <entry>Reverse</entry>
291 <entry><option>-ddump-hi</option></entry>
292 <entry>Dump the new interface to stdout</entry>
293 <entry>dynamic</entry>
297 <entry><option>-ddump-hi-diffs</option></entry>
298 <entry>Show the differences vs. the old interface</entry>
299 <entry>dynamic</entry>
303 <entry><option>-ddump-minimal-imports</option></entry>
304 <entry>Dump a minimal set of imports</entry>
305 <entry>dynamic</entry>
309 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
310 <entry>Read the interface in
311 <replaceable>file</replaceable> and dump it as text to
312 <literal>stdout</literal>.</entry>
313 <entry>static</entry>
322 <title>Recompilation checking (<xref linkend="recomp">)</title>
325 <tgroup cols=3 align=left colsep=1 rowsep=1>
330 <entry>Description</entry>
331 <entry>Static/Dynamic</entry>
332 <entry>Reverse</entry>
337 <entry><option>-no-recomp</option></entry>
338 <entry>Turn off recompilation checking</entry>
339 <entry>static</entry>
340 <entry><option>-recomp</option></entry>
348 <title>Interactive-mode options (<xref linkend="ghci-dot-files">)</title>
351 <tgroup cols=3 align=left colsep=1 rowsep=1>
355 <entry>Description</entry>
356 <entry>Static/Dynamic</entry>
357 <entry>Reverse</entry>
362 <entry><option>-ignore-dot-ghci</option></entry>
363 <entry>Disable reading of <filename>.ghci</filename> files</entry>
364 <entry>static</entry>
368 <entry><option>-read-dot-ghci</option></entry>
369 <entry>Enable reading of <filename>.ghci</filename> files</entry>
370 <entry>static</entry>
379 <title>Packages (<xref linkend="packages">)</title>
381 <tgroup cols=3 align=left colsep=1 rowsep=1>
385 <entry>Description</entry>
386 <entry>Static/Dynamic</entry>
387 <entry>Reverse</entry>
392 <entry><option>-package</option> <replaceable>name</replaceable></entry>
393 <entry>Use package <replaceable>name</replaceable></entry>
394 <entry>static</entry>
398 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
399 <entry>Load more packages from <replaceable>file</replaceable></entry>
400 <entry>static</entry>
404 <entry><option>-package-name</option> <replaceable>name</replaceable></entry>
405 <entry>Compile code for package <replaceable>name</replaceable></entry>
406 <entry>static</entry>
415 <title>Language options (<xref linkend="options-language">)</title>
418 <tgroup cols=3 align=left colsep=1 rowsep=1>
422 <entry>Description</entry>
423 <entry>Static/Dynamic</entry>
424 <entry>Reverse</entry>
429 <entry><option>-fallow-overlapping-instances</option></entry>
431 <entry>dynamic</entry>
432 <entry><option>-fno-allow-overlapping-instances</option></entry>
435 <entry><option>-fallow-undecidable-instances</option></entry>
436 <entry>Enable undecidable instances</entry>
437 <entry>dynamic</entry>
438 <entry><option>-fno-allow-undecidable-instances</option></entry>
441 <entry><option>-fgenerics</option></entry>
442 <entry>Enable generics</entry>
443 <entry>dynamic</entry>
444 <entry><option>-fno-fgenerics</option></entry>
447 <entry><option>-fglasgow-exts</option></entry>
448 <entry>Enable most language extensions</entry>
449 <entry>dynamic</entry>
450 <entry><option>-fno-glasgow-exts</option></entry>
453 <entry><option>-ffi</option> or <option>-fffi</option></entry>
454 <entry>Enable foreign function interface (implied by
455 <option>-fglasgow-exts</option>)</entry>
456 <entry>dynamic</entry>
457 <entry><option>-fno-ffi</option></entry>
460 <entry><option>-fwith</option></entry>
461 <entry>Enable deprecated <literal>with</literal> keyword</entry>
462 <entry>dynamic</entry>
463 <entry><option>-fno-with</option></entry>
466 <entry><option>-fignore-asserts</option></entry>
467 <entry>Ignore assertions</entry>
468 <entry>dynamic</entry>
469 <entry><option>-fno-ignore-asserts</option></entry>
472 <entry><option>-fno-implicit-prelude</option></entry>
473 <entry>Don't implicitly <literal>import Prelude</literal></entry>
474 <entry>dynamic</entry>
478 <entry><option>-fno-monomorphism-restriction</option></entry>
479 <entry>Disable the monomorphism restriction</entry>
480 <entry>dynamic</entry>
481 <entry><option>-</option></entry>
484 <entry><option>-firrefutable-tuples</option></entry>
485 <entry>Make tuple pattern matching irrefutable</entry>
486 <entry>dynamic</entry>
487 <entry><option>-fno-irrefutable-tuples</option></entry>
490 <entry><option>-fcontext-stack</option><replaceable>n</replaceable></entry>
491 <entry>set the limit for context reduction</entry>
492 <entry>dynamic</entry>
493 <entry><option>-</option></entry>
501 <title>Warnings (<xref linkend="options-sanity">)</title>
504 <tgroup cols=3 align=left colsep=1 rowsep=1>
508 <entry>Description</entry>
509 <entry>Static/Dynamic</entry>
510 <entry>Reverse</entry>
515 <entry><option>-W</option></entry>
516 <entry>enable normal warnings</entry>
517 <entry>dynamic</entry>
518 <entry><option>-w</option></entry>
521 <entry><option>-w</option></entry>
522 <entry>disable all warnings</entry>
523 <entry>dynamic</entry>
527 <entry><option>-Wall</option></entry>
528 <entry>enable all warnings</entry>
529 <entry>dynamic</entry>
530 <entry><option>-w</option></entry>
534 <entry><option>-fwarn-deprecations</option></entry>
535 <entry>warn about uses of functions & types that are deprecated</entry>
536 <entry>dynamic</entry>
537 <entry><option>-fno-warn-deprecations</option></entry>
541 <entry><option>-fwarn-duplicate-exports</option></entry>
542 <entry>warn when an entity is exported multiple times</entry>
543 <entry>dynamic</entry>
544 <entry><option>-fno-warn-duplicate-exports</option></entry>
548 <entry><option>-fwarn-hi-shadowing</option></entry>
549 <entry>warn when a <literal>.hi</literal> file in the
550 current directory shadows a library</entry>
551 <entry>dynamic</entry>
552 <entry><option>-fno-warn-hi-shadowing</option></entry>
556 <entry><option>-fwarn-incomplete-patterns</option></entry>
557 <entry>warn when a pattern match could fail</entry>
558 <entry>dynamic</entry>
559 <entry><option>-fno-warn-incomplete-patterns</option></entry>
563 <entry><option>-fwarn-misc</option></entry>
564 <entry>enable miscellaneous warnings</entry>
565 <entry>dynamic</entry>
566 <entry><option>-fno-warn-misc</option></entry>
570 <entry><option>-fwarn-missing-fields</option></entry>
571 <entry>warn when fields of a record are uninitialised</entry>
572 <entry>dynamic</entry>
573 <entry><option>-fno-warn-missing-fields</option></entry>
577 <entry><option>-fwarn-missing-methods</option></entry>
578 <entry>warn when class methods are undefined</entry>
579 <entry>dynamic</entry>
580 <entry><option>-fno-warn-missing-methods</option></entry>
584 <entry><option>-fwarn-missing-signatures</option></entry>
585 <entry>warn about top-level functions without signatures</entry>
586 <entry>dynamic</entry>
587 <entry><option>-fno-warn-missing-signatures</option></entry>
591 <entry><option>-fwarn-name-shadowing</option></entry>
592 <entry>warn when names are shadowed</entry>
593 <entry>dynamic</entry>
594 <entry><option>-fno-warn-name-shadowing</option></entry>
598 <entry><option>-fwarn-overlapping-patterns</option></entry>
599 <entry>warn about overlapping patterns</entry>
600 <entry>dynamic</entry>
601 <entry><option>-fno-warn-overlapping-patterns</option></entry>
605 <entry><option>-fwarn-simple-patterns</option></entry>
606 <entry>warn about lambda-patterns that can fail</entry>
607 <entry>dynamic</entry>
608 <entry><option>-fno-warn-simple-patterns</option></entry>
612 <entry><option>-fwarn-type-defaults</option></entry>
613 <entry>warn when defaulting happens</entry>
614 <entry>dynamic</entry>
615 <entry><option>-fno-warn-type-defaults</option></entry>
619 <entry><option>-fwarn-unused-binds</option></entry>
620 <entry>warn about bindings that are unused</entry>
621 <entry>dynamic</entry>
622 <entry><option>-fno-warn-unused-binds</option></entry>
626 <entry><option>-fwarn-unused-imports</option></entry>
627 <entry>warn about unnecessary imports</entry>
628 <entry>dynamic</entry>
629 <entry><option>-fno-warn-unused-imports</option></entry>
633 <entry><option>-fwarn-unused-matches</option></entry>
634 <entry>warn about variables in patterns that aren't used</entry>
635 <entry>dynamic</entry>
636 <entry><option>-fno-warn-unused-matches</option></entry>
645 <title>Optimisation levels (<xref linkend="options-optimise">)</title>
648 <tgroup cols=3 align=left colsep=1 rowsep=1>
652 <entry>Description</entry>
653 <entry>Static/Dynamic</entry>
654 <entry>Reverse</entry>
659 <entry><option>-O</option></entry>
660 <entry>Enable default optimisation (level 1)</entry>
661 <entry>static</entry>
662 <entry><option>-O0</option></entry>
665 <entry><option>-O</option><replaceable>n</replaceable></entry>
666 <entry>Set optimisation level <replaceable>n</replaceable></entry>
667 <entry>static</entry>
668 <entry><option>-O0</option></entry>
676 <title>Individual optimisations (<xref linkend="options-f">)</title>
679 <tgroup cols=3 align=left colsep=1 rowsep=1>
683 <entry>Description</entry>
684 <entry>Static/Dynamic</entry>
685 <entry>Reverse</entry>
690 <entry><option>-fcase-merge</option></entry>
691 <entry>Enable case-merging</entry>
692 <entry>static</entry>
693 <entry><option>-fno-case-merge</option></entry>
697 <entry><option>-fdicts-strict</option></entry>
698 <entry>Make dictionaries strict</entry>
699 <entry>dynamic</entry>
700 <entry><option>-fno-dicts-strict</option></entry>
704 <entry><option>-fdo-eta-reduction</option></entry>
705 <entry>Enable eta-reduction</entry>
706 <entry>static</entry>
707 <entry><option>-fno-do-eta-reduction</option></entry>
711 <entry><option>-fdo-lambda-eta-expansion</option></entry>
712 <entry>Enable lambda eta-reduction</entry>
713 <entry>static</entry>
714 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
718 <entry><option>-fexcess-precision</option></entry>
719 <entry>Enable excess intermediate precision</entry>
720 <entry>static</entry>
721 <entry><option>-fno-excess-precision</option></entry>
725 <entry><option>-ffoldr-build-on</option></entry>
726 <entry>Enable foldr-build optimisation</entry>
727 <entry>static</entry>
728 <entry><option>-fno-foldr-build-on</option></entry>
732 <entry><option>-fignore-asserts</option></entry>
733 <entry>Ignore assertions in the source</entry>
734 <entry>static</entry>
735 <entry><option>-fno-ignore-asserts</option></entry>
739 <entry><option>-fignore-interface-pragmas</option></entry>
740 <entry>Ignore pragmas in interface files</entry>
741 <entry>static</entry>
742 <entry><option>-fno-ignore-interface-pragmas</option></entry>
746 <entry><option>-flet-no-escape</option></entry>
747 <entry>Enable let-no-escape optimisation</entry>
748 <entry>static</entry>
749 <entry><option>-fno-let-no-escape</option></entry>
753 <entry><option>-fliberate-case-threshold</option></entry>
754 <entry>Tweak the liberate-case optimisation (default: 10)</entry>
755 <entry>static</entry>
756 <entry><option>-fno-liberate-case-threshold</option></entry>
760 <entry><option>-fomit-interface-pragmas</option></entry>
761 <entry>Don't generate interface pragmas</entry>
762 <entry>static</entry>
763 <entry><option>-fno-omit-interface-pragmas</option></entry>
767 <entry><option>-fmax-worker-args</option></entry>
768 <entry>If a worker has that many arguments, none will be
769 unpacked anymore (default: 10)</entry>
770 <entry>static</entry>
775 <entry><option>-fmax-simplifier-iterations</option></entry>
776 <entry>Set the max iterations for the simplifier</entry>
777 <entry>static</entry>
782 <entry><option>-fno-cpr</option></entry>
783 <entry>Turn off CPR analysis</entry>
784 <entry>static</entry>
789 <entry><option>-fno-cse</option></entry>
790 <entry>Turn off common sub-expression</entry>
791 <entry>static</entry>
796 <entry><option>-fno-pre-inlining</option></entry>
797 <entry>Turn off pre-inlining</entry>
798 <entry>static</entry>
803 <entry><option>-fno-strictness</option></entry>
804 <entry>Turn off strictness analysis</entry>
805 <entry>static</entry>
810 <entry><option>-fnumbers-strict</option></entry>
811 <entry>Make numbers strict</entry>
812 <entry>dynamic</entry>
813 <entry><option>-fno-numbers-strict</option></entry>
817 <entry><option>-funbox-strict-fields</option></entry>
818 <entry>Flatten strict constructor fields</entry>
819 <entry>static</entry>
820 <entry><option>-fno-unbox-strict-fields</option></entry>
824 <entry><option>-funfolding-creation-threshold</option></entry>
825 <entry>Tweak unfolding settings</entry>
826 <entry>static</entry>
827 <entry><option>-fno-unfolding-creation-threshold</option></entry>
831 <entry><option>-funfolding-fun-discount</option></entry>
832 <entry>Tweak unfolding settings</entry>
833 <entry>static</entry>
834 <entry><option>-fno-unfolding-fun-discount</option></entry>
838 <entry><option>-funfolding-keeness-factor</option></entry>
839 <entry>Tweak unfolding settings</entry>
840 <entry>static</entry>
841 <entry><option>-fno-unfolding-keeness-factor</option></entry>
845 <entry><option>-funfolding-update-in-place</option></entry>
846 <entry>Tweak unfolding settings</entry>
847 <entry>static</entry>
848 <entry><option>-fno-unfolding-update-in-place</option></entry>
852 <entry><option>-funfolding-use-threshold</option></entry>
853 <entry>Tweak unfolding settings</entry>
854 <entry>static</entry>
855 <entry><option>-fno-unfolding-use-threshold</option></entry>
859 <entry><option>-fusagesp</option></entry>
860 <entry>Turn on UsageSP analysis</entry>
861 <entry>static</entry>
862 <entry><option>-fno-usagesp</option></entry>
870 <title>Profiling options (<xref linkend="profiling">)</title>
873 <tgroup cols=3 align=left colsep=1 rowsep=1>
877 <entry>Description</entry>
878 <entry>Static/Dynamic</entry>
879 <entry>Reverse</entry>
884 <entry><option>-auto</option></entry>
885 <entry>Auto-add <literal>_scc_</literal>s to all
886 exported functions</entry>
887 <entry>static</entry>
888 <entry><option>-no-auto</option></entry>
891 <entry><option>-auto-all</option></entry>
892 <entry>Auto-add <literal>_scc_</literal>s to all
893 top-level functions</entry>
894 <entry>static</entry>
895 <entry><option>-no-auto-all</option></entry>
898 <entry><option>-auto-dicts</option></entry>
899 <entry>Auto-add <literal>_scc_</literal>s to all dictionaries</entry>
900 <entry>static</entry>
901 <entry><option>-no-auto-dicts</option></entry>
904 <entry><option>-caf-all</option></entry>
905 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
906 <entry>static</entry>
907 <entry><option>-no-caf-all</option></entry>
910 <entry><option>-prof</option></entry>
911 <entry>Turn on profiling</entry>
912 <entry>static</entry>
916 <entry><option>-ticky</option></entry>
917 <entry>Turn on ticky-ticky profiling</entry>
918 <entry>static</entry>
927 <title>Parallelism options (<xref linkend="sec-using-parallel">)</title>
930 <tgroup cols=3 align=left colsep=1 rowsep=1>
934 <entry>Description</entry>
935 <entry>Static/Dynamic</entry>
936 <entry>Reverse</entry>
941 <entry><option>-gransim</option></entry>
942 <entry>Enable GRANSIM</entry>
943 <entry>static</entry>
947 <entry><option>-parallel</option></entry>
948 <entry>Enable Parallel Haskell</entry>
949 <entry>static</entry>
953 <entry><option>-smp</option></entry>
954 <entry>Enable SMP support</entry>
955 <entry>static</entry>
964 <title>C pre-processor options (<xref linkend="c-pre-processor">)</title>
967 <tgroup cols=3 align=left colsep=1 rowsep=1>
971 <entry>Description</entry>
972 <entry>Static/Dynamic</entry>
973 <entry>Reverse</entry>
978 <entry><option>-cpp</option></entry>
979 <entry>Run the C pre-processor on Haskell source files</entry>
980 <entry>dynamic</entry>
984 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
985 <entry>Define a symbol in the C pre-processor</entry>
986 <entry>dynamic</entry>
987 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
990 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
991 <entry>Undefine a symbol in the C pre-processor</entry>
992 <entry>dynamic</entry>
996 <entry><option>-I</option><replaceable>dir</replaceable></entry>
997 <entry>Add <replaceable>dir</replaceable> to the
998 directory search list for <literal>#include</literal> files</entry>
999 <entry>static</entry>
1008 <title>C compiler options (<xref linkend="options-C-compiler">)</title>
1010 <tgroup cols=3 align=left colsep=1 rowsep=1>
1014 <entry>Description</entry>
1015 <entry>Static/Dynamic</entry>
1016 <entry>Reverse</entry>
1021 <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1022 <entry>Include <replaceable>file</replaceable> when
1023 compiling the <filename>.hc</filename> file</entry>
1024 <entry>dynamic</entry>
1033 <title>Code generation options (<xref linkend="options-codegen">)</title>
1036 <tgroup cols=3 align=left colsep=1 rowsep=1>
1040 <entry>Description</entry>
1041 <entry>Static/Dynamic</entry>
1042 <entry>Reverse</entry>
1047 <entry><option>-fasm</option></entry>
1048 <entry>Use the native code generator</entry>
1049 <entry>dynamic</entry>
1050 <entry>-fvia-C</entry>
1053 <entry><option>-fvia-C</option></entry>
1054 <entry>Compile via C</entry>
1055 <entry>dynamic</entry>
1056 <entry>-fasm</entry>
1059 <entry><option>-fno-code</option></entry>
1060 <entry>Omit code generation</entry>
1061 <entry>static</entry>
1070 <title>Linking options (<xref linkend="options-linker">)</title>
1073 <tgroup cols=3 align=left colsep=1 rowsep=1>
1077 <entry>Description</entry>
1078 <entry>Static/Dynamic</entry>
1079 <entry>Reverse</entry>
1084 <entry><option>-dynamic</option></entry>
1085 <entry>Use dynamic Haskell libraries (if available)</entry>
1086 <entry>static</entry>
1090 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1091 <entry>Link in library <replaceable>lib</replaceable></entry>
1092 <entry>static</entry>
1096 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1097 <entry>Add <replaceable>dir</replaceable> to the list of
1098 directories searched for libraries</entry>
1099 <entry>static</entry>
1103 <entry><option>-package</option> <replaceable>name</replaceable></entry>
1104 <entry>Link in package <replaceable>name</replaceable></entry>
1105 <entry>static</entry>
1109 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1110 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1111 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1112 <entry>static</entry>
1116 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1117 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1118 directories searched for frameworks.
1119 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1120 <entry>static</entry>
1124 <entry><option>-split-objs</option></entry>
1125 <entry>Split objects (for libraries)</entry>
1126 <entry>static</entry>
1130 <entry><option>-static</option></entry>
1131 <entry>Use static Haskell libraries</entry>
1132 <entry>static</entry>
1136 <entry><option>-no-hs-main</option></entry>
1137 <entry>Don't asssume this program contains <literal>main</literal></entry>
1138 <entry>static</entry>
1147 <title>Replacing phases (<xref linkend="replacing-phases">)</title>
1150 <tgroup cols=3 align=left colsep=1 rowsep=1>
1154 <entry>Description</entry>
1155 <entry>Static/Dynamic</entry>
1156 <entry>Reverse</entry>
1161 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1162 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1163 <entry>static</entry>
1167 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1168 <entry>Use <replaceable>cmd</replaceable> as the C
1169 pre-processor (with <option>-cpp</option> only)</entry>
1170 <entry>static</entry> <entry>-</entry>
1173 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1174 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1175 <entry>static</entry>
1179 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1180 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1181 <entry>static</entry>
1185 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1186 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1187 <entry>static</entry>
1191 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1192 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1193 <entry>static</entry>
1197 <entry><option>-pgmdep</option> <replaceable>cmd</replaceable></entry>
1198 <entry>Use <replaceable>cmd</replaceable> as the dependency generator</entry>
1199 <entry>static</entry>
1203 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1204 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1205 (with <option>-F</option> only)</entry>
1206 <entry>static</entry>
1212 <indexterm><primary><option>-pgmL</option></primary></indexterm>
1213 <indexterm><primary><option>-pgmP</option></primary></indexterm>
1214 <indexterm><primary><option>-pgmc</option></primary></indexterm>
1215 <indexterm><primary><option>-pgma</option></primary></indexterm>
1216 <indexterm><primary><option>-pgml</option></primary></indexterm>
1217 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1218 <indexterm><primary><option>-pgmdep</option></primary></indexterm>
1219 <indexterm><primary><option>-pgmF</option></primary></indexterm>
1224 <title>Forcing options to particular phases (<xref linkend="forcing-options-through">)</title>
1227 <tgroup cols=3 align=left colsep=1 rowsep=1>
1231 <entry>Description</entry>
1232 <entry>Static/Dynamic</entry>
1233 <entry>Reverse</entry>
1238 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1239 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1240 <entry>dynamic</entry>
1244 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1245 <entry>pass <replaceable>option</replaceable> to cpp (with
1246 <option>-cpp</option> only)</entry>
1247 <entry>dynamic</entry>
1251 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1252 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1253 <entry>dynamic</entry>
1257 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1258 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1259 <entry>dynamic</entry>
1263 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1264 <entry>pass <replaceable>option</replaceable> to the linker</entry>
1265 <entry>static</entry>
1269 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1270 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1271 <entry>static</entry>
1275 <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1276 <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1277 <entry>static</entry>
1286 <title>Platform-specific options (<xref linkend="options-platform">)</title>
1289 <tgroup cols=3 align=left colsep=1 rowsep=1>
1293 <entry>Description</entry>
1294 <entry>Static/Dynamic</entry>
1295 <entry>Reverse</entry>
1300 <entry><option>-mv8</option></entry>
1301 <entry>(SPARC only) enable version 8 support</entry>
1302 <entry>static</entry>
1306 <entry><option>-monly-[32]-regs</option></entry>
1307 <entry>(x86 only) give some registers back to the C compiler</entry>
1308 <entry>dynamic</entry>
1318 <title>External core file options (<xref linkend="ext-core">)</title>
1321 <tgroup cols=3 align=left colsep=1 rowsep=1>
1325 <entry>Description</entry>
1326 <entry>Static/Dynamic</entry>
1327 <entry>Reverse</entry>
1332 <entry><option>-fext-core</option></entry>
1333 <entry>Generate <filename>.hcr</filename> external Core files</entry>
1334 <entry>static</entry>
1344 <title>Compiler debugging options (<xref linkend="options-debugging">)</title>
1347 <tgroup cols=3 align=left colsep=1 rowsep=1>
1351 <entry>Description</entry>
1352 <entry>Static/Dynamic</entry>
1353 <entry>Reverse</entry>
1358 <entry><option>-dcore-lint</option></entry>
1359 <entry>Turn on internal sanity checking</entry>
1360 <entry>dynamic</entry>
1364 <entry><option>-ddump-absC</option></entry>
1365 <entry>Dump abstract C</entry>
1366 <entry>dynamic</entry>
1370 <entry><option>-ddump-asm</option></entry>
1371 <entry>Dump assembly</entry>
1372 <entry>dynamic</entry>
1376 <entry><option>-ddump-bcos</option></entry>
1377 <entry>Dump interpreter byte code</entry>
1378 <entry>dynamic</entry>
1382 <entry><option>-ddump-cpranal</option></entry>
1383 <entry>Dump output from CPR analysis</entry>
1384 <entry>dynamic</entry>
1388 <entry><option>-ddump-cse</option></entry>
1389 <entry>Dump CSE output</entry>
1390 <entry>dynamic</entry>
1394 <entry><option>-ddump-deriv</option></entry>
1395 <entry>Dump deriving output</entry>
1396 <entry>dynamic</entry>
1400 <entry><option>-ddump-ds</option></entry>
1401 <entry>Dump desugarer output</entry>
1402 <entry>dynamic</entry>
1406 <entry><option>-ddump-flatC</option></entry>
1407 <entry>Dump “flat” C</entry>
1408 <entry>dynamic</entry>
1412 <entry><option>-ddump-foreign</option></entry>
1413 <entry>Dump <literal>foreign export</literal> stubs</entry>
1414 <entry>dynamic</entry>
1418 <entry><option>-ddump-inlinings</option></entry>
1419 <entry>Dump inlining info</entry>
1420 <entry>dynamic</entry>
1424 <entry><option>-ddump-occur-anal</option></entry>
1425 <entry>Dump occurrence analysis output</entry>
1426 <entry>dynamic</entry>
1430 <entry><option>-ddump-parsed</option></entry>
1431 <entry>Dump parse tree</entry>
1432 <entry>dynamic</entry>
1436 <entry><option>-ddump-realC</option></entry>
1437 <entry>Dump “real” C</entry>
1438 <entry>dynamic</entry>
1442 <entry><option>-ddump-rn</option></entry>
1443 <entry>Dump renamer output</entry>
1444 <entry>dynamic</entry>
1448 <entry><option>-ddump-rules</option></entry>
1449 <entry>Dump rules</entry>
1450 <entry>dynamic</entry>
1454 <entry><option>-ddump-sat</option></entry>
1455 <entry>Dump saturated output</entry>
1456 <entry>dynamic</entry>
1460 <entry><option>-ddump-simpl</option></entry>
1461 <entry>Dump final simplifier output</entry>
1462 <entry>dynamic</entry>
1466 <entry><option>-ddump-simpl-iterations</option></entry>
1467 <entry>Dump output from each simplifier iteration</entry>
1468 <entry>dynamic</entry>
1472 <entry><option>-ddump-spec</option></entry>
1473 <entry>Dump specialiser output</entry>
1474 <entry>dynamic</entry>
1478 <entry><option>-ddump-stg</option></entry>
1479 <entry>Dump final STG</entry>
1480 <entry>dynamic</entry>
1484 <entry><option>-ddump-stranal</option></entry>
1485 <entry>Dump strictness analyser output</entry>
1486 <entry>dynamic</entry>
1490 <entry><option>-ddump-tc</option></entry>
1491 <entry>Dump typechecker output</entry>
1492 <entry>dynamic</entry>
1496 <entry><option>-ddump-types</option></entry>
1497 <entry>Dump type signatures</entry>
1498 <entry>dynamic</entry>
1502 <entry><option>-ddump-usagesp</option></entry>
1503 <entry>Dump UsageSP analysis output</entry>
1504 <entry>dynamic</entry>
1508 <entry><option>-ddump-worker-wrapper</option></entry>
1509 <entry>Dump worker-wrapper output</entry>
1510 <entry>dynamic</entry>
1514 <entry><option>-ddump-rn-trace</option></entry>
1515 <entry>Trace renamer</entry>
1516 <entry>dynamic</entry>
1520 <entry><option>-ddump-rn-stats</option></entry>
1521 <entry>Renamer stats</entry>
1522 <entry>dynamic</entry>
1526 <entry><option>-ddump-stix</option></entry>
1527 <entry>Native code generator intermediate form</entry>
1528 <entry>dynamic</entry>
1532 <entry><option>-ddump-simpl-stats</option></entry>
1533 <entry>Dump simplifier stats</entry>
1534 <entry>dynamic</entry>
1538 <entry><option>-dppr-debug</option></entry>
1539 <entry>Turn on debug printing (more verbose)</entry>
1540 <entry>static</entry>
1544 <entry><option>-dppr-noprags</option></entry>
1545 <entry>Don't output pragma info in dumps</entry>
1546 <entry>static</entry>
1550 <entry><option>-dppr-user-length</option></entry>
1551 <entry>Set the depth for printing expressions in error msgs</entry>
1552 <entry>static</entry>
1556 <entry><option>-dsource-stats</option></entry>
1557 <entry>Dump haskell source stats</entry>
1558 <entry>dynamic</entry>
1562 <entry><option>-dstg-lint</option></entry>
1563 <entry>STG pass sanity checking</entry>
1564 <entry>dynamic</entry>
1568 <entry><option>-dstg-stats</option></entry>
1569 <entry>Dump STG stats</entry>
1570 <entry>dynamic</entry>
1574 <entry><option>-dusagesp-lint</option></entry>
1575 <entry>UsageSP sanity checker</entry>
1576 <entry>dynamic</entry>
1580 <entry><option>-dverbose-core2core</option></entry>
1581 <entry>Show output from each core-to-core pass</entry>
1582 <entry>dynamic</entry>
1586 <entry><option>-dverbose-stg2stg</option></entry>
1587 <entry>Show output from each STG-to-STG pass</entry>
1588 <entry>dynamic</entry>
1592 <entry><option>-unreg</option></entry>
1593 <entry>Enable unregisterised compilation</entry>
1594 <entry>static</entry>
1603 <title>Misc compiler options</title>
1606 <tgroup cols=3 align=left colsep=1 rowsep=1>
1610 <entry>Description</entry>
1611 <entry>Static/Dynamic</entry>
1612 <entry>Reverse</entry>
1617 <entry><option>-funfold-casms-in-hi-file</option></entry>
1618 <entry>Allow casms in unfoldings</entry>
1619 <entry>static</entry>
1623 <entry><option>-femit-extern-decls</option></entry>
1625 <entry>static</entry>
1629 <entry><option>-fglobalise-toplev-names</option></entry>
1630 <entry>Make all top-level names global (for <option>-split-objs</option>)</entry>
1631 <entry>static</entry>
1635 <entry><option>-fno-hi-version-check</option></entry>
1636 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1637 <entry>static</entry>
1641 <entry><option>-dno-black-holing</option></entry>
1642 <entry>Turn off black holing (probably doesn't work)</entry>
1643 <entry>static</entry>
1647 <entry><option>-fno-method-sharing</option></entry>
1648 <entry>Don't share specialisations of overloaded functions</entry>
1649 <entry>static</entry>
1653 <entry><option>-fno-prune-decls</option></entry>
1654 <entry>Renamer: don't prune declarations</entry>
1655 <entry>static</entry>
1659 <entry><option>-fno-prune-tydecls</option></entry>
1660 <entry>Renamer: don't prune type declarations</entry>
1661 <entry>static</entry>
1665 <entry><option>-fhistory-size</option></entry>
1666 <entry>Set simplification history size</entry>
1667 <entry>static</entry>
1671 <entry><option>-funregisterised</option></entry>
1672 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1673 <entry>static</entry>
1677 <entry><option>-fno-asm-mangling</option></entry>
1678 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1679 <entry>static</entry>
1693 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
1694 , ( "Rghc-timing" , NoArg (enableTimingStats) )
1700 ;;; Local Variables: ***
1702 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter") ***