1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="flag-reference">
3 <title>Flag reference</title>
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
11 <title>Help and verbosity options (<xref linkend="options-help"/>)</title>
14 <tgroup cols="3" align="left" colsep="1" rowsep="1">
18 <entry>Description</entry>
19 <entry>Static/Dynamic</entry>
20 <entry>Reverse</entry>
25 <entry><option>-?</option></entry>
31 <entry><option>-help</option></entry>
37 <entry><option>-v</option></entry>
38 <entry>verbose mode (equivalent to <option>-v3</option>)</entry>
39 <entry>dynamic</entry>
43 <entry><option>-v</option><replaceable>n</replaceable></entry>
44 <entry>set verbosity level</entry>
45 <entry>dynamic</entry>
49 <entry><option>-V</option></entry>
50 <entry>display GHC version</entry>
55 <entry><option>––version</option></entry>
56 <entry>display GHC version</entry>
61 <entry><option>––numeric-version</option></entry>
62 <entry>display GHC version (numeric only)</entry>
67 <entry><option>––print-libdir</option></entry>
68 <entry>display GHC library directory</entry>
73 <entry><option>-ferror-spans</option></entry>
74 <entry>output full span in error messages</entry>
84 <title>Which phases to run (<xref linkend="options-order"/>)</title>
87 <tgroup cols="3" align="left" colsep="1" rowsep="1">
91 <entry>Description</entry>
92 <entry>Static/Dynamic</entry>
93 <entry>Reverse</entry>
98 <entry><option>-E</option></entry>
99 <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
100 <entry>static</entry>
104 <entry><option>-C</option></entry>
105 <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
106 <entry>static</entry>
110 <entry><option>-S</option></entry>
111 <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
112 <entry>static</entry>
116 <entry><option>-c</option></entry>
117 <entry>Stop after compiling to object code (<literal>.o</literal> file)</entry>
118 <entry>static</entry>
127 <title>Redirecting output (<xref linkend="options-output"/>)</title>
130 <tgroup cols="3" align="left" colsep="1" rowsep="1">
134 <entry>Description</entry>
135 <entry>Static/Dynamic</entry>
136 <entry>Reverse</entry>
141 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
142 <entry>set the suffix to use for intermediate C files</entry>
143 <entry>static</entry>
147 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
148 <entry>set directory for interface files</entry>
149 <entry>static</entry>
153 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
154 <entry>set the suffix to use for interface files</entry>
155 <entry>static</entry>
159 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
160 <entry>set output filename</entry>
161 <entry>static</entry>
165 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
166 <entry>set output directory</entry>
167 <entry>static</entry>
171 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
172 <entry>set the filename in which to put the interface</entry>
173 <entry>static</entry>
177 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
178 <entry>set the output file suffix</entry>
179 <entry>static</entry>
188 <title>Keeping intermediate files (<xref linkend="keeping-intermediates"/>)</title>
191 <tgroup cols="3" align="left" colsep="1" rowsep="1">
195 <entry>Description</entry>
196 <entry>Static/Dynamic</entry>
197 <entry>Reverse</entry>
202 <entry><option>-keep-hc-file</option></entry>
203 <entry>retain intermediate <literal>.hc</literal> files</entry>
204 <entry>static</entry>
208 <entry><option>-keep-s-file</option></entry>
209 <entry>retain intermediate <literal>.s</literal> files</entry>
210 <entry>static</entry>
214 <entry><option>-keep-raw-s-file</option></entry>
215 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
216 <entry>static</entry>
220 <entry><option>-keep-tmp-files</option></entry>
221 <entry>retain all intermediate temporary files</entry>
222 <entry>static</entry>
231 <title>Temporary files (<xref linkend="temp-files"/>)</title>
234 <tgroup cols="3" align="left" colsep="1" rowsep="1">
238 <entry>Description</entry>
239 <entry>Static/Dynamic</entry>
240 <entry>Reverse</entry>
245 <entry><option>-tmpdir</option></entry>
246 <entry>set the directory for temporary files</entry>
247 <entry>static</entry>
256 <title>Finding imports (<xref linkend="search-path"/>)</title>
259 <tgroup cols="3" align="left" colsep="1" rowsep="1">
264 <entry>Description</entry>
265 <entry>Static/Dynamic</entry>
266 <entry>Reverse</entry>
271 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
272 <entry>add <replaceable>dir</replaceable>,
273 <replaceable>dir2</replaceable>, etc. to import path</entry>
274 <entry>static</entry>
278 <entry><option>-i</option></entry>
279 <entry>Empty the import directory list</entry>
280 <entry>static</entry>
289 <title>Interface file options (<xref linkend="hi-options"/>)</title>
292 <tgroup cols="3" align="left" colsep="1" rowsep="1">
297 <entry>Description</entry>
298 <entry>Static/Dynamic</entry>
299 <entry>Reverse</entry>
304 <entry><option>-ddump-hi</option></entry>
305 <entry>Dump the new interface to stdout</entry>
306 <entry>dynamic</entry>
310 <entry><option>-ddump-hi-diffs</option></entry>
311 <entry>Show the differences vs. the old interface</entry>
312 <entry>dynamic</entry>
316 <entry><option>-ddump-minimal-imports</option></entry>
317 <entry>Dump a minimal set of imports</entry>
318 <entry>dynamic</entry>
322 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
323 <entry>Read the interface in
324 <replaceable>file</replaceable> and dump it as text to
325 <literal>stdout</literal>.</entry>
326 <entry>static</entry>
335 <title>Recompilation checking (<xref linkend="recomp"/>)</title>
338 <tgroup cols="3" align="left" colsep="1" rowsep="1">
343 <entry>Description</entry>
344 <entry>Static/Dynamic</entry>
345 <entry>Reverse</entry>
350 <entry><option>-no-recomp</option></entry>
351 <entry>Turn off recompilation checking</entry>
352 <entry>static</entry>
353 <entry><option>-recomp</option></entry>
361 <title>Interactive-mode options (<xref linkend="ghci-dot-files"/>)</title>
364 <tgroup cols="3" align="left" colsep="1" rowsep="1">
368 <entry>Description</entry>
369 <entry>Static/Dynamic</entry>
370 <entry>Reverse</entry>
375 <entry><option>-ignore-dot-ghci</option></entry>
376 <entry>Disable reading of <filename>.ghci</filename> files</entry>
377 <entry>static</entry>
381 <entry><option>-read-dot-ghci</option></entry>
382 <entry>Enable reading of <filename>.ghci</filename> files</entry>
383 <entry>static</entry>
392 <title>Packages (<xref linkend="packages"/>)</title>
394 <tgroup cols="3" align="left" colsep="1" rowsep="1">
398 <entry>Description</entry>
399 <entry>Static/Dynamic</entry>
400 <entry>Reverse</entry>
405 <entry><option>-package</option> <replaceable>name</replaceable></entry>
406 <entry>Use package <replaceable>name</replaceable></entry>
407 <entry>static</entry>
411 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
412 <entry>Load more packages from <replaceable>file</replaceable></entry>
413 <entry>static</entry>
417 <entry><option>-package-name</option> <replaceable>name</replaceable></entry>
418 <entry>Compile code for package <replaceable>name</replaceable></entry>
419 <entry>static</entry>
428 <title>Language options (<xref linkend="options-language"/>)</title>
431 <tgroup cols="3" align="left" colsep="1" rowsep="1">
435 <entry>Description</entry>
436 <entry>Static/Dynamic</entry>
437 <entry>Reverse</entry>
442 <entry><option>-fallow-overlapping-instances</option></entry>
443 <entry>Enable overlapping instances</entry>
444 <entry>dynamic</entry>
445 <entry><option>-fno-allow-overlapping-instances</option></entry>
448 <entry><option>-fallow-undecidable-instances</option></entry>
449 <entry>Enable undecidable instances</entry>
450 <entry>dynamic</entry>
451 <entry><option>-fno-allow-undecidable-instances</option></entry>
454 <entry><option>-fallow-incoherent-instances</option></entry>
455 <entry>Enable incoherent instances</entry>
456 <entry>dynamic</entry>
457 <entry><option>-fno-allow-incoherent-instances</option></entry>
460 <entry><option>-farrows</option></entry>
461 <entry>Enable arrow notation extension</entry>
462 <entry>dynamic</entry>
463 <entry><option>-fno-arrows</option></entry>
466 <entry><option>-fcontext-stack</option><replaceable>n</replaceable></entry>
467 <entry>set the limit for context reduction</entry>
468 <entry>static</entry>
469 <entry><option>-</option></entry>
472 <entry><option>-ffi</option> or <option>-fffi</option></entry>
473 <entry>Enable foreign function interface (implied by
474 <option>-fglasgow-exts</option>)</entry>
475 <entry>dynamic</entry>
476 <entry><option>-fno-ffi</option></entry>
479 <entry><option>-fgenerics</option></entry>
480 <entry>Enable generics</entry>
481 <entry>dynamic</entry>
482 <entry><option>-fno-fgenerics</option></entry>
485 <entry><option>-fglasgow-exts</option></entry>
486 <entry>Enable most language extensions</entry>
487 <entry>dynamic</entry>
488 <entry><option>-fno-glasgow-exts</option></entry>
491 <entry><option>-fignore-asserts</option></entry>
492 <entry>Ignore assertions</entry>
493 <entry>dynamic</entry>
494 <entry><option>-fno-ignore-asserts</option></entry>
497 <entry><option>-fimplicit-params</option></entry>
498 <entry>Enable Implicit Parameters.
499 Implied by <option>-fglasgow-exts</option>.</entry>
500 <entry>dynamic</entry>
501 <entry><option>-fno-implicit-params</option></entry>
504 <entry><option>-firrefutable-tuples</option></entry>
505 <entry>Make tuple pattern matching irrefutable</entry>
506 <entry>dynamic</entry>
507 <entry><option>-fno-irrefutable-tuples</option></entry>
510 <entry><option>-fno-implicit-prelude</option></entry>
511 <entry>Don't implicitly <literal>import Prelude</literal></entry>
512 <entry>dynamic</entry>
513 <entry><option>-fimplicit-prelude</option></entry>
516 <entry><option>-fno-monomorphism-restriction</option></entry>
517 <entry>Disable the monomorphism restriction</entry>
518 <entry>dynamic</entry>
519 <entry><option>-fmonomorphism-restriction</option></entry>
522 <entry><option>-fscoped-type-variables</option></entry>
523 <entry>Enable lexically-scoped type variables.
524 Implied by <option>-fglasgow-exts</option>.</entry>
525 <entry>dynamic</entry>
526 <entry><option>-fno-scoped-type-variables</option></entry>
529 <entry><option>-fth</option></entry>
530 <entry>Enable Template Haskell.
531 Implied by <option>-fglasgow-exts</option>.</entry>
532 <entry>dynamic</entry>
533 <entry><option>-fno-th</option></entry>
541 <title>Warnings (<xref linkend="options-sanity"/>)</title>
544 <tgroup cols="3" align="left" colsep="1" rowsep="1">
548 <entry>Description</entry>
549 <entry>Static/Dynamic</entry>
550 <entry>Reverse</entry>
555 <entry><option>-W</option></entry>
556 <entry>enable normal warnings</entry>
557 <entry>dynamic</entry>
558 <entry><option>-w</option></entry>
561 <entry><option>-w</option></entry>
562 <entry>disable all warnings</entry>
563 <entry>dynamic</entry>
567 <entry><option>-Wall</option></entry>
568 <entry>enable all warnings</entry>
569 <entry>dynamic</entry>
570 <entry><option>-w</option></entry>
573 <entry><option>-Werror</option></entry>
574 <entry>make warnings fatal</entry>
575 <entry>dynamic</entry>
580 <entry><option>-fwarn-deprecations</option></entry>
581 <entry>warn about uses of functions & types that are deprecated</entry>
582 <entry>dynamic</entry>
583 <entry><option>-fno-warn-deprecations</option></entry>
587 <entry><option>-fwarn-duplicate-exports</option></entry>
588 <entry>warn when an entity is exported multiple times</entry>
589 <entry>dynamic</entry>
590 <entry><option>-fno-warn-duplicate-exports</option></entry>
594 <entry><option>-fwarn-hi-shadowing</option></entry>
595 <entry>warn when a <literal>.hi</literal> file in the
596 current directory shadows a library</entry>
597 <entry>dynamic</entry>
598 <entry><option>-fno-warn-hi-shadowing</option></entry>
602 <entry><option>-fwarn-incomplete-patterns</option></entry>
603 <entry>warn when a pattern match could fail</entry>
604 <entry>dynamic</entry>
605 <entry><option>-fno-warn-incomplete-patterns</option></entry>
609 <entry><option>-fwarn-incomplete-record-updates</option></entry>
610 <entry>warn when a record update could fail</entry>
611 <entry>dynamic</entry>
612 <entry><option>-fno-warn-incomplete-record-updates</option></entry>
616 <entry><option>-fwarn-misc</option></entry>
617 <entry>enable miscellaneous warnings</entry>
618 <entry>dynamic</entry>
619 <entry><option>-fno-warn-misc</option></entry>
623 <entry><option>-fwarn-missing-fields</option></entry>
624 <entry>warn when fields of a record are uninitialised</entry>
625 <entry>dynamic</entry>
626 <entry><option>-fno-warn-missing-fields</option></entry>
630 <entry><option>-fwarn-missing-methods</option></entry>
631 <entry>warn when class methods are undefined</entry>
632 <entry>dynamic</entry>
633 <entry><option>-fno-warn-missing-methods</option></entry>
637 <entry><option>-fwarn-missing-signatures</option></entry>
638 <entry>warn about top-level functions without signatures</entry>
639 <entry>dynamic</entry>
640 <entry><option>-fno-warn-missing-signatures</option></entry>
644 <entry><option>-fwarn-name-shadowing</option></entry>
645 <entry>warn when names are shadowed</entry>
646 <entry>dynamic</entry>
647 <entry><option>-fno-warn-name-shadowing</option></entry>
651 <entry><option>-fwarn-oprhans</option></entry>
652 <entry>warn when the module contains "orphan" instance declarations
653 or rewrite rules</entry>
654 <entry>dynamic</entry>
655 <entry><option>-fno-warn-orphans</option></entry>
659 <entry><option>-fwarn-overlapping-patterns</option></entry>
660 <entry>warn about overlapping patterns</entry>
661 <entry>dynamic</entry>
662 <entry><option>-fno-warn-overlapping-patterns</option></entry>
666 <entry><option>-fwarn-simple-patterns</option></entry>
667 <entry>warn about lambda-patterns that can fail</entry>
668 <entry>dynamic</entry>
669 <entry><option>-fno-warn-simple-patterns</option></entry>
673 <entry><option>-fwarn-type-defaults</option></entry>
674 <entry>warn when defaulting happens</entry>
675 <entry>dynamic</entry>
676 <entry><option>-fno-warn-type-defaults</option></entry>
680 <entry><option>-fwarn-unused-binds</option></entry>
681 <entry>warn about bindings that are unused</entry>
682 <entry>dynamic</entry>
683 <entry><option>-fno-warn-unused-binds</option></entry>
687 <entry><option>-fwarn-unused-imports</option></entry>
688 <entry>warn about unnecessary imports</entry>
689 <entry>dynamic</entry>
690 <entry><option>-fno-warn-unused-imports</option></entry>
694 <entry><option>-fwarn-unused-matches</option></entry>
695 <entry>warn about variables in patterns that aren't used</entry>
696 <entry>dynamic</entry>
697 <entry><option>-fno-warn-unused-matches</option></entry>
706 <title>Optimisation levels (<xref linkend="options-optimise"/>)</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>-O</option></entry>
721 <entry>Enable default optimisation (level 1)</entry>
722 <entry>dynamic</entry>
723 <entry><option>-O0</option></entry>
726 <entry><option>-O</option><replaceable>n</replaceable></entry>
727 <entry>Set optimisation level <replaceable>n</replaceable></entry>
728 <entry>dynamic</entry>
729 <entry><option>-O0</option></entry>
737 <title>Individual optimisations (<xref linkend="options-f"/>)</title>
740 <tgroup cols="3" align="left" colsep="1" rowsep="1">
744 <entry>Description</entry>
745 <entry>Static/Dynamic</entry>
746 <entry>Reverse</entry>
751 <entry><option>-fcase-merge</option></entry>
752 <entry>Enable case-merging</entry>
753 <entry>dynamic</entry>
754 <entry><option>-fno-case-merge</option></entry>
758 <entry><option>-fdicts-strict</option></entry>
759 <entry>Make dictionaries strict</entry>
760 <entry>static</entry>
761 <entry><option>-fno-dicts-strict</option></entry>
765 <entry><option>-fdo-eta-reduction</option></entry>
766 <entry>Enable eta-reduction</entry>
767 <entry>dynamic</entry>
768 <entry><option>-fno-do-eta-reduction</option></entry>
772 <entry><option>-fdo-lambda-eta-expansion</option></entry>
773 <entry>Enable lambda eta-reduction</entry>
774 <entry>dynamic</entry>
775 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
779 <entry><option>-fexcess-precision</option></entry>
780 <entry>Enable excess intermediate precision</entry>
781 <entry>static</entry>
782 <entry><option>-fno-excess-precision</option></entry>
786 <entry><option>-frules-off</option></entry>
787 <entry>Switch off all rewrite rules (including rules
788 generated by automatic specialisation of overloaded functions)</entry>
789 <entry>static</entry>
790 <entry><option>-frules-off</option></entry>
794 <entry><option>-fignore-asserts</option></entry>
795 <entry>Ignore assertions in the source</entry>
796 <entry>static</entry>
797 <entry><option>-fno-ignore-asserts</option></entry>
801 <entry><option>-fignore-interface-pragmas</option></entry>
802 <entry>Ignore pragmas in interface files</entry>
803 <entry>static</entry>
804 <entry><option>-fno-ignore-interface-pragmas</option></entry>
808 <entry><option>-fliberate-case-threshold</option></entry>
809 <entry>Tweak the liberate-case optimisation (default: 10)</entry>
810 <entry>static</entry>
811 <entry><option>-fno-liberate-case-threshold</option></entry>
815 <entry><option>-fomit-interface-pragmas</option></entry>
816 <entry>Don't generate interface pragmas</entry>
817 <entry>dynamic</entry>
818 <entry><option>-fno-omit-interface-pragmas</option></entry>
822 <entry><option>-fmax-worker-args</option></entry>
823 <entry>If a worker has that many arguments, none will be
824 unpacked anymore (default: 10)</entry>
825 <entry>static</entry>
830 <entry><option>-fmax-simplifier-iterations</option></entry>
831 <entry>Set the max iterations for the simplifier</entry>
832 <entry>dynamic</entry>
837 <entry><option>-fno-state-hack</option></entry>
838 <entry>Turn off the "state hack" whereby any lambda with a real-world state token
839 as argument is considered to be single-entry. Hence OK to inline things inside it.</entry>
840 <entry>static</entry>
845 <entry><option>-fno-cpr</option></entry>
846 <entry>Turn off CPR analysis</entry>
847 <entry>static</entry>
852 <entry><option>-fno-cse</option></entry>
853 <entry>Turn off common sub-expression</entry>
854 <entry>dynamic</entry>
859 <entry><option>-fno-full-laziness</option></entry>
860 <entry>Turn off full laziness (floating bindings outwards). It is on by default.</entry>
861 <entry>dynamic</entry>
862 <entry>-ffull-laziness</entry>
866 <entry><option>-fno-pre-inlining</option></entry>
867 <entry>Turn off pre-inlining</entry>
868 <entry>static</entry>
873 <entry><option>-fno-strictness</option></entry>
874 <entry>Turn off strictness analysis</entry>
875 <entry>dynamic</entry>
880 <entry><option>-fnumbers-strict</option></entry>
881 <entry>Make numbers strict</entry>
882 <entry>dynamic</entry>
883 <entry><option>-fno-numbers-strict</option></entry>
887 <entry><option>-funbox-strict-fields</option></entry>
888 <entry>Flatten strict constructor fields</entry>
889 <entry>dynamic</entry>
890 <entry><option>-fno-unbox-strict-fields</option></entry>
894 <entry><option>-funfolding-creation-threshold</option></entry>
895 <entry>Tweak unfolding settings</entry>
896 <entry>static</entry>
897 <entry><option>-fno-unfolding-creation-threshold</option></entry>
901 <entry><option>-funfolding-fun-discount</option></entry>
902 <entry>Tweak unfolding settings</entry>
903 <entry>static</entry>
904 <entry><option>-fno-unfolding-fun-discount</option></entry>
908 <entry><option>-funfolding-keeness-factor</option></entry>
909 <entry>Tweak unfolding settings</entry>
910 <entry>static</entry>
911 <entry><option>-fno-unfolding-keeness-factor</option></entry>
915 <entry><option>-funfolding-update-in-place</option></entry>
916 <entry>Tweak unfolding settings</entry>
917 <entry>static</entry>
918 <entry><option>-fno-unfolding-update-in-place</option></entry>
922 <entry><option>-funfolding-use-threshold</option></entry>
923 <entry>Tweak unfolding settings</entry>
924 <entry>static</entry>
925 <entry><option>-fno-unfolding-use-threshold</option></entry>
933 <title>Profiling options (<xref linkend="profiling"/>)</title>
936 <tgroup cols="3" align="left" colsep="1" rowsep="1">
940 <entry>Description</entry>
941 <entry>Static/Dynamic</entry>
942 <entry>Reverse</entry>
947 <entry><option>-auto</option></entry>
948 <entry>Auto-add <literal>_scc_</literal>s to all
949 exported functions</entry>
950 <entry>static</entry>
951 <entry><option>-no-auto</option></entry>
954 <entry><option>-auto-all</option></entry>
955 <entry>Auto-add <literal>_scc_</literal>s to all
956 top-level functions</entry>
957 <entry>static</entry>
958 <entry><option>-no-auto-all</option></entry>
961 <entry><option>-auto-dicts</option></entry>
962 <entry>Auto-add <literal>_scc_</literal>s to all dictionaries</entry>
963 <entry>static</entry>
964 <entry><option>-no-auto-dicts</option></entry>
967 <entry><option>-caf-all</option></entry>
968 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
969 <entry>static</entry>
970 <entry><option>-no-caf-all</option></entry>
973 <entry><option>-prof</option></entry>
974 <entry>Turn on profiling</entry>
975 <entry>static</entry>
979 <entry><option>-ticky</option></entry>
980 <entry>Turn on ticky-ticky profiling</entry>
981 <entry>static</entry>
990 <title>Parallelism options (<xref linkend="sec-using-parallel"/>)</title>
993 <tgroup cols="3" align="left" colsep="1" rowsep="1">
997 <entry>Description</entry>
998 <entry>Static/Dynamic</entry>
999 <entry>Reverse</entry>
1004 <entry><option>-gransim</option></entry>
1005 <entry>Enable GRANSIM</entry>
1006 <entry>static</entry>
1010 <entry><option>-parallel</option></entry>
1011 <entry>Enable Parallel Haskell</entry>
1012 <entry>static</entry>
1016 <entry><option>-smp</option></entry>
1017 <entry>Enable SMP support</entry>
1018 <entry>static</entry>
1027 <title>C pre-processor options (<xref linkend="c-pre-processor"/>)</title>
1030 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1034 <entry>Description</entry>
1035 <entry>Static/Dynamic</entry>
1036 <entry>Reverse</entry>
1041 <entry><option>-cpp</option></entry>
1042 <entry>Run the C pre-processor on Haskell source files</entry>
1043 <entry>dynamic</entry>
1047 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1048 <entry>Define a symbol in the C pre-processor</entry>
1049 <entry>dynamic</entry>
1050 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1053 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1054 <entry>Undefine a symbol in the C pre-processor</entry>
1055 <entry>dynamic</entry>
1059 <entry><option>-I</option><replaceable>dir</replaceable></entry>
1060 <entry>Add <replaceable>dir</replaceable> to the
1061 directory search list for <literal>#include</literal> files</entry>
1062 <entry>static</entry>
1071 <title>C compiler options (<xref linkend="options-C-compiler"/>)</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>-#include</option> <replaceable>file</replaceable></entry>
1085 <entry>Include <replaceable>file</replaceable> when
1086 compiling the <filename>.hc</filename> file</entry>
1087 <entry>dynamic</entry>
1096 <title>Code generation options (<xref linkend="options-codegen"/>)</title>
1099 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1103 <entry>Description</entry>
1104 <entry>Static/Dynamic</entry>
1105 <entry>Reverse</entry>
1110 <entry><option>-fasm</option></entry>
1111 <entry>Use the native code generator</entry>
1112 <entry>dynamic</entry>
1113 <entry>-fvia-C</entry>
1116 <entry><option>-fvia-C</option></entry>
1117 <entry>Compile via C</entry>
1118 <entry>dynamic</entry>
1119 <entry>-fasm</entry>
1122 <entry><option>-fno-code</option></entry>
1123 <entry>Omit code generation</entry>
1124 <entry>static</entry>
1133 <title>Linking options (<xref linkend="options-linker"/>)</title>
1136 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1140 <entry>Description</entry>
1141 <entry>Static/Dynamic</entry>
1142 <entry>Reverse</entry>
1147 <entry><option>-dynamic</option></entry>
1148 <entry>Use dynamic Haskell libraries (if available)</entry>
1149 <entry>static</entry>
1153 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1154 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1155 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1156 <entry>static</entry>
1160 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1161 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1162 directories searched for frameworks.
1163 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1164 <entry>static</entry>
1168 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1169 <entry>Link in library <replaceable>lib</replaceable></entry>
1170 <entry>static</entry>
1174 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1175 <entry>Add <replaceable>dir</replaceable> to the list of
1176 directories searched for libraries</entry>
1177 <entry>static</entry>
1181 <entry><option>-main-is</option></entry>
1182 <entry>Set main function</entry>
1183 <entry>static</entry>
1187 <entry><option>-no-hs-main</option></entry>
1188 <entry>Don't assume this program contains <literal>main</literal></entry>
1189 <entry>static</entry>
1193 <entry><option>-no-link</option></entry>
1194 <entry>Omit linking</entry>
1195 <entry>static</entry>
1199 <entry><option>-package</option> <replaceable>name</replaceable></entry>
1200 <entry>Link in package <replaceable>name</replaceable></entry>
1201 <entry>static</entry>
1205 <entry><option>-split-objs</option></entry>
1206 <entry>Split objects (for libraries)</entry>
1207 <entry>static</entry>
1211 <entry><option>-static</option></entry>
1212 <entry>Use static Haskell libraries</entry>
1213 <entry>static</entry>
1217 <entry><option>-threaded</option></entry>
1218 <entry>Use the threaded runtime</entry>
1219 <entry>static</entry>
1223 <entry><option>-debug</option></entry>
1224 <entry>Use the debugging runtime</entry>
1225 <entry>static</entry>
1234 <title>Replacing phases (<xref linkend="replacing-phases"/>)</title>
1237 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1241 <entry>Description</entry>
1242 <entry>Static/Dynamic</entry>
1243 <entry>Reverse</entry>
1248 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1249 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1250 <entry>static</entry>
1254 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1255 <entry>Use <replaceable>cmd</replaceable> as the C
1256 pre-processor (with <option>-cpp</option> only)</entry>
1257 <entry>static</entry> <entry>-</entry>
1260 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1261 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1262 <entry>static</entry>
1266 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1267 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1268 <entry>static</entry>
1272 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1273 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1274 <entry>static</entry>
1278 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1279 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1280 <entry>static</entry>
1284 <entry><option>-pgmdep</option> <replaceable>cmd</replaceable></entry>
1285 <entry>Use <replaceable>cmd</replaceable> as the dependency generator</entry>
1286 <entry>static</entry>
1290 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1291 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1292 (with <option>-F</option> only)</entry>
1293 <entry>static</entry>
1299 <indexterm><primary><option>-pgmL</option></primary></indexterm>
1300 <indexterm><primary><option>-pgmP</option></primary></indexterm>
1301 <indexterm><primary><option>-pgmc</option></primary></indexterm>
1302 <indexterm><primary><option>-pgma</option></primary></indexterm>
1303 <indexterm><primary><option>-pgml</option></primary></indexterm>
1304 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1305 <indexterm><primary><option>-pgmdep</option></primary></indexterm>
1306 <indexterm><primary><option>-pgmF</option></primary></indexterm>
1311 <title>Forcing options to particular phases (<xref linkend="forcing-options-through"/>)</title>
1314 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1318 <entry>Description</entry>
1319 <entry>Static/Dynamic</entry>
1320 <entry>Reverse</entry>
1325 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1326 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1327 <entry>dynamic</entry>
1331 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1332 <entry>pass <replaceable>option</replaceable> to cpp (with
1333 <option>-cpp</option> only)</entry>
1334 <entry>dynamic</entry>
1338 <entry><option>-optF</option> <replaceable>option</replaceable></entry>
1339 <entry>pass <replaceable>option</replaceable> to the
1340 custom pre-processor</entry>
1341 <entry>dynamic</entry>
1345 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1346 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1347 <entry>dynamic</entry>
1351 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1352 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1353 <entry>dynamic</entry>
1357 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1358 <entry>pass <replaceable>option</replaceable> to the linker</entry>
1359 <entry>static</entry>
1363 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1364 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1365 <entry>static</entry>
1369 <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1370 <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1371 <entry>static</entry>
1380 <title>Platform-specific options (<xref linkend="options-platform"/>)</title>
1383 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1387 <entry>Description</entry>
1388 <entry>Static/Dynamic</entry>
1389 <entry>Reverse</entry>
1394 <entry><option>-mv8</option></entry>
1395 <entry>(SPARC only) enable version 8 support</entry>
1396 <entry>static</entry>
1400 <entry><option>-monly-[32]-regs</option></entry>
1401 <entry>(x86 only) give some registers back to the C compiler</entry>
1402 <entry>dynamic</entry>
1412 <title>External core file options (<xref linkend="ext-core"/>)</title>
1415 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1419 <entry>Description</entry>
1420 <entry>Static/Dynamic</entry>
1421 <entry>Reverse</entry>
1426 <entry><option>-fext-core</option></entry>
1427 <entry>Generate <filename>.hcr</filename> external Core files</entry>
1428 <entry>static</entry>
1438 <title>Compiler debugging options (<xref linkend="options-debugging"/>)</title>
1441 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1445 <entry>Description</entry>
1446 <entry>Static/Dynamic</entry>
1447 <entry>Reverse</entry>
1452 <entry><option>-dcore-lint</option></entry>
1453 <entry>Turn on internal sanity checking</entry>
1454 <entry>dynamic</entry>
1458 <entry><option>-ddump-absC</option></entry>
1459 <entry>Dump abstract C</entry>
1460 <entry>dynamic</entry>
1464 <entry><option>-ddump-asm</option></entry>
1465 <entry>Dump assembly</entry>
1466 <entry>dynamic</entry>
1470 <entry><option>-ddump-bcos</option></entry>
1471 <entry>Dump interpreter byte code</entry>
1472 <entry>dynamic</entry>
1476 <entry><option>-ddump-cpranal</option></entry>
1477 <entry>Dump output from CPR analysis</entry>
1478 <entry>dynamic</entry>
1482 <entry><option>-ddump-cse</option></entry>
1483 <entry>Dump CSE output</entry>
1484 <entry>dynamic</entry>
1488 <entry><option>-ddump-deriv</option></entry>
1489 <entry>Dump deriving output</entry>
1490 <entry>dynamic</entry>
1494 <entry><option>-ddump-ds</option></entry>
1495 <entry>Dump desugarer output</entry>
1496 <entry>dynamic</entry>
1500 <entry><option>-ddump-flatC</option></entry>
1501 <entry>Dump “flat” C</entry>
1502 <entry>dynamic</entry>
1506 <entry><option>-ddump-foreign</option></entry>
1507 <entry>Dump <literal>foreign export</literal> stubs</entry>
1508 <entry>dynamic</entry>
1512 <entry><option>-ddump-inlinings</option></entry>
1513 <entry>Dump inlining info</entry>
1514 <entry>dynamic</entry>
1518 <entry><option>-ddump-occur-anal</option></entry>
1519 <entry>Dump occurrence analysis output</entry>
1520 <entry>dynamic</entry>
1524 <entry><option>-ddump-parsed</option></entry>
1525 <entry>Dump parse tree</entry>
1526 <entry>dynamic</entry>
1530 <entry><option>-ddump-realC</option></entry>
1531 <entry>Dump “real” C</entry>
1532 <entry>dynamic</entry>
1536 <entry><option>-ddump-rn</option></entry>
1537 <entry>Dump renamer output</entry>
1538 <entry>dynamic</entry>
1542 <entry><option>-ddump-rules</option></entry>
1543 <entry>Dump rules</entry>
1544 <entry>dynamic</entry>
1548 <entry><option>-ddump-sat</option></entry>
1549 <entry>Dump saturated output</entry>
1550 <entry>dynamic</entry>
1554 <entry><option>-ddump-simpl</option></entry>
1555 <entry>Dump final simplifier output</entry>
1556 <entry>dynamic</entry>
1560 <entry><option>-ddump-simpl-iterations</option></entry>
1561 <entry>Dump output from each simplifier iteration</entry>
1562 <entry>dynamic</entry>
1566 <entry><option>-ddump-spec</option></entry>
1567 <entry>Dump specialiser output</entry>
1568 <entry>dynamic</entry>
1572 <entry><option>-ddump-stg</option></entry>
1573 <entry>Dump final STG</entry>
1574 <entry>dynamic</entry>
1578 <entry><option>-ddump-stranal</option></entry>
1579 <entry>Dump strictness analyser output</entry>
1580 <entry>dynamic</entry>
1584 <entry><option>-ddump-tc</option></entry>
1585 <entry>Dump typechecker output</entry>
1586 <entry>dynamic</entry>
1590 <entry><option>-ddump-types</option></entry>
1591 <entry>Dump type signatures</entry>
1592 <entry>dynamic</entry>
1596 <entry><option>-ddump-usagesp</option></entry>
1597 <entry>Dump UsageSP analysis output</entry>
1598 <entry>dynamic</entry>
1602 <entry><option>-ddump-worker-wrapper</option></entry>
1603 <entry>Dump worker-wrapper output</entry>
1604 <entry>dynamic</entry>
1608 <entry><option>-ddump-rn-trace</option></entry>
1609 <entry>Trace renamer</entry>
1610 <entry>dynamic</entry>
1614 <entry><option>-ddump-rn-stats</option></entry>
1615 <entry>Renamer stats</entry>
1616 <entry>dynamic</entry>
1620 <entry><option>-ddump-stix</option></entry>
1621 <entry>Native code generator intermediate form</entry>
1622 <entry>dynamic</entry>
1626 <entry><option>-ddump-simpl-stats</option></entry>
1627 <entry>Dump simplifier stats</entry>
1628 <entry>dynamic</entry>
1632 <entry><option>-dppr-debug</option></entry>
1633 <entry>Turn on debug printing (more verbose)</entry>
1634 <entry>static</entry>
1638 <entry><option>-dppr-noprags</option></entry>
1639 <entry>Don't output pragma info in dumps</entry>
1640 <entry>static</entry>
1644 <entry><option>-dppr-user-length</option></entry>
1645 <entry>Set the depth for printing expressions in error msgs</entry>
1646 <entry>static</entry>
1650 <entry><option>-dsource-stats</option></entry>
1651 <entry>Dump haskell source stats</entry>
1652 <entry>dynamic</entry>
1656 <entry><option>-dstg-lint</option></entry>
1657 <entry>STG pass sanity checking</entry>
1658 <entry>dynamic</entry>
1662 <entry><option>-dstg-stats</option></entry>
1663 <entry>Dump STG stats</entry>
1664 <entry>dynamic</entry>
1668 <entry><option>-dusagesp-lint</option></entry>
1669 <entry>UsageSP sanity checker</entry>
1670 <entry>dynamic</entry>
1674 <entry><option>-dverbose-core2core</option></entry>
1675 <entry>Show output from each core-to-core pass</entry>
1676 <entry>dynamic</entry>
1680 <entry><option>-dverbose-stg2stg</option></entry>
1681 <entry>Show output from each STG-to-STG pass</entry>
1682 <entry>dynamic</entry>
1686 <entry><option>-unreg</option></entry>
1687 <entry>Enable unregisterised compilation</entry>
1688 <entry>static</entry>
1697 <title>Misc compiler options</title>
1700 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1704 <entry>Description</entry>
1705 <entry>Static/Dynamic</entry>
1706 <entry>Reverse</entry>
1711 <entry><option>-femit-extern-decls</option></entry>
1713 <entry>static</entry>
1717 <entry><option>-fglobalise-toplev-names</option></entry>
1718 <entry>Make all top-level names global (for <option>-split-objs</option>)</entry>
1719 <entry>static</entry>
1723 <entry><option>-fno-hi-version-check</option></entry>
1724 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1725 <entry>static</entry>
1729 <entry><option>-dno-black-holing</option></entry>
1730 <entry>Turn off black holing (probably doesn't work)</entry>
1731 <entry>static</entry>
1735 <entry><option>-fno-method-sharing</option></entry>
1736 <entry>Don't share specialisations of overloaded functions</entry>
1737 <entry>static</entry>
1741 <entry><option>-fno-prune-decls</option></entry>
1742 <entry>Renamer: don't prune declarations</entry>
1743 <entry>static</entry>
1747 <entry><option>-fhistory-size</option></entry>
1748 <entry>Set simplification history size</entry>
1749 <entry>static</entry>
1753 <entry><option>-funregisterised</option></entry>
1754 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1755 <entry>static</entry>
1759 <entry><option>-fno-asm-mangling</option></entry>
1760 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1761 <entry>static</entry>
1775 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
1776 , ( "Rghc-timing" , NoArg (enableTimingStats) )
1782 ;;; Local Variables: ***
1784 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***