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>Alternative modes of operation (<xref linkend="modes"/>)</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>--interactive</option></entry>
142 <entry>Interactive mode - normally used by just running <command>ghci</command></entry>
143 <entry>static</entry>
147 <entry><option>--make</option></entry>
148 <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>.</entry>
149 <entry>static</entry>
153 <entry><option>-e <replaceable>expr</replaceable></option></entry>
154 <entry>Evaluate <replaceable>expr</replaceable></entry>
155 <entry>static</entry>
159 <entry><option>-M</option></entry>
160 <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>.</entry>
161 <entry>static</entry>
165 <entry><option>--mk-dll</option></entry>
166 <entry>DLL-creation mode (Windows only)</entry>
167 <entry>static</entry>
176 <title>Redirecting output (<xref linkend="options-output"/>)</title>
179 <tgroup cols="3" align="left" colsep="1" rowsep="1">
183 <entry>Description</entry>
184 <entry>Static/Dynamic</entry>
185 <entry>Reverse</entry>
190 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
191 <entry>set the suffix to use for intermediate C files</entry>
192 <entry>static</entry>
196 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
197 <entry>set directory for interface files</entry>
198 <entry>static</entry>
202 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
203 <entry>set the suffix to use for interface files</entry>
204 <entry>static</entry>
208 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
209 <entry>set output filename</entry>
210 <entry>static</entry>
214 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
215 <entry>set output directory</entry>
216 <entry>static</entry>
220 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
221 <entry>set the filename in which to put the interface</entry>
222 <entry>static</entry>
226 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
227 <entry>set the output file suffix</entry>
228 <entry>static</entry>
237 <title>Keeping intermediate files (<xref linkend="keeping-intermediates"/>)</title>
240 <tgroup cols="3" align="left" colsep="1" rowsep="1">
244 <entry>Description</entry>
245 <entry>Static/Dynamic</entry>
246 <entry>Reverse</entry>
251 <entry><option>-keep-hc-file</option></entry>
252 <entry>retain intermediate <literal>.hc</literal> files</entry>
253 <entry>static</entry>
257 <entry><option>-keep-s-file</option></entry>
258 <entry>retain intermediate <literal>.s</literal> files</entry>
259 <entry>static</entry>
263 <entry><option>-keep-raw-s-file</option></entry>
264 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
265 <entry>static</entry>
269 <entry><option>-keep-tmp-files</option></entry>
270 <entry>retain all intermediate temporary files</entry>
271 <entry>static</entry>
280 <title>Temporary files (<xref linkend="temp-files"/>)</title>
283 <tgroup cols="3" align="left" colsep="1" rowsep="1">
287 <entry>Description</entry>
288 <entry>Static/Dynamic</entry>
289 <entry>Reverse</entry>
294 <entry><option>-tmpdir</option></entry>
295 <entry>set the directory for temporary files</entry>
296 <entry>static</entry>
305 <title>Finding imports (<xref linkend="search-path"/>)</title>
308 <tgroup cols="3" align="left" colsep="1" rowsep="1">
313 <entry>Description</entry>
314 <entry>Static/Dynamic</entry>
315 <entry>Reverse</entry>
320 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
321 <entry>add <replaceable>dir</replaceable>,
322 <replaceable>dir2</replaceable>, etc. to import path</entry>
323 <entry>static</entry>
327 <entry><option>-i</option></entry>
328 <entry>Empty the import directory list</entry>
329 <entry>static</entry>
338 <title>Interface file options (<xref linkend="hi-options"/>)</title>
341 <tgroup cols="3" align="left" colsep="1" rowsep="1">
346 <entry>Description</entry>
347 <entry>Static/Dynamic</entry>
348 <entry>Reverse</entry>
353 <entry><option>-ddump-hi</option></entry>
354 <entry>Dump the new interface to stdout</entry>
355 <entry>dynamic</entry>
359 <entry><option>-ddump-hi-diffs</option></entry>
360 <entry>Show the differences vs. the old interface</entry>
361 <entry>dynamic</entry>
365 <entry><option>-ddump-minimal-imports</option></entry>
366 <entry>Dump a minimal set of imports</entry>
367 <entry>dynamic</entry>
371 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
372 <entry>Read the interface in
373 <replaceable>file</replaceable> and dump it as text to
374 <literal>stdout</literal>.</entry>
375 <entry>static</entry>
384 <title>Recompilation checking (<xref linkend="recomp"/>)</title>
387 <tgroup cols="3" align="left" colsep="1" rowsep="1">
392 <entry>Description</entry>
393 <entry>Static/Dynamic</entry>
394 <entry>Reverse</entry>
399 <entry><option>-no-recomp</option></entry>
400 <entry>Turn off recompilation checking; implied by any
401 <option>-ddump-X</option> option</entry>
402 <entry>dynamic</entry>
403 <entry><option>-recomp</option></entry>
411 <title>Interactive-mode options (<xref linkend="ghci-dot-files"/>)</title>
414 <tgroup cols="3" align="left" colsep="1" rowsep="1">
418 <entry>Description</entry>
419 <entry>Static/Dynamic</entry>
420 <entry>Reverse</entry>
425 <entry><option>-ignore-dot-ghci</option></entry>
426 <entry>Disable reading of <filename>.ghci</filename> files</entry>
427 <entry>static</entry>
431 <entry><option>-read-dot-ghci</option></entry>
432 <entry>Enable reading of <filename>.ghci</filename> files</entry>
433 <entry>static</entry>
442 <title>Packages (<xref linkend="packages"/>)</title>
444 <tgroup cols="3" align="left" colsep="1" rowsep="1">
448 <entry>Description</entry>
449 <entry>Static/Dynamic</entry>
450 <entry>Reverse</entry>
455 <entry><option>-package</option> <replaceable>P</replaceable></entry>
456 <entry>Expose package <replaceable>P</replaceable></entry>
457 <entry>static</entry>
461 <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
462 <entry>Hide package <replaceable>P</replaceable></entry>
463 <entry>static</entry>
467 <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
468 <entry>Ignore package <replaceable>P</replaceable></entry>
469 <entry>static</entry>
473 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
474 <entry>Load more packages from <replaceable>file</replaceable></entry>
475 <entry>static</entry>
479 <entry><option>-no-user-package-conf</option></entry>
480 <entry>Don't load the user's package config file.</entry>
481 <entry>static</entry>
490 <title>Language options (<xref linkend="options-language"/>)</title>
493 <tgroup cols="3" align="left" colsep="1" rowsep="1">
497 <entry>Description</entry>
498 <entry>Static/Dynamic</entry>
499 <entry>Reverse</entry>
504 <entry><option>-fallow-overlapping-instances</option></entry>
505 <entry>Enable overlapping instances</entry>
506 <entry>dynamic</entry>
507 <entry><option>-fno-allow-overlapping-instances</option></entry>
510 <entry><option>-fallow-undecidable-instances</option></entry>
511 <entry>Enable undecidable instances</entry>
512 <entry>dynamic</entry>
513 <entry><option>-fno-allow-undecidable-instances</option></entry>
516 <entry><option>-fallow-incoherent-instances</option></entry>
517 <entry>Enable incoherent instances</entry>
518 <entry>dynamic</entry>
519 <entry><option>-fno-allow-incoherent-instances</option></entry>
522 <entry><option>-farrows</option></entry>
523 <entry>Enable arrow notation extension</entry>
524 <entry>dynamic</entry>
525 <entry><option>-fno-arrows</option></entry>
528 <entry><option>-fcontext-stack</option><replaceable>n</replaceable></entry>
529 <entry>set the limit for context reduction</entry>
530 <entry>static</entry>
531 <entry><option>-</option></entry>
534 <entry><option>-ffi</option> or <option>-fffi</option></entry>
535 <entry>Enable foreign function interface (implied by
536 <option>-fglasgow-exts</option>)</entry>
537 <entry>dynamic</entry>
538 <entry><option>-fno-ffi</option></entry>
541 <entry><option>-fgenerics</option></entry>
542 <entry>Enable generics</entry>
543 <entry>dynamic</entry>
544 <entry><option>-fno-fgenerics</option></entry>
547 <entry><option>-fglasgow-exts</option></entry>
548 <entry>Enable most language extensions</entry>
549 <entry>dynamic</entry>
550 <entry><option>-fno-glasgow-exts</option></entry>
553 <entry><option>-fignore-asserts</option></entry>
554 <entry>Ignore assertions</entry>
555 <entry>dynamic</entry>
556 <entry><option>-fno-ignore-asserts</option></entry>
559 <entry><option>-fimplicit-params</option></entry>
560 <entry>Enable Implicit Parameters.
561 Implied by <option>-fglasgow-exts</option>.</entry>
562 <entry>dynamic</entry>
563 <entry><option>-fno-implicit-params</option></entry>
566 <entry><option>-firrefutable-tuples</option></entry>
567 <entry>Make tuple pattern matching irrefutable</entry>
568 <entry>dynamic</entry>
569 <entry><option>-fno-irrefutable-tuples</option></entry>
572 <entry><option>-fno-implicit-prelude</option></entry>
573 <entry>Don't implicitly <literal>import Prelude</literal></entry>
574 <entry>dynamic</entry>
575 <entry><option>-fimplicit-prelude</option></entry>
578 <entry><option>-fno-monomorphism-restriction</option></entry>
579 <entry>Disable the monomorphism restriction</entry>
580 <entry>dynamic</entry>
581 <entry><option>-fmonomorphism-restriction</option></entry>
584 <entry><option>-fscoped-type-variables</option></entry>
585 <entry>Enable lexically-scoped type variables.
586 Implied by <option>-fglasgow-exts</option>.</entry>
587 <entry>dynamic</entry>
588 <entry><option>-fno-scoped-type-variables</option></entry>
591 <entry><option>-fth</option></entry>
592 <entry>Enable Template Haskell.
593 Implied by <option>-fglasgow-exts</option>.</entry>
594 <entry>dynamic</entry>
595 <entry><option>-fno-th</option></entry>
603 <title>Warnings (<xref linkend="options-sanity"/>)</title>
606 <tgroup cols="3" align="left" colsep="1" rowsep="1">
610 <entry>Description</entry>
611 <entry>Static/Dynamic</entry>
612 <entry>Reverse</entry>
617 <entry><option>-W</option></entry>
618 <entry>enable normal warnings</entry>
619 <entry>dynamic</entry>
620 <entry><option>-w</option></entry>
623 <entry><option>-w</option></entry>
624 <entry>disable all warnings</entry>
625 <entry>dynamic</entry>
629 <entry><option>-Wall</option></entry>
630 <entry>enable all warnings</entry>
631 <entry>dynamic</entry>
632 <entry><option>-w</option></entry>
635 <entry><option>-Werror</option></entry>
636 <entry>make warnings fatal</entry>
637 <entry>dynamic</entry>
642 <entry><option>-fwarn-deprecations</option></entry>
643 <entry>warn about uses of functions & types that are deprecated</entry>
644 <entry>dynamic</entry>
645 <entry><option>-fno-warn-deprecations</option></entry>
649 <entry><option>-fwarn-duplicate-exports</option></entry>
650 <entry>warn when an entity is exported multiple times</entry>
651 <entry>dynamic</entry>
652 <entry><option>-fno-warn-duplicate-exports</option></entry>
656 <entry><option>-fwarn-hi-shadowing</option></entry>
657 <entry>warn when a <literal>.hi</literal> file in the
658 current directory shadows a library</entry>
659 <entry>dynamic</entry>
660 <entry><option>-fno-warn-hi-shadowing</option></entry>
664 <entry><option>-fwarn-incomplete-patterns</option></entry>
665 <entry>warn when a pattern match could fail</entry>
666 <entry>dynamic</entry>
667 <entry><option>-fno-warn-incomplete-patterns</option></entry>
671 <entry><option>-fwarn-incomplete-record-updates</option></entry>
672 <entry>warn when a record update could fail</entry>
673 <entry>dynamic</entry>
674 <entry><option>-fno-warn-incomplete-record-updates</option></entry>
678 <entry><option>-fwarn-misc</option></entry>
679 <entry>enable miscellaneous warnings</entry>
680 <entry>dynamic</entry>
681 <entry><option>-fno-warn-misc</option></entry>
685 <entry><option>-fwarn-missing-fields</option></entry>
686 <entry>warn when fields of a record are uninitialised</entry>
687 <entry>dynamic</entry>
688 <entry><option>-fno-warn-missing-fields</option></entry>
692 <entry><option>-fwarn-missing-methods</option></entry>
693 <entry>warn when class methods are undefined</entry>
694 <entry>dynamic</entry>
695 <entry><option>-fno-warn-missing-methods</option></entry>
699 <entry><option>-fwarn-missing-signatures</option></entry>
700 <entry>warn about top-level functions without signatures</entry>
701 <entry>dynamic</entry>
702 <entry><option>-fno-warn-missing-signatures</option></entry>
706 <entry><option>-fwarn-name-shadowing</option></entry>
707 <entry>warn when names are shadowed</entry>
708 <entry>dynamic</entry>
709 <entry><option>-fno-warn-name-shadowing</option></entry>
713 <entry><option>-fwarn-oprhans</option></entry>
714 <entry>warn when the module contains "orphan" instance declarations
715 or rewrite rules</entry>
716 <entry>dynamic</entry>
717 <entry><option>-fno-warn-orphans</option></entry>
721 <entry><option>-fwarn-overlapping-patterns</option></entry>
722 <entry>warn about overlapping patterns</entry>
723 <entry>dynamic</entry>
724 <entry><option>-fno-warn-overlapping-patterns</option></entry>
728 <entry><option>-fwarn-simple-patterns</option></entry>
729 <entry>warn about lambda-patterns that can fail</entry>
730 <entry>dynamic</entry>
731 <entry><option>-fno-warn-simple-patterns</option></entry>
735 <entry><option>-fwarn-type-defaults</option></entry>
736 <entry>warn when defaulting happens</entry>
737 <entry>dynamic</entry>
738 <entry><option>-fno-warn-type-defaults</option></entry>
742 <entry><option>-fwarn-unused-binds</option></entry>
743 <entry>warn about bindings that are unused</entry>
744 <entry>dynamic</entry>
745 <entry><option>-fno-warn-unused-binds</option></entry>
749 <entry><option>-fwarn-unused-imports</option></entry>
750 <entry>warn about unnecessary imports</entry>
751 <entry>dynamic</entry>
752 <entry><option>-fno-warn-unused-imports</option></entry>
756 <entry><option>-fwarn-unused-matches</option></entry>
757 <entry>warn about variables in patterns that aren't used</entry>
758 <entry>dynamic</entry>
759 <entry><option>-fno-warn-unused-matches</option></entry>
768 <title>Optimisation levels (<xref linkend="options-optimise"/>)</title>
771 <tgroup cols="3" align="left" colsep="1" rowsep="1">
775 <entry>Description</entry>
776 <entry>Static/Dynamic</entry>
777 <entry>Reverse</entry>
782 <entry><option>-O</option></entry>
783 <entry>Enable default optimisation (level 1)</entry>
784 <entry>dynamic</entry>
785 <entry><option>-O0</option></entry>
788 <entry><option>-O</option><replaceable>n</replaceable></entry>
789 <entry>Set optimisation level <replaceable>n</replaceable></entry>
790 <entry>dynamic</entry>
791 <entry><option>-O0</option></entry>
799 <title>Individual optimisations (<xref linkend="options-f"/>)</title>
802 <tgroup cols="3" align="left" colsep="1" rowsep="1">
806 <entry>Description</entry>
807 <entry>Static/Dynamic</entry>
808 <entry>Reverse</entry>
813 <entry><option>-fcase-merge</option></entry>
814 <entry>Enable case-merging</entry>
815 <entry>dynamic</entry>
816 <entry><option>-fno-case-merge</option></entry>
820 <entry><option>-fdicts-strict</option></entry>
821 <entry>Make dictionaries strict</entry>
822 <entry>static</entry>
823 <entry><option>-fno-dicts-strict</option></entry>
827 <entry><option>-fdo-eta-reduction</option></entry>
828 <entry>Enable eta-reduction</entry>
829 <entry>dynamic</entry>
830 <entry><option>-fno-do-eta-reduction</option></entry>
834 <entry><option>-fdo-lambda-eta-expansion</option></entry>
835 <entry>Enable lambda eta-reduction</entry>
836 <entry>dynamic</entry>
837 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
841 <entry><option>-fexcess-precision</option></entry>
842 <entry>Enable excess intermediate precision</entry>
843 <entry>static</entry>
844 <entry><option>-fno-excess-precision</option></entry>
848 <entry><option>-frules-off</option></entry>
849 <entry>Switch off all rewrite rules (including rules
850 generated by automatic specialisation of overloaded functions)</entry>
851 <entry>static</entry>
852 <entry><option>-frules-off</option></entry>
856 <entry><option>-fignore-asserts</option></entry>
857 <entry>Ignore assertions in the source</entry>
858 <entry>static</entry>
859 <entry><option>-fno-ignore-asserts</option></entry>
863 <entry><option>-fignore-interface-pragmas</option></entry>
864 <entry>Ignore pragmas in interface files</entry>
865 <entry>static</entry>
866 <entry><option>-fno-ignore-interface-pragmas</option></entry>
870 <entry><option>-fliberate-case-threshold</option></entry>
871 <entry>Tweak the liberate-case optimisation (default: 10)</entry>
872 <entry>static</entry>
873 <entry><option>-fno-liberate-case-threshold</option></entry>
877 <entry><option>-fomit-interface-pragmas</option></entry>
878 <entry>Don't generate interface pragmas</entry>
879 <entry>dynamic</entry>
880 <entry><option>-fno-omit-interface-pragmas</option></entry>
884 <entry><option>-fmax-worker-args</option></entry>
885 <entry>If a worker has that many arguments, none will be
886 unpacked anymore (default: 10)</entry>
887 <entry>static</entry>
892 <entry><option>-fmax-simplifier-iterations</option></entry>
893 <entry>Set the max iterations for the simplifier</entry>
894 <entry>dynamic</entry>
899 <entry><option>-fno-state-hack</option></entry>
900 <entry>Turn off the "state hack" whereby any lambda with a real-world state token
901 as argument is considered to be single-entry. Hence OK to inline things inside it.</entry>
902 <entry>static</entry>
907 <entry><option>-fno-cpr</option></entry>
908 <entry>Turn off CPR analysis</entry>
909 <entry>static</entry>
914 <entry><option>-fno-cse</option></entry>
915 <entry>Turn off common sub-expression</entry>
916 <entry>dynamic</entry>
921 <entry><option>-fno-full-laziness</option></entry>
922 <entry>Turn off full laziness (floating bindings outwards). It is on by default.</entry>
923 <entry>dynamic</entry>
924 <entry>-ffull-laziness</entry>
928 <entry><option>-fno-pre-inlining</option></entry>
929 <entry>Turn off pre-inlining</entry>
930 <entry>static</entry>
935 <entry><option>-fno-strictness</option></entry>
936 <entry>Turn off strictness analysis</entry>
937 <entry>dynamic</entry>
942 <entry><option>-fnumbers-strict</option></entry>
943 <entry>Make numbers strict</entry>
944 <entry>dynamic</entry>
945 <entry><option>-fno-numbers-strict</option></entry>
949 <entry><option>-funbox-strict-fields</option></entry>
950 <entry>Flatten strict constructor fields</entry>
951 <entry>dynamic</entry>
952 <entry><option>-fno-unbox-strict-fields</option></entry>
956 <entry><option>-funfolding-creation-threshold</option></entry>
957 <entry>Tweak unfolding settings</entry>
958 <entry>static</entry>
959 <entry><option>-fno-unfolding-creation-threshold</option></entry>
963 <entry><option>-funfolding-fun-discount</option></entry>
964 <entry>Tweak unfolding settings</entry>
965 <entry>static</entry>
966 <entry><option>-fno-unfolding-fun-discount</option></entry>
970 <entry><option>-funfolding-keeness-factor</option></entry>
971 <entry>Tweak unfolding settings</entry>
972 <entry>static</entry>
973 <entry><option>-fno-unfolding-keeness-factor</option></entry>
977 <entry><option>-funfolding-update-in-place</option></entry>
978 <entry>Tweak unfolding settings</entry>
979 <entry>static</entry>
980 <entry><option>-fno-unfolding-update-in-place</option></entry>
984 <entry><option>-funfolding-use-threshold</option></entry>
985 <entry>Tweak unfolding settings</entry>
986 <entry>static</entry>
987 <entry><option>-fno-unfolding-use-threshold</option></entry>
995 <title>Profiling options (<xref linkend="profiling"/>)</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>-auto</option></entry>
1010 <entry>Auto-add <literal>_scc_</literal>s to all
1011 exported functions</entry>
1012 <entry>static</entry>
1013 <entry><option>-no-auto</option></entry>
1016 <entry><option>-auto-all</option></entry>
1017 <entry>Auto-add <literal>_scc_</literal>s to all
1018 top-level functions</entry>
1019 <entry>static</entry>
1020 <entry><option>-no-auto-all</option></entry>
1023 <entry><option>-auto-dicts</option></entry>
1024 <entry>Auto-add <literal>_scc_</literal>s to all dictionaries</entry>
1025 <entry>static</entry>
1026 <entry><option>-no-auto-dicts</option></entry>
1029 <entry><option>-caf-all</option></entry>
1030 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1031 <entry>static</entry>
1032 <entry><option>-no-caf-all</option></entry>
1035 <entry><option>-prof</option></entry>
1036 <entry>Turn on profiling</entry>
1037 <entry>static</entry>
1041 <entry><option>-ticky</option></entry>
1042 <entry>Turn on ticky-ticky profiling</entry>
1043 <entry>static</entry>
1052 <title>Parallelism options (<xref linkend="sec-using-parallel"/>)</title>
1055 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1059 <entry>Description</entry>
1060 <entry>Static/Dynamic</entry>
1061 <entry>Reverse</entry>
1066 <entry><option>-gransim</option></entry>
1067 <entry>Enable GRANSIM</entry>
1068 <entry>static</entry>
1072 <entry><option>-parallel</option></entry>
1073 <entry>Enable Parallel Haskell</entry>
1074 <entry>static</entry>
1078 <entry><option>-smp</option></entry>
1079 <entry>Enable SMP support</entry>
1080 <entry>static</entry>
1089 <title>C pre-processor options (<xref linkend="c-pre-processor"/>)</title>
1092 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1096 <entry>Description</entry>
1097 <entry>Static/Dynamic</entry>
1098 <entry>Reverse</entry>
1103 <entry><option>-cpp</option></entry>
1104 <entry>Run the C pre-processor on Haskell source files</entry>
1105 <entry>dynamic</entry>
1109 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1110 <entry>Define a symbol in the C pre-processor</entry>
1111 <entry>dynamic</entry>
1112 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1115 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1116 <entry>Undefine a symbol in the C pre-processor</entry>
1117 <entry>dynamic</entry>
1121 <entry><option>-I</option><replaceable>dir</replaceable></entry>
1122 <entry>Add <replaceable>dir</replaceable> to the
1123 directory search list for <literal>#include</literal> files</entry>
1124 <entry>static</entry>
1133 <title>C compiler options (<xref linkend="options-C-compiler"/>)</title>
1135 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1139 <entry>Description</entry>
1140 <entry>Static/Dynamic</entry>
1141 <entry>Reverse</entry>
1146 <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1147 <entry>Include <replaceable>file</replaceable> when
1148 compiling the <filename>.hc</filename> file</entry>
1149 <entry>dynamic</entry>
1158 <title>Code generation options (<xref linkend="options-codegen"/>)</title>
1161 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1165 <entry>Description</entry>
1166 <entry>Static/Dynamic</entry>
1167 <entry>Reverse</entry>
1172 <entry><option>-fasm</option></entry>
1173 <entry>Use the native code generator</entry>
1174 <entry>dynamic</entry>
1175 <entry>-fvia-C</entry>
1178 <entry><option>-fvia-C</option></entry>
1179 <entry>Compile via C</entry>
1180 <entry>dynamic</entry>
1181 <entry>-fasm</entry>
1184 <entry><option>-fno-code</option></entry>
1185 <entry>Omit code generation</entry>
1186 <entry>static</entry>
1195 <title>Linking options (<xref linkend="options-linker"/>)</title>
1198 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1202 <entry>Description</entry>
1203 <entry>Static/Dynamic</entry>
1204 <entry>Reverse</entry>
1209 <entry><option>-dynamic</option></entry>
1210 <entry>Use dynamic Haskell libraries (if available)</entry>
1211 <entry>static</entry>
1215 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1216 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1217 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1218 <entry>static</entry>
1222 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1223 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1224 directories searched for frameworks.
1225 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1226 <entry>static</entry>
1230 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1231 <entry>Link in library <replaceable>lib</replaceable></entry>
1232 <entry>static</entry>
1236 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1237 <entry>Add <replaceable>dir</replaceable> to the list of
1238 directories searched for libraries</entry>
1239 <entry>static</entry>
1243 <entry><option>-main-is</option></entry>
1244 <entry>Set main function</entry>
1245 <entry>static</entry>
1249 <entry><option>-no-hs-main</option></entry>
1250 <entry>Don't assume this program contains <literal>main</literal></entry>
1251 <entry>static</entry>
1255 <entry><option>-no-link</option></entry>
1256 <entry>Omit linking</entry>
1257 <entry>static</entry>
1261 <entry><option>-package</option> <replaceable>name</replaceable></entry>
1262 <entry>Link in package <replaceable>name</replaceable></entry>
1263 <entry>static</entry>
1267 <entry><option>-split-objs</option></entry>
1268 <entry>Split objects (for libraries)</entry>
1269 <entry>static</entry>
1273 <entry><option>-static</option></entry>
1274 <entry>Use static Haskell libraries</entry>
1275 <entry>static</entry>
1279 <entry><option>-threaded</option></entry>
1280 <entry>Use the threaded runtime</entry>
1281 <entry>static</entry>
1285 <entry><option>-debug</option></entry>
1286 <entry>Use the debugging runtime</entry>
1287 <entry>static</entry>
1296 <title>Replacing phases (<xref linkend="replacing-phases"/>)</title>
1299 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1303 <entry>Description</entry>
1304 <entry>Static/Dynamic</entry>
1305 <entry>Reverse</entry>
1310 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1311 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1312 <entry>static</entry>
1316 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1317 <entry>Use <replaceable>cmd</replaceable> as the C
1318 pre-processor (with <option>-cpp</option> only)</entry>
1319 <entry>static</entry> <entry>-</entry>
1322 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1323 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1324 <entry>static</entry>
1328 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1329 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1330 <entry>static</entry>
1334 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1335 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1336 <entry>static</entry>
1340 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1341 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1342 <entry>static</entry>
1346 <entry><option>-pgmdep</option> <replaceable>cmd</replaceable></entry>
1347 <entry>Use <replaceable>cmd</replaceable> as the dependency generator</entry>
1348 <entry>static</entry>
1352 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1353 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1354 (with <option>-F</option> only)</entry>
1355 <entry>static</entry>
1361 <indexterm><primary><option>-pgmL</option></primary></indexterm>
1362 <indexterm><primary><option>-pgmP</option></primary></indexterm>
1363 <indexterm><primary><option>-pgmc</option></primary></indexterm>
1364 <indexterm><primary><option>-pgma</option></primary></indexterm>
1365 <indexterm><primary><option>-pgml</option></primary></indexterm>
1366 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1367 <indexterm><primary><option>-pgmdep</option></primary></indexterm>
1368 <indexterm><primary><option>-pgmF</option></primary></indexterm>
1373 <title>Forcing options to particular phases (<xref linkend="forcing-options-through"/>)</title>
1376 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1380 <entry>Description</entry>
1381 <entry>Static/Dynamic</entry>
1382 <entry>Reverse</entry>
1387 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1388 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1389 <entry>dynamic</entry>
1393 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1394 <entry>pass <replaceable>option</replaceable> to cpp (with
1395 <option>-cpp</option> only)</entry>
1396 <entry>dynamic</entry>
1400 <entry><option>-optF</option> <replaceable>option</replaceable></entry>
1401 <entry>pass <replaceable>option</replaceable> to the
1402 custom pre-processor</entry>
1403 <entry>dynamic</entry>
1407 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1408 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1409 <entry>dynamic</entry>
1413 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1414 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1415 <entry>dynamic</entry>
1419 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1420 <entry>pass <replaceable>option</replaceable> to the linker</entry>
1421 <entry>static</entry>
1425 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1426 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1427 <entry>static</entry>
1431 <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1432 <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1433 <entry>static</entry>
1442 <title>Platform-specific options (<xref linkend="options-platform"/>)</title>
1445 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1449 <entry>Description</entry>
1450 <entry>Static/Dynamic</entry>
1451 <entry>Reverse</entry>
1456 <entry><option>-mv8</option></entry>
1457 <entry>(SPARC only) enable version 8 support</entry>
1458 <entry>static</entry>
1462 <entry><option>-monly-[32]-regs</option></entry>
1463 <entry>(x86 only) give some registers back to the C compiler</entry>
1464 <entry>dynamic</entry>
1474 <title>External core file options (<xref linkend="ext-core"/>)</title>
1477 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1481 <entry>Description</entry>
1482 <entry>Static/Dynamic</entry>
1483 <entry>Reverse</entry>
1488 <entry><option>-fext-core</option></entry>
1489 <entry>Generate <filename>.hcr</filename> external Core files</entry>
1490 <entry>static</entry>
1500 <title>Compiler debugging options (<xref linkend="options-debugging"/>)</title>
1503 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1507 <entry>Description</entry>
1508 <entry>Static/Dynamic</entry>
1509 <entry>Reverse</entry>
1514 <entry><option>-dcore-lint</option></entry>
1515 <entry>Turn on internal sanity checking</entry>
1516 <entry>dynamic</entry>
1520 <entry><option>-ddump-absC</option></entry>
1521 <entry>Dump abstract C</entry>
1522 <entry>dynamic</entry>
1526 <entry><option>-ddump-asm</option></entry>
1527 <entry>Dump assembly</entry>
1528 <entry>dynamic</entry>
1532 <entry><option>-ddump-bcos</option></entry>
1533 <entry>Dump interpreter byte code</entry>
1534 <entry>dynamic</entry>
1538 <entry><option>-ddump-cpranal</option></entry>
1539 <entry>Dump output from CPR analysis</entry>
1540 <entry>dynamic</entry>
1544 <entry><option>-ddump-cse</option></entry>
1545 <entry>Dump CSE output</entry>
1546 <entry>dynamic</entry>
1550 <entry><option>-ddump-deriv</option></entry>
1551 <entry>Dump deriving output</entry>
1552 <entry>dynamic</entry>
1556 <entry><option>-ddump-ds</option></entry>
1557 <entry>Dump desugarer output</entry>
1558 <entry>dynamic</entry>
1562 <entry><option>-ddump-flatC</option></entry>
1563 <entry>Dump “flat” C</entry>
1564 <entry>dynamic</entry>
1568 <entry><option>-ddump-foreign</option></entry>
1569 <entry>Dump <literal>foreign export</literal> stubs</entry>
1570 <entry>dynamic</entry>
1574 <entry><option>-ddump-inlinings</option></entry>
1575 <entry>Dump inlining info</entry>
1576 <entry>dynamic</entry>
1580 <entry><option>-ddump-occur-anal</option></entry>
1581 <entry>Dump occurrence analysis output</entry>
1582 <entry>dynamic</entry>
1586 <entry><option>-ddump-parsed</option></entry>
1587 <entry>Dump parse tree</entry>
1588 <entry>dynamic</entry>
1592 <entry><option>-ddump-realC</option></entry>
1593 <entry>Dump “real” C</entry>
1594 <entry>dynamic</entry>
1598 <entry><option>-ddump-rn</option></entry>
1599 <entry>Dump renamer output</entry>
1600 <entry>dynamic</entry>
1604 <entry><option>-ddump-rules</option></entry>
1605 <entry>Dump rules</entry>
1606 <entry>dynamic</entry>
1610 <entry><option>-ddump-sat</option></entry>
1611 <entry>Dump saturated output</entry>
1612 <entry>dynamic</entry>
1616 <entry><option>-ddump-simpl</option></entry>
1617 <entry>Dump final simplifier output</entry>
1618 <entry>dynamic</entry>
1622 <entry><option>-ddump-simpl-iterations</option></entry>
1623 <entry>Dump output from each simplifier iteration</entry>
1624 <entry>dynamic</entry>
1628 <entry><option>-ddump-spec</option></entry>
1629 <entry>Dump specialiser output</entry>
1630 <entry>dynamic</entry>
1634 <entry><option>-ddump-stg</option></entry>
1635 <entry>Dump final STG</entry>
1636 <entry>dynamic</entry>
1640 <entry><option>-ddump-stranal</option></entry>
1641 <entry>Dump strictness analyser output</entry>
1642 <entry>dynamic</entry>
1646 <entry><option>-ddump-tc</option></entry>
1647 <entry>Dump typechecker output</entry>
1648 <entry>dynamic</entry>
1652 <entry><option>-ddump-types</option></entry>
1653 <entry>Dump type signatures</entry>
1654 <entry>dynamic</entry>
1658 <entry><option>-ddump-usagesp</option></entry>
1659 <entry>Dump UsageSP analysis output</entry>
1660 <entry>dynamic</entry>
1664 <entry><option>-ddump-worker-wrapper</option></entry>
1665 <entry>Dump worker-wrapper output</entry>
1666 <entry>dynamic</entry>
1670 <entry><option>-ddump-rn-trace</option></entry>
1671 <entry>Trace renamer</entry>
1672 <entry>dynamic</entry>
1676 <entry><option>-ddump-rn-stats</option></entry>
1677 <entry>Renamer stats</entry>
1678 <entry>dynamic</entry>
1682 <entry><option>-ddump-stix</option></entry>
1683 <entry>Native code generator intermediate form</entry>
1684 <entry>dynamic</entry>
1688 <entry><option>-ddump-simpl-stats</option></entry>
1689 <entry>Dump simplifier stats</entry>
1690 <entry>dynamic</entry>
1694 <entry><option>-dppr-debug</option></entry>
1695 <entry>Turn on debug printing (more verbose)</entry>
1696 <entry>static</entry>
1700 <entry><option>-dppr-noprags</option></entry>
1701 <entry>Don't output pragma info in dumps</entry>
1702 <entry>static</entry>
1706 <entry><option>-dppr-user-length</option></entry>
1707 <entry>Set the depth for printing expressions in error msgs</entry>
1708 <entry>static</entry>
1712 <entry><option>-dsource-stats</option></entry>
1713 <entry>Dump haskell source stats</entry>
1714 <entry>dynamic</entry>
1718 <entry><option>-dstg-lint</option></entry>
1719 <entry>STG pass sanity checking</entry>
1720 <entry>dynamic</entry>
1724 <entry><option>-dstg-stats</option></entry>
1725 <entry>Dump STG stats</entry>
1726 <entry>dynamic</entry>
1730 <entry><option>-dusagesp-lint</option></entry>
1731 <entry>UsageSP sanity checker</entry>
1732 <entry>dynamic</entry>
1736 <entry><option>-dverbose-core2core</option></entry>
1737 <entry>Show output from each core-to-core pass</entry>
1738 <entry>dynamic</entry>
1742 <entry><option>-dverbose-stg2stg</option></entry>
1743 <entry>Show output from each STG-to-STG pass</entry>
1744 <entry>dynamic</entry>
1748 <entry><option>-unreg</option></entry>
1749 <entry>Enable unregisterised compilation</entry>
1750 <entry>static</entry>
1759 <title>Misc compiler options</title>
1762 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1766 <entry>Description</entry>
1767 <entry>Static/Dynamic</entry>
1768 <entry>Reverse</entry>
1773 <entry><option>-femit-extern-decls</option></entry>
1775 <entry>static</entry>
1779 <entry><option>-fglobalise-toplev-names</option></entry>
1780 <entry>Make all top-level names global (for <option>-split-objs</option>)</entry>
1781 <entry>static</entry>
1785 <entry><option>-fno-hi-version-check</option></entry>
1786 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1787 <entry>static</entry>
1791 <entry><option>-dno-black-holing</option></entry>
1792 <entry>Turn off black holing (probably doesn't work)</entry>
1793 <entry>static</entry>
1797 <entry><option>-fno-method-sharing</option></entry>
1798 <entry>Don't share specialisations of overloaded functions</entry>
1799 <entry>static</entry>
1803 <entry><option>-fno-prune-decls</option></entry>
1804 <entry>Renamer: don't prune declarations</entry>
1805 <entry>static</entry>
1809 <entry><option>-fhistory-size</option></entry>
1810 <entry>Set simplification history size</entry>
1811 <entry>static</entry>
1815 <entry><option>-funregisterised</option></entry>
1816 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1817 <entry>static</entry>
1821 <entry><option>-fno-asm-mangling</option></entry>
1822 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1823 <entry>static</entry>
1837 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
1838 , ( "Rghc-timing" , NoArg (enableTimingStats) )
1844 ;;; Local Variables: ***
1846 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***