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>-V</option></entry>
49 <entry>display GHC version</entry>
54 <entry><option>––version</option></entry>
55 <entry>display GHC version</entry>
60 <entry><option>––numeric-version</option></entry>
61 <entry>display GHC version (numeric only)</entry>
66 <entry><option>––print-libdir</option></entry>
67 <entry>display GHC library directory</entry>
77 <title>Which phases to run (<xref linkend="options-order">)</title>
80 <tgroup cols=3 align=left colsep=1 rowsep=1>
84 <entry>Description</entry>
85 <entry>Static/Dynamic</entry>
86 <entry>Reverse</entry>
91 <entry><option>-E</option></entry>
92 <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
97 <entry><option>-C</option></entry>
98 <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
103 <entry><option>-S</option></entry>
104 <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
105 <entry>static</entry>
109 <entry><option>-c</option></entry>
110 <entry>Stop after compiling to object code (<literal>.o</literal> file)</entry>
111 <entry>static</entry>
120 <title>Redirecting output (<xref linkend="options-output">)</title>
123 <tgroup cols=3 align=left colsep=1 rowsep=1>
127 <entry>Description</entry>
128 <entry>Static/Dynamic</entry>
129 <entry>Reverse</entry>
134 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
135 <entry>set the suffix to use for intermediate C files</entry>
136 <entry>static</entry>
140 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
141 <entry>set directory for interface files</entry>
142 <entry>static</entry>
146 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
147 <entry>set the suffix to use for interface files</entry>
148 <entry>static</entry>
152 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
153 <entry>set output filename</entry>
154 <entry>static</entry>
158 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
159 <entry>set output directory</entry>
160 <entry>static</entry>
164 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
165 <entry>set the filename in which to put the interface</entry>
166 <entry>static</entry>
170 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
171 <entry>set the output file suffix</entry>
172 <entry>static</entry>
181 <title>Keeping intermediate files (<xref linkend="keeping-intermediates">)</title>
184 <tgroup cols=3 align=left colsep=1 rowsep=1>
188 <entry>Description</entry>
189 <entry>Static/Dynamic</entry>
190 <entry>Reverse</entry>
195 <entry><option>-keep-hc-file</option></entry>
196 <entry>retain intermediate <literal>.hc</literal> files</entry>
197 <entry>static</entry>
201 <entry><option>-keep-s-file</option></entry>
202 <entry>retain intermediate <literal>.s</literal> files</entry>
203 <entry>static</entry>
207 <entry><option>-keep-raw-s-file</option></entry>
208 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
209 <entry>static</entry>
213 <entry><option>-keep-tmp-files</option></entry>
214 <entry>retain all intermediate temporary files</entry>
215 <entry>static</entry>
224 <title>Temporary files (<xref linkend="temp-files">)</title>
227 <tgroup cols=3 align=left colsep=1 rowsep=1>
231 <entry>Description</entry>
232 <entry>Static/Dynamic</entry>
233 <entry>Reverse</entry>
238 <entry><option>-tmpdir</option></entry>
239 <entry>set the directory for temporary files</entry>
240 <entry>static</entry>
249 <title>Finding imports (<xref linkend="search-path">)</title>
252 <tgroup cols=3 align=left colsep=1 rowsep=1>
257 <entry>Description</entry>
258 <entry>Static/Dynamic</entry>
259 <entry>Reverse</entry>
264 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
265 <entry>add <replaceable>dir</replaceable>,
266 <replaceable>dir2</replaceable>, etc. to import path</entry>
267 <entry>static</entry>
271 <entry><option>-i</option></entry>
272 <entry>Empty the import directory list</entry>
273 <entry>static</entry>
282 <title>Interface file options (<xref linkend="hi-options">)</title>
285 <tgroup cols=3 align=left colsep=1 rowsep=1>
290 <entry>Description</entry>
291 <entry>Static/Dynamic</entry>
292 <entry>Reverse</entry>
297 <entry><option>-ddump-hi</option></entry>
298 <entry>Dump the new interface to stdout</entry>
299 <entry>dynamic</entry>
303 <entry><option>-ddump-hi-diffs</option></entry>
304 <entry>Show the differences vs. the old interface</entry>
305 <entry>dynamic</entry>
309 <entry><option>-ddump-minimal-imports</option></entry>
310 <entry>Dump a minimal set of imports</entry>
311 <entry>dynamic</entry>
315 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
316 <entry>Read the interface in
317 <replaceable>file</replaceable> and dump it as text to
318 <literal>stdout</literal>.</entry>
319 <entry>static</entry>
328 <title>Recompilation checking (<xref linkend="recomp">)</title>
331 <tgroup cols=3 align=left colsep=1 rowsep=1>
336 <entry>Description</entry>
337 <entry>Static/Dynamic</entry>
338 <entry>Reverse</entry>
343 <entry><option>-no-recomp</option></entry>
344 <entry>Turn off recompilation checking</entry>
345 <entry>static</entry>
346 <entry><option>-recomp</option></entry>
354 <title>Interactive-mode options (<xref linkend="ghci-dot-files">)</title>
357 <tgroup cols=3 align=left colsep=1 rowsep=1>
361 <entry>Description</entry>
362 <entry>Static/Dynamic</entry>
363 <entry>Reverse</entry>
368 <entry><option>-ignore-dot-ghci</option></entry>
369 <entry>Disable reading of <filename>.ghci</filename> files</entry>
370 <entry>static</entry>
374 <entry><option>-read-dot-ghci</option></entry>
375 <entry>Enable reading of <filename>.ghci</filename> files</entry>
376 <entry>static</entry>
385 <title>Packages (<xref linkend="packages">)</title>
387 <tgroup cols=3 align=left colsep=1 rowsep=1>
391 <entry>Description</entry>
392 <entry>Static/Dynamic</entry>
393 <entry>Reverse</entry>
398 <entry><option>-package</option> <replaceable>name</replaceable></entry>
399 <entry>Use package <replaceable>name</replaceable></entry>
400 <entry>static</entry>
404 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
405 <entry>Load more packages from <replaceable>file</replaceable></entry>
406 <entry>static</entry>
410 <entry><option>-package-name</option> <replaceable>name</replaceable></entry>
411 <entry>Compile code for package <replaceable>name</replaceable></entry>
412 <entry>static</entry>
421 <title>Language options (<xref linkend="options-language">)</title>
424 <tgroup cols=3 align=left colsep=1 rowsep=1>
428 <entry>Description</entry>
429 <entry>Static/Dynamic</entry>
430 <entry>Reverse</entry>
435 <entry><option>-fallow-overlapping-instances</option></entry>
436 <entry>Enable overlapping instances</entry>
437 <entry>dynamic</entry>
438 <entry><option>-fno-allow-overlapping-instances</option></entry>
441 <entry><option>-farrows</option></entry>
442 <entry>Enable arrow notation extension</entry>
443 <entry>dynamic</entry>
444 <entry><option>-fno-arrows</option></entry>
447 <entry><option>-fallow-undecidable-instances</option></entry>
448 <entry>Enable undecidable instances</entry>
449 <entry>dynamic</entry>
450 <entry><option>-fno-allow-undecidable-instances</option></entry>
453 <entry><option>-fcontext-stack</option><replaceable>n</replaceable></entry>
454 <entry>set the limit for context reduction</entry>
455 <entry>dynamic</entry>
456 <entry><option>-</option></entry>
459 <entry><option>-ffi</option> or <option>-fffi</option></entry>
460 <entry>Enable foreign function interface (implied by
461 <option>-fglasgow-exts</option>)</entry>
462 <entry>dynamic</entry>
463 <entry><option>-fno-ffi</option></entry>
466 <entry><option>-fgenerics</option></entry>
467 <entry>Enable generics</entry>
468 <entry>dynamic</entry>
469 <entry><option>-fno-fgenerics</option></entry>
472 <entry><option>-fglasgow-exts</option></entry>
473 <entry>Enable most language extensions</entry>
474 <entry>dynamic</entry>
475 <entry><option>-fno-glasgow-exts</option></entry>
478 <entry><option>-fignore-asserts</option></entry>
479 <entry>Ignore assertions</entry>
480 <entry>dynamic</entry>
481 <entry><option>-fno-ignore-asserts</option></entry>
484 <entry><option>-fimplicit-params</option></entry>
485 <entry>Enable Implicit Parameters</entry>
486 <entry>dynamic</entry>
487 <entry><option>-fno-implicit-params</option></entry>
490 <entry><option>-firrefutable-tuples</option></entry>
491 <entry>Make tuple pattern matching irrefutable</entry>
492 <entry>dynamic</entry>
493 <entry><option>-fno-irrefutable-tuples</option></entry>
496 <entry><option>-fno-implicit-prelude</option></entry>
497 <entry>Don't implicitly <literal>import Prelude</literal></entry>
498 <entry>dynamic</entry>
502 <entry><option>-fno-monomorphism-restriction</option></entry>
503 <entry>Disable the monomorphism restriction</entry>
504 <entry>dynamic</entry>
505 <entry><option>-</option></entry>
508 <entry><option>-fth</option></entry>
509 <entry>Enable Template Haskell</entry>
510 <entry>dynamic</entry>
511 <entry><option>-fno-th</option></entry>
514 <entry><option>-fwith</option></entry>
515 <entry>Enable deprecated <literal>with</literal> keyword</entry>
516 <entry>dynamic</entry>
517 <entry><option>-fno-with</option></entry>
525 <title>Warnings (<xref linkend="options-sanity">)</title>
528 <tgroup cols=3 align=left colsep=1 rowsep=1>
532 <entry>Description</entry>
533 <entry>Static/Dynamic</entry>
534 <entry>Reverse</entry>
539 <entry><option>-W</option></entry>
540 <entry>enable normal warnings</entry>
541 <entry>dynamic</entry>
542 <entry><option>-w</option></entry>
545 <entry><option>-w</option></entry>
546 <entry>disable all warnings</entry>
547 <entry>dynamic</entry>
551 <entry><option>-Wall</option></entry>
552 <entry>enable all warnings</entry>
553 <entry>dynamic</entry>
554 <entry><option>-w</option></entry>
557 <entry><option>-Werror</option></entry>
558 <entry>make warnings fatal</entry>
559 <entry>dynamic</entry>
564 <entry><option>-fwarn-deprecations</option></entry>
565 <entry>warn about uses of functions & types that are deprecated</entry>
566 <entry>dynamic</entry>
567 <entry><option>-fno-warn-deprecations</option></entry>
571 <entry><option>-fwarn-duplicate-exports</option></entry>
572 <entry>warn when an entity is exported multiple times</entry>
573 <entry>dynamic</entry>
574 <entry><option>-fno-warn-duplicate-exports</option></entry>
578 <entry><option>-fwarn-hi-shadowing</option></entry>
579 <entry>warn when a <literal>.hi</literal> file in the
580 current directory shadows a library</entry>
581 <entry>dynamic</entry>
582 <entry><option>-fno-warn-hi-shadowing</option></entry>
586 <entry><option>-fwarn-incomplete-patterns</option></entry>
587 <entry>warn when a pattern match could fail</entry>
588 <entry>dynamic</entry>
589 <entry><option>-fno-warn-incomplete-patterns</option></entry>
593 <entry><option>-fwarn-misc</option></entry>
594 <entry>enable miscellaneous warnings</entry>
595 <entry>dynamic</entry>
596 <entry><option>-fno-warn-misc</option></entry>
600 <entry><option>-fwarn-missing-fields</option></entry>
601 <entry>warn when fields of a record are uninitialised</entry>
602 <entry>dynamic</entry>
603 <entry><option>-fno-warn-missing-fields</option></entry>
607 <entry><option>-fwarn-missing-methods</option></entry>
608 <entry>warn when class methods are undefined</entry>
609 <entry>dynamic</entry>
610 <entry><option>-fno-warn-missing-methods</option></entry>
614 <entry><option>-fwarn-missing-signatures</option></entry>
615 <entry>warn about top-level functions without signatures</entry>
616 <entry>dynamic</entry>
617 <entry><option>-fno-warn-missing-signatures</option></entry>
621 <entry><option>-fwarn-name-shadowing</option></entry>
622 <entry>warn when names are shadowed</entry>
623 <entry>dynamic</entry>
624 <entry><option>-fno-warn-name-shadowing</option></entry>
628 <entry><option>-fwarn-overlapping-patterns</option></entry>
629 <entry>warn about overlapping patterns</entry>
630 <entry>dynamic</entry>
631 <entry><option>-fno-warn-overlapping-patterns</option></entry>
635 <entry><option>-fwarn-simple-patterns</option></entry>
636 <entry>warn about lambda-patterns that can fail</entry>
637 <entry>dynamic</entry>
638 <entry><option>-fno-warn-simple-patterns</option></entry>
642 <entry><option>-fwarn-type-defaults</option></entry>
643 <entry>warn when defaulting happens</entry>
644 <entry>dynamic</entry>
645 <entry><option>-fno-warn-type-defaults</option></entry>
649 <entry><option>-fwarn-unused-binds</option></entry>
650 <entry>warn about bindings that are unused</entry>
651 <entry>dynamic</entry>
652 <entry><option>-fno-warn-unused-binds</option></entry>
656 <entry><option>-fwarn-unused-imports</option></entry>
657 <entry>warn about unnecessary imports</entry>
658 <entry>dynamic</entry>
659 <entry><option>-fno-warn-unused-imports</option></entry>
663 <entry><option>-fwarn-unused-matches</option></entry>
664 <entry>warn about variables in patterns that aren't used</entry>
665 <entry>dynamic</entry>
666 <entry><option>-fno-warn-unused-matches</option></entry>
675 <title>Optimisation levels (<xref linkend="options-optimise">)</title>
678 <tgroup cols=3 align=left colsep=1 rowsep=1>
682 <entry>Description</entry>
683 <entry>Static/Dynamic</entry>
684 <entry>Reverse</entry>
689 <entry><option>-O</option></entry>
690 <entry>Enable default optimisation (level 1)</entry>
691 <entry>static</entry>
692 <entry><option>-O0</option></entry>
695 <entry><option>-O</option><replaceable>n</replaceable></entry>
696 <entry>Set optimisation level <replaceable>n</replaceable></entry>
697 <entry>static</entry>
698 <entry><option>-O0</option></entry>
706 <title>Individual optimisations (<xref linkend="options-f">)</title>
709 <tgroup cols=3 align=left colsep=1 rowsep=1>
713 <entry>Description</entry>
714 <entry>Static/Dynamic</entry>
715 <entry>Reverse</entry>
720 <entry><option>-fcase-merge</option></entry>
721 <entry>Enable case-merging</entry>
722 <entry>static</entry>
723 <entry><option>-fno-case-merge</option></entry>
727 <entry><option>-fdicts-strict</option></entry>
728 <entry>Make dictionaries strict</entry>
729 <entry>dynamic</entry>
730 <entry><option>-fno-dicts-strict</option></entry>
734 <entry><option>-fdo-eta-reduction</option></entry>
735 <entry>Enable eta-reduction</entry>
736 <entry>static</entry>
737 <entry><option>-fno-do-eta-reduction</option></entry>
741 <entry><option>-fdo-lambda-eta-expansion</option></entry>
742 <entry>Enable lambda eta-reduction</entry>
743 <entry>static</entry>
744 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
748 <entry><option>-fexcess-precision</option></entry>
749 <entry>Enable excess intermediate precision</entry>
750 <entry>static</entry>
751 <entry><option>-fno-excess-precision</option></entry>
755 <entry><option>-frules-off</option></entry>
756 <entry>Switch off all rewrite rules (including rules
757 generated by automatic specialisation of overloaded functions)</entry>
758 <entry>static</entry>
759 <entry><option>-frules-off</option></entry>
763 <entry><option>-fignore-asserts</option></entry>
764 <entry>Ignore assertions in the source</entry>
765 <entry>static</entry>
766 <entry><option>-fno-ignore-asserts</option></entry>
770 <entry><option>-fignore-interface-pragmas</option></entry>
771 <entry>Ignore pragmas in interface files</entry>
772 <entry>static</entry>
773 <entry><option>-fno-ignore-interface-pragmas</option></entry>
777 <entry><option>-flet-no-escape</option></entry>
778 <entry>Enable let-no-escape optimisation</entry>
779 <entry>static</entry>
780 <entry><option>-fno-let-no-escape</option></entry>
784 <entry><option>-fliberate-case-threshold</option></entry>
785 <entry>Tweak the liberate-case optimisation (default: 10)</entry>
786 <entry>static</entry>
787 <entry><option>-fno-liberate-case-threshold</option></entry>
791 <entry><option>-fomit-interface-pragmas</option></entry>
792 <entry>Don't generate interface pragmas</entry>
793 <entry>static</entry>
794 <entry><option>-fno-omit-interface-pragmas</option></entry>
798 <entry><option>-fmax-worker-args</option></entry>
799 <entry>If a worker has that many arguments, none will be
800 unpacked anymore (default: 10)</entry>
801 <entry>static</entry>
806 <entry><option>-fmax-simplifier-iterations</option></entry>
807 <entry>Set the max iterations for the simplifier</entry>
808 <entry>static</entry>
813 <entry><option>-fno-cpr</option></entry>
814 <entry>Turn off CPR analysis</entry>
815 <entry>static</entry>
820 <entry><option>-fno-cse</option></entry>
821 <entry>Turn off common sub-expression</entry>
822 <entry>static</entry>
827 <entry><option>-fno-pre-inlining</option></entry>
828 <entry>Turn off pre-inlining</entry>
829 <entry>static</entry>
834 <entry><option>-fno-strictness</option></entry>
835 <entry>Turn off strictness analysis</entry>
836 <entry>static</entry>
841 <entry><option>-fnumbers-strict</option></entry>
842 <entry>Make numbers strict</entry>
843 <entry>dynamic</entry>
844 <entry><option>-fno-numbers-strict</option></entry>
848 <entry><option>-funbox-strict-fields</option></entry>
849 <entry>Flatten strict constructor fields</entry>
850 <entry>static</entry>
851 <entry><option>-fno-unbox-strict-fields</option></entry>
855 <entry><option>-funfolding-creation-threshold</option></entry>
856 <entry>Tweak unfolding settings</entry>
857 <entry>static</entry>
858 <entry><option>-fno-unfolding-creation-threshold</option></entry>
862 <entry><option>-funfolding-fun-discount</option></entry>
863 <entry>Tweak unfolding settings</entry>
864 <entry>static</entry>
865 <entry><option>-fno-unfolding-fun-discount</option></entry>
869 <entry><option>-funfolding-keeness-factor</option></entry>
870 <entry>Tweak unfolding settings</entry>
871 <entry>static</entry>
872 <entry><option>-fno-unfolding-keeness-factor</option></entry>
876 <entry><option>-funfolding-update-in-place</option></entry>
877 <entry>Tweak unfolding settings</entry>
878 <entry>static</entry>
879 <entry><option>-fno-unfolding-update-in-place</option></entry>
883 <entry><option>-funfolding-use-threshold</option></entry>
884 <entry>Tweak unfolding settings</entry>
885 <entry>static</entry>
886 <entry><option>-fno-unfolding-use-threshold</option></entry>
890 <entry><option>-fusagesp</option></entry>
891 <entry>Turn on UsageSP analysis</entry>
892 <entry>static</entry>
893 <entry><option>-fno-usagesp</option></entry>
901 <title>Profiling options (<xref linkend="profiling">)</title>
904 <tgroup cols=3 align=left colsep=1 rowsep=1>
908 <entry>Description</entry>
909 <entry>Static/Dynamic</entry>
910 <entry>Reverse</entry>
915 <entry><option>-auto</option></entry>
916 <entry>Auto-add <literal>_scc_</literal>s to all
917 exported functions</entry>
918 <entry>static</entry>
919 <entry><option>-no-auto</option></entry>
922 <entry><option>-auto-all</option></entry>
923 <entry>Auto-add <literal>_scc_</literal>s to all
924 top-level functions</entry>
925 <entry>static</entry>
926 <entry><option>-no-auto-all</option></entry>
929 <entry><option>-auto-dicts</option></entry>
930 <entry>Auto-add <literal>_scc_</literal>s to all dictionaries</entry>
931 <entry>static</entry>
932 <entry><option>-no-auto-dicts</option></entry>
935 <entry><option>-caf-all</option></entry>
936 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
937 <entry>static</entry>
938 <entry><option>-no-caf-all</option></entry>
941 <entry><option>-prof</option></entry>
942 <entry>Turn on profiling</entry>
943 <entry>static</entry>
947 <entry><option>-ticky</option></entry>
948 <entry>Turn on ticky-ticky profiling</entry>
949 <entry>static</entry>
958 <title>Parallelism options (<xref linkend="sec-using-parallel">)</title>
961 <tgroup cols=3 align=left colsep=1 rowsep=1>
965 <entry>Description</entry>
966 <entry>Static/Dynamic</entry>
967 <entry>Reverse</entry>
972 <entry><option>-gransim</option></entry>
973 <entry>Enable GRANSIM</entry>
974 <entry>static</entry>
978 <entry><option>-parallel</option></entry>
979 <entry>Enable Parallel Haskell</entry>
980 <entry>static</entry>
984 <entry><option>-smp</option></entry>
985 <entry>Enable SMP support</entry>
986 <entry>static</entry>
995 <title>C pre-processor options (<xref linkend="c-pre-processor">)</title>
998 <tgroup cols=3 align=left colsep=1 rowsep=1>
1002 <entry>Description</entry>
1003 <entry>Static/Dynamic</entry>
1004 <entry>Reverse</entry>
1009 <entry><option>-cpp</option></entry>
1010 <entry>Run the C pre-processor on Haskell source files</entry>
1011 <entry>dynamic</entry>
1015 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1016 <entry>Define a symbol in the C pre-processor</entry>
1017 <entry>dynamic</entry>
1018 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1021 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1022 <entry>Undefine a symbol in the C pre-processor</entry>
1023 <entry>dynamic</entry>
1027 <entry><option>-I</option><replaceable>dir</replaceable></entry>
1028 <entry>Add <replaceable>dir</replaceable> to the
1029 directory search list for <literal>#include</literal> files</entry>
1030 <entry>static</entry>
1039 <title>C compiler options (<xref linkend="options-C-compiler">)</title>
1041 <tgroup cols=3 align=left colsep=1 rowsep=1>
1045 <entry>Description</entry>
1046 <entry>Static/Dynamic</entry>
1047 <entry>Reverse</entry>
1052 <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1053 <entry>Include <replaceable>file</replaceable> when
1054 compiling the <filename>.hc</filename> file</entry>
1055 <entry>dynamic</entry>
1064 <title>Code generation options (<xref linkend="options-codegen">)</title>
1067 <tgroup cols=3 align=left colsep=1 rowsep=1>
1071 <entry>Description</entry>
1072 <entry>Static/Dynamic</entry>
1073 <entry>Reverse</entry>
1078 <entry><option>-fasm</option></entry>
1079 <entry>Use the native code generator</entry>
1080 <entry>dynamic</entry>
1081 <entry>-fvia-C</entry>
1084 <entry><option>-fvia-C</option></entry>
1085 <entry>Compile via C</entry>
1086 <entry>dynamic</entry>
1087 <entry>-fasm</entry>
1090 <entry><option>-fno-code</option></entry>
1091 <entry>Omit code generation</entry>
1092 <entry>static</entry>
1101 <title>Linking options (<xref linkend="options-linker">)</title>
1104 <tgroup cols=3 align=left colsep=1 rowsep=1>
1108 <entry>Description</entry>
1109 <entry>Static/Dynamic</entry>
1110 <entry>Reverse</entry>
1115 <entry><option>-dynamic</option></entry>
1116 <entry>Use dynamic Haskell libraries (if available)</entry>
1117 <entry>static</entry>
1121 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1122 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1123 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1124 <entry>static</entry>
1128 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1129 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1130 directories searched for frameworks.
1131 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1132 <entry>static</entry>
1136 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1137 <entry>Link in library <replaceable>lib</replaceable></entry>
1138 <entry>static</entry>
1142 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1143 <entry>Add <replaceable>dir</replaceable> to the list of
1144 directories searched for libraries</entry>
1145 <entry>static</entry>
1149 <entry><option>-main-is</option></entry>
1150 <entry>Set main function</entry>
1151 <entry>static</entry>
1155 <entry><option>-no-hs-main</option></entry>
1156 <entry>Don't asssume this program contains <literal>main</literal></entry>
1157 <entry>static</entry>
1161 <entry><option>-no-link</option></entry>
1162 <entry>Omit linking</entry>
1163 <entry>static</entry>
1167 <entry><option>-package</option> <replaceable>name</replaceable></entry>
1168 <entry>Link in package <replaceable>name</replaceable></entry>
1169 <entry>static</entry>
1173 <entry><option>-split-objs</option></entry>
1174 <entry>Split objects (for libraries)</entry>
1175 <entry>static</entry>
1179 <entry><option>-static</option></entry>
1180 <entry>Use static Haskell libraries</entry>
1181 <entry>static</entry>
1190 <title>Replacing phases (<xref linkend="replacing-phases">)</title>
1193 <tgroup cols=3 align=left colsep=1 rowsep=1>
1197 <entry>Description</entry>
1198 <entry>Static/Dynamic</entry>
1199 <entry>Reverse</entry>
1204 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1205 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1206 <entry>static</entry>
1210 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1211 <entry>Use <replaceable>cmd</replaceable> as the C
1212 pre-processor (with <option>-cpp</option> only)</entry>
1213 <entry>static</entry> <entry>-</entry>
1216 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1217 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1218 <entry>static</entry>
1222 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1223 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1224 <entry>static</entry>
1228 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1229 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1230 <entry>static</entry>
1234 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1235 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1236 <entry>static</entry>
1240 <entry><option>-pgmdep</option> <replaceable>cmd</replaceable></entry>
1241 <entry>Use <replaceable>cmd</replaceable> as the dependency generator</entry>
1242 <entry>static</entry>
1246 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1247 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1248 (with <option>-F</option> only)</entry>
1249 <entry>static</entry>
1255 <indexterm><primary><option>-pgmL</option></primary></indexterm>
1256 <indexterm><primary><option>-pgmP</option></primary></indexterm>
1257 <indexterm><primary><option>-pgmc</option></primary></indexterm>
1258 <indexterm><primary><option>-pgma</option></primary></indexterm>
1259 <indexterm><primary><option>-pgml</option></primary></indexterm>
1260 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1261 <indexterm><primary><option>-pgmdep</option></primary></indexterm>
1262 <indexterm><primary><option>-pgmF</option></primary></indexterm>
1267 <title>Forcing options to particular phases (<xref linkend="forcing-options-through">)</title>
1270 <tgroup cols=3 align=left colsep=1 rowsep=1>
1274 <entry>Description</entry>
1275 <entry>Static/Dynamic</entry>
1276 <entry>Reverse</entry>
1281 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1282 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1283 <entry>dynamic</entry>
1287 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1288 <entry>pass <replaceable>option</replaceable> to cpp (with
1289 <option>-cpp</option> only)</entry>
1290 <entry>dynamic</entry>
1294 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1295 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1296 <entry>dynamic</entry>
1300 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1301 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1302 <entry>dynamic</entry>
1306 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1307 <entry>pass <replaceable>option</replaceable> to the linker</entry>
1308 <entry>static</entry>
1312 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1313 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1314 <entry>static</entry>
1318 <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1319 <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1320 <entry>static</entry>
1329 <title>Platform-specific options (<xref linkend="options-platform">)</title>
1332 <tgroup cols=3 align=left colsep=1 rowsep=1>
1336 <entry>Description</entry>
1337 <entry>Static/Dynamic</entry>
1338 <entry>Reverse</entry>
1343 <entry><option>-mv8</option></entry>
1344 <entry>(SPARC only) enable version 8 support</entry>
1345 <entry>static</entry>
1349 <entry><option>-monly-[32]-regs</option></entry>
1350 <entry>(x86 only) give some registers back to the C compiler</entry>
1351 <entry>dynamic</entry>
1361 <title>External core file options (<xref linkend="ext-core">)</title>
1364 <tgroup cols=3 align=left colsep=1 rowsep=1>
1368 <entry>Description</entry>
1369 <entry>Static/Dynamic</entry>
1370 <entry>Reverse</entry>
1375 <entry><option>-fext-core</option></entry>
1376 <entry>Generate <filename>.hcr</filename> external Core files</entry>
1377 <entry>static</entry>
1387 <title>Compiler debugging options (<xref linkend="options-debugging">)</title>
1390 <tgroup cols=3 align=left colsep=1 rowsep=1>
1394 <entry>Description</entry>
1395 <entry>Static/Dynamic</entry>
1396 <entry>Reverse</entry>
1401 <entry><option>-dcore-lint</option></entry>
1402 <entry>Turn on internal sanity checking</entry>
1403 <entry>dynamic</entry>
1407 <entry><option>-ddump-absC</option></entry>
1408 <entry>Dump abstract C</entry>
1409 <entry>dynamic</entry>
1413 <entry><option>-ddump-asm</option></entry>
1414 <entry>Dump assembly</entry>
1415 <entry>dynamic</entry>
1419 <entry><option>-ddump-bcos</option></entry>
1420 <entry>Dump interpreter byte code</entry>
1421 <entry>dynamic</entry>
1425 <entry><option>-ddump-cpranal</option></entry>
1426 <entry>Dump output from CPR analysis</entry>
1427 <entry>dynamic</entry>
1431 <entry><option>-ddump-cse</option></entry>
1432 <entry>Dump CSE output</entry>
1433 <entry>dynamic</entry>
1437 <entry><option>-ddump-deriv</option></entry>
1438 <entry>Dump deriving output</entry>
1439 <entry>dynamic</entry>
1443 <entry><option>-ddump-ds</option></entry>
1444 <entry>Dump desugarer output</entry>
1445 <entry>dynamic</entry>
1449 <entry><option>-ddump-flatC</option></entry>
1450 <entry>Dump “flat” C</entry>
1451 <entry>dynamic</entry>
1455 <entry><option>-ddump-foreign</option></entry>
1456 <entry>Dump <literal>foreign export</literal> stubs</entry>
1457 <entry>dynamic</entry>
1461 <entry><option>-ddump-inlinings</option></entry>
1462 <entry>Dump inlining info</entry>
1463 <entry>dynamic</entry>
1467 <entry><option>-ddump-occur-anal</option></entry>
1468 <entry>Dump occurrence analysis output</entry>
1469 <entry>dynamic</entry>
1473 <entry><option>-ddump-parsed</option></entry>
1474 <entry>Dump parse tree</entry>
1475 <entry>dynamic</entry>
1479 <entry><option>-ddump-realC</option></entry>
1480 <entry>Dump “real” C</entry>
1481 <entry>dynamic</entry>
1485 <entry><option>-ddump-rn</option></entry>
1486 <entry>Dump renamer output</entry>
1487 <entry>dynamic</entry>
1491 <entry><option>-ddump-rules</option></entry>
1492 <entry>Dump rules</entry>
1493 <entry>dynamic</entry>
1497 <entry><option>-ddump-sat</option></entry>
1498 <entry>Dump saturated output</entry>
1499 <entry>dynamic</entry>
1503 <entry><option>-ddump-simpl</option></entry>
1504 <entry>Dump final simplifier output</entry>
1505 <entry>dynamic</entry>
1509 <entry><option>-ddump-simpl-iterations</option></entry>
1510 <entry>Dump output from each simplifier iteration</entry>
1511 <entry>dynamic</entry>
1515 <entry><option>-ddump-spec</option></entry>
1516 <entry>Dump specialiser output</entry>
1517 <entry>dynamic</entry>
1521 <entry><option>-ddump-stg</option></entry>
1522 <entry>Dump final STG</entry>
1523 <entry>dynamic</entry>
1527 <entry><option>-ddump-stranal</option></entry>
1528 <entry>Dump strictness analyser output</entry>
1529 <entry>dynamic</entry>
1533 <entry><option>-ddump-tc</option></entry>
1534 <entry>Dump typechecker output</entry>
1535 <entry>dynamic</entry>
1539 <entry><option>-ddump-types</option></entry>
1540 <entry>Dump type signatures</entry>
1541 <entry>dynamic</entry>
1545 <entry><option>-ddump-usagesp</option></entry>
1546 <entry>Dump UsageSP analysis output</entry>
1547 <entry>dynamic</entry>
1551 <entry><option>-ddump-worker-wrapper</option></entry>
1552 <entry>Dump worker-wrapper output</entry>
1553 <entry>dynamic</entry>
1557 <entry><option>-ddump-rn-trace</option></entry>
1558 <entry>Trace renamer</entry>
1559 <entry>dynamic</entry>
1563 <entry><option>-ddump-rn-stats</option></entry>
1564 <entry>Renamer stats</entry>
1565 <entry>dynamic</entry>
1569 <entry><option>-ddump-stix</option></entry>
1570 <entry>Native code generator intermediate form</entry>
1571 <entry>dynamic</entry>
1575 <entry><option>-ddump-simpl-stats</option></entry>
1576 <entry>Dump simplifier stats</entry>
1577 <entry>dynamic</entry>
1581 <entry><option>-dppr-debug</option></entry>
1582 <entry>Turn on debug printing (more verbose)</entry>
1583 <entry>static</entry>
1587 <entry><option>-dppr-noprags</option></entry>
1588 <entry>Don't output pragma info in dumps</entry>
1589 <entry>static</entry>
1593 <entry><option>-dppr-user-length</option></entry>
1594 <entry>Set the depth for printing expressions in error msgs</entry>
1595 <entry>static</entry>
1599 <entry><option>-dsource-stats</option></entry>
1600 <entry>Dump haskell source stats</entry>
1601 <entry>dynamic</entry>
1605 <entry><option>-dstg-lint</option></entry>
1606 <entry>STG pass sanity checking</entry>
1607 <entry>dynamic</entry>
1611 <entry><option>-dstg-stats</option></entry>
1612 <entry>Dump STG stats</entry>
1613 <entry>dynamic</entry>
1617 <entry><option>-dusagesp-lint</option></entry>
1618 <entry>UsageSP sanity checker</entry>
1619 <entry>dynamic</entry>
1623 <entry><option>-dverbose-core2core</option></entry>
1624 <entry>Show output from each core-to-core pass</entry>
1625 <entry>dynamic</entry>
1629 <entry><option>-dverbose-stg2stg</option></entry>
1630 <entry>Show output from each STG-to-STG pass</entry>
1631 <entry>dynamic</entry>
1635 <entry><option>-unreg</option></entry>
1636 <entry>Enable unregisterised compilation</entry>
1637 <entry>static</entry>
1646 <title>Misc compiler options</title>
1649 <tgroup cols=3 align=left colsep=1 rowsep=1>
1653 <entry>Description</entry>
1654 <entry>Static/Dynamic</entry>
1655 <entry>Reverse</entry>
1660 <entry><option>-femit-extern-decls</option></entry>
1662 <entry>static</entry>
1666 <entry><option>-fglobalise-toplev-names</option></entry>
1667 <entry>Make all top-level names global (for <option>-split-objs</option>)</entry>
1668 <entry>static</entry>
1672 <entry><option>-fno-hi-version-check</option></entry>
1673 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1674 <entry>static</entry>
1678 <entry><option>-dno-black-holing</option></entry>
1679 <entry>Turn off black holing (probably doesn't work)</entry>
1680 <entry>static</entry>
1684 <entry><option>-fno-method-sharing</option></entry>
1685 <entry>Don't share specialisations of overloaded functions</entry>
1686 <entry>static</entry>
1690 <entry><option>-fno-prune-decls</option></entry>
1691 <entry>Renamer: don't prune declarations</entry>
1692 <entry>static</entry>
1696 <entry><option>-fhistory-size</option></entry>
1697 <entry>Set simplification history size</entry>
1698 <entry>static</entry>
1702 <entry><option>-funregisterised</option></entry>
1703 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1704 <entry>static</entry>
1708 <entry><option>-fno-asm-mangling</option></entry>
1709 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1710 <entry>static</entry>
1724 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
1725 , ( "Rghc-timing" , NoArg (enableTimingStats) )
1731 ;;; Local Variables: ***
1733 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter") ***