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</title>
13 <para><xref linkend="options-help"/></para>
16 <tgroup cols="4" align="left" colsep="1" rowsep="1">
20 <entry>Description</entry>
21 <entry>Static/Dynamic</entry>
22 <entry>Reverse</entry>
27 <entry><option>-?</option></entry>
33 <entry><option>-help</option></entry>
39 <entry><option>-n</option></entry>
40 <entry>do a dry run</entry>
41 <entry>dynamic</entry>
45 <entry><option>-v</option></entry>
46 <entry>verbose mode (equivalent to <option>-v3</option>)</entry>
47 <entry>dynamic</entry>
51 <entry><option>-v</option><replaceable>n</replaceable></entry>
52 <entry>set verbosity level</entry>
53 <entry>dynamic</entry>
57 <entry><option>-V</option></entry>
58 <entry>display GHC version</entry>
63 <entry><option>––version</option></entry>
64 <entry>display GHC version</entry>
69 <entry><option>––numeric-version</option></entry>
70 <entry>display GHC version (numeric only)</entry>
75 <entry><option>––print-libdir</option></entry>
76 <entry>display GHC library directory</entry>
81 <entry><option>-ferror-spans</option></entry>
82 <entry>output full span in error messages</entry>
87 <entry><option>-H</option><replaceable>size</replaceable></entry>
88 <entry>Set the minimum heap size to <replaceable>size</replaceable></entry>
93 <entry><option>-Rghc-timing</option></entry>
94 <entry>Summarise timing stats for GHC (same as <literal>+RTS -tstderr</literal>)</entry>
104 <title>Which phases to run</title>
106 <para><xref linkend="options-order"/></para>
109 <tgroup cols="4" align="left" colsep="1" rowsep="1">
113 <entry>Description</entry>
114 <entry>Static/Dynamic</entry>
115 <entry>Reverse</entry>
120 <entry><option>-E</option></entry>
121 <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
126 <entry><option>-C</option></entry>
127 <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
132 <entry><option>-S</option></entry>
133 <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
138 <entry><option>-c</option></entry>
139 <entry>Do not link</entry>
140 <entry>dynamic</entry>
144 <entry><option>-x</option> <replaceable>suffix</replaceable></entry>
145 <entry>Override default behaviour for source files</entry>
146 <entry>static</entry>
155 <title>Alternative modes of operation</title>
157 <para><xref linkend="modes"/></para>
160 <tgroup cols="4" align="left" colsep="1" rowsep="1">
164 <entry>Description</entry>
165 <entry>Static/Dynamic</entry>
166 <entry>Reverse</entry>
171 <entry><option>--interactive</option></entry>
172 <entry>Interactive mode - normally used by just running <command>ghci</command></entry>
177 <entry><option>--make</option></entry>
178 <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>.</entry>
183 <entry><option>-e <replaceable>expr</replaceable></option></entry>
184 <entry>Evaluate <replaceable>expr</replaceable></entry>
189 <entry><option>-M</option></entry>
190 <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>.</entry>
200 <title>Redirecting output</title>
202 <para><xref linkend="options-output"/></para>
205 <tgroup cols="4" align="left" colsep="1" rowsep="1">
209 <entry>Description</entry>
210 <entry>Static/Dynamic</entry>
211 <entry>Reverse</entry>
216 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
217 <entry>set the suffix to use for intermediate C files</entry>
218 <entry>dynamic</entry>
222 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
223 <entry>set directory for interface files</entry>
224 <entry>dynamic</entry>
228 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
229 <entry>set the suffix to use for interface files</entry>
230 <entry>dynamic</entry>
234 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
235 <entry>set output filename</entry>
236 <entry>dynamic</entry>
240 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
241 <entry>set output directory</entry>
242 <entry>dynamic</entry>
246 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
247 <entry>set the filename in which to put the interface</entry>
248 <entry>dynamic</entry>
252 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
253 <entry>set the output file suffix</entry>
254 <entry>dynamic</entry>
258 <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
259 <entry>redirect FFi stub files</entry>
260 <entry>dynamic</entry>
269 <title>Keeping intermediate files</title>
271 <para><xref linkend="keeping-intermediates"/></para>
274 <tgroup cols="4" align="left" colsep="1" rowsep="1">
278 <entry>Description</entry>
279 <entry>Static/Dynamic</entry>
280 <entry>Reverse</entry>
285 <entry><option>-keep-hc-file</option></entry>
286 <entry>retain intermediate <literal>.hc</literal> files</entry>
287 <entry>dynamic</entry>
291 <entry><option>-keep-s-file</option></entry>
292 <entry>retain intermediate <literal>.s</literal> files</entry>
293 <entry>dynamic</entry>
297 <entry><option>-keep-raw-s-file</option></entry>
298 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
299 <entry>dynamic</entry>
303 <entry><option>-keep-tmp-files</option></entry>
304 <entry>retain all intermediate temporary files</entry>
305 <entry>dynamic</entry>
314 <title>Temporary files</title>
316 <para><xref linkend="temp-files"/></para>
319 <tgroup cols="4" align="left" colsep="1" rowsep="1">
323 <entry>Description</entry>
324 <entry>Static/Dynamic</entry>
325 <entry>Reverse</entry>
330 <entry><option>-tmpdir</option></entry>
331 <entry>set the directory for temporary files</entry>
332 <entry>dynamic</entry>
341 <title>Finding imports</title>
343 <para><xref linkend="search-path"/></para>
346 <tgroup cols="4" align="left" colsep="1" rowsep="1">
351 <entry>Description</entry>
352 <entry>Static/Dynamic</entry>
353 <entry>Reverse</entry>
358 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
359 <entry>add <replaceable>dir</replaceable>,
360 <replaceable>dir2</replaceable>, etc. to import path</entry>
361 <entry>dynamic</entry>
365 <entry><option>-i</option></entry>
366 <entry>Empty the import directory list</entry>
367 <entry>dynamic</entry>
376 <title>Interface file options</title>
378 <para><xref linkend="hi-options"/></para>
381 <tgroup cols="4" align="left" colsep="1" rowsep="1">
386 <entry>Description</entry>
387 <entry>Static/Dynamic</entry>
388 <entry>Reverse</entry>
393 <entry><option>-ddump-hi</option></entry>
394 <entry>Dump the new interface to stdout</entry>
395 <entry>dynamic</entry>
399 <entry><option>-ddump-hi-diffs</option></entry>
400 <entry>Show the differences vs. the old interface</entry>
401 <entry>dynamic</entry>
405 <entry><option>-ddump-minimal-imports</option></entry>
406 <entry>Dump a minimal set of imports</entry>
407 <entry>dynamic</entry>
411 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
412 <entry>Read the interface in
413 <replaceable>file</replaceable> and dump it as text to
414 <literal>stdout</literal>.</entry>
424 <title>Recompilation checking</title>
426 <para><xref linkend="recomp"/></para>
429 <tgroup cols="4" align="left" colsep="1" rowsep="1">
434 <entry>Description</entry>
435 <entry>Static/Dynamic</entry>
436 <entry>Reverse</entry>
441 <entry><option>-fforce-recomp</option></entry>
442 <entry>Turn off recompilation checking; implied by any
443 <option>-ddump-X</option> option</entry>
444 <entry>dynamic</entry>
445 <entry><option>-fno-force-recomp</option></entry>
453 <title>Interactive-mode options</title>
455 <para><xref linkend="ghci-dot-files"/></para>
458 <tgroup cols="4" align="left" colsep="1" rowsep="1">
462 <entry>Description</entry>
463 <entry>Static/Dynamic</entry>
464 <entry>Reverse</entry>
469 <entry><option>-ignore-dot-ghci</option></entry>
470 <entry>Disable reading of <filename>.ghci</filename> files</entry>
471 <entry>static</entry>
475 <entry><option>-read-dot-ghci</option></entry>
476 <entry>Enable reading of <filename>.ghci</filename> files</entry>
477 <entry>static</entry>
481 <entry><option>-fdebugging</option></entry>
482 <entry>Generate bytecode enabled for debugging</entry>
483 <entry>dynamic</entry>
487 <entry><option>-fno-debugging</option></entry>
488 <entry>Do not include debugging information in bytecodes</entry>
489 <entry>dynamic</entry>
498 <title>Packages</title>
500 <para><xref linkend="packages"/></para>
503 <tgroup cols="4" align="left" colsep="1" rowsep="1">
507 <entry>Description</entry>
508 <entry>Static/Dynamic</entry>
509 <entry>Reverse</entry>
514 <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
515 <entry>Compile to be part of package <replaceable>P</replaceable></entry>
516 <entry>dynamic</entry>
520 <entry><option>-package</option> <replaceable>P</replaceable></entry>
521 <entry>Expose package <replaceable>P</replaceable></entry>
522 <entry>dynamic</entry>
526 <entry><option>-hide-all-packages</option></entry>
527 <entry>Hide all packages by default</entry>
528 <entry>static</entry>
532 <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
533 <entry>Hide package <replaceable>P</replaceable></entry>
534 <entry>dynamic</entry>
538 <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
539 <entry>Ignore package <replaceable>P</replaceable></entry>
540 <entry>dynamic</entry>
544 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
545 <entry>Load more packages from <replaceable>file</replaceable></entry>
546 <entry>dynamic</entry>
550 <entry><option>-no-user-package-conf</option></entry>
551 <entry>Don't load the user's package config file.</entry>
552 <entry>dynamic</entry>
561 <title>Language options</title>
563 <para><xref linkend="options-language"/></para>
566 <tgroup cols="4" align="left" colsep="1" rowsep="1">
570 <entry>Description</entry>
571 <entry>Static/Dynamic</entry>
572 <entry>Reverse</entry>
577 <entry><option>-fallow-overlapping-instances</option></entry>
578 <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
579 <entry>dynamic</entry>
580 <entry><option>-fno-allow-overlapping-instances</option></entry>
583 <entry><option>-fallow-incoherent-instances</option></entry>
584 <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.
585 Implies <option>-fallow-overlapping-instances</option> </entry>
586 <entry>dynamic</entry>
587 <entry><option>-fno-allow-incoherent-instances</option></entry>
590 <entry><option>-fallow-undecidable-instances</option></entry>
591 <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
592 <entry>dynamic</entry>
593 <entry><option>-fno-allow-undecidable-instances</option></entry>
596 <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
597 <entry>set the <link linkend="undecidable-instances">limit for context reduction</link></entry>
598 <entry>dynamic</entry>
599 <entry><option>20</option></entry>
602 <entry><option>-farrows</option></entry>
603 <entry>Enable <link linkend="arrow-notation">arrow
604 notation</link> extension</entry>
605 <entry>dynamic</entry>
606 <entry><option>-fno-arrows</option></entry>
609 <entry><option>-ffi</option> or <option>-fffi</option></entry>
610 <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
611 <option>-fglasgow-exts</option>)</entry>
612 <entry>dynamic</entry>
613 <entry><option>-fno-ffi</option></entry>
616 <entry><option>-fgenerics</option></entry>
617 <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
618 <entry>dynamic</entry>
619 <entry><option>-fno-fgenerics</option></entry>
622 <entry><option>-fglasgow-exts</option></entry>
623 <entry>Enable most language extensions</entry>
624 <entry>dynamic</entry>
625 <entry><option>-fno-glasgow-exts</option></entry>
628 <entry><option>-fimplicit-params</option></entry>
629 <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
630 Implied by <option>-fglasgow-exts</option>.</entry>
631 <entry>dynamic</entry>
632 <entry><option>-fno-implicit-params</option></entry>
635 <entry><option>-firrefutable-tuples</option></entry>
636 <entry>Make tuple pattern matching irrefutable</entry>
637 <entry>dynamic</entry>
638 <entry><option>-fno-irrefutable-tuples</option></entry>
641 <entry><option>-fno-implicit-prelude</option></entry>
642 <entry>Don't implicitly <literal>import Prelude</literal></entry>
643 <entry>dynamic</entry>
644 <entry><option>-fimplicit-prelude</option></entry>
647 <entry><option>-fno-monomorphism-restriction</option></entry>
648 <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
649 <entry>dynamic</entry>
650 <entry><option>-fmonomorphism-restriction</option></entry>
653 <entry><option>-fno-mono-pat-binds</option></entry>
654 <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
655 <entry>dynamic</entry>
656 <entry><option>-fmono-pat-binds</option></entry>
659 <entry><option>-fextended-default-rules</option></entry>
660 <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
661 <entry>dynamic</entry>
662 <entry><option>-fno-extended-default-rules</option></entry>
665 <entry><option>-fscoped-type-variables</option></entry>
666 <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
667 Implied by <option>-fglasgow-exts</option>.</entry>
668 <entry>dynamic</entry>
669 <entry><option>-fno-scoped-type-variables</option></entry>
672 <entry><option>-fth</option></entry>
673 <entry>Enable <link linkend="template-haskell">Template Haskell</link>.
674 No longer implied by <option>-fglasgow-exts</option>.</entry>
675 <entry>dynamic</entry>
676 <entry><option>-fno-th</option></entry>
679 <entry><option>-fbang-patterns</option></entry>
680 <entry>Enable <link linkend="sec-bang-patterns">bang patterns</link>.</entry>
681 <entry>dynamic</entry>
682 <entry><option>-fno-bang-patterns</option></entry>
690 <title>Warnings</title>
692 <para><xref linkend="options-sanity"/></para>
695 <tgroup cols="4" align="left" colsep="1" rowsep="1">
699 <entry>Description</entry>
700 <entry>Static/Dynamic</entry>
701 <entry>Reverse</entry>
706 <entry><option>-W</option></entry>
707 <entry>enable normal warnings</entry>
708 <entry>dynamic</entry>
709 <entry><option>-w</option></entry>
712 <entry><option>-w</option></entry>
713 <entry>disable all warnings</entry>
714 <entry>dynamic</entry>
718 <entry><option>-Wall</option></entry>
719 <entry>enable all warnings</entry>
720 <entry>dynamic</entry>
721 <entry><option>-w</option></entry>
724 <entry><option>-Werror</option></entry>
725 <entry>make warnings fatal</entry>
726 <entry>dynamic</entry>
731 <entry><option>-fwarn-deprecations</option></entry>
732 <entry>warn about uses of functions & types that are deprecated</entry>
733 <entry>dynamic</entry>
734 <entry><option>-fno-warn-deprecations</option></entry>
738 <entry><option>-fwarn-duplicate-exports</option></entry>
739 <entry>warn when an entity is exported multiple times</entry>
740 <entry>dynamic</entry>
741 <entry><option>-fno-warn-duplicate-exports</option></entry>
745 <entry><option>-fwarn-hi-shadowing</option></entry>
746 <entry>warn when a <literal>.hi</literal> file in the
747 current directory shadows a library</entry>
748 <entry>dynamic</entry>
749 <entry><option>-fno-warn-hi-shadowing</option></entry>
753 <entry><option>-fwarn-incomplete-patterns</option></entry>
754 <entry>warn when a pattern match could fail</entry>
755 <entry>dynamic</entry>
756 <entry><option>-fno-warn-incomplete-patterns</option></entry>
760 <entry><option>-fwarn-incomplete-record-updates</option></entry>
761 <entry>warn when a record update could fail</entry>
762 <entry>dynamic</entry>
763 <entry><option>-fno-warn-incomplete-record-updates</option></entry>
767 <entry><option>-fwarn-missing-fields</option></entry>
768 <entry>warn when fields of a record are uninitialised</entry>
769 <entry>dynamic</entry>
770 <entry><option>-fno-warn-missing-fields</option></entry>
774 <entry><option>-fwarn-missing-methods</option></entry>
775 <entry>warn when class methods are undefined</entry>
776 <entry>dynamic</entry>
777 <entry><option>-fno-warn-missing-methods</option></entry>
781 <entry><option>-fwarn-missing-signatures</option></entry>
782 <entry>warn about top-level functions without signatures</entry>
783 <entry>dynamic</entry>
784 <entry><option>-fno-warn-missing-signatures</option></entry>
788 <entry><option>-fwarn-name-shadowing</option></entry>
789 <entry>warn when names are shadowed</entry>
790 <entry>dynamic</entry>
791 <entry><option>-fno-warn-name-shadowing</option></entry>
795 <entry><option>-fwarn-orphans</option></entry>
796 <entry>warn when the module contains "orphan" instance declarations
797 or rewrite rules</entry>
798 <entry>dynamic</entry>
799 <entry><option>-fno-warn-orphans</option></entry>
803 <entry><option>-fwarn-overlapping-patterns</option></entry>
804 <entry>warn about overlapping patterns</entry>
805 <entry>dynamic</entry>
806 <entry><option>-fno-warn-overlapping-patterns</option></entry>
810 <entry><option>-fwarn-simple-patterns</option></entry>
811 <entry>warn about lambda-patterns that can fail</entry>
812 <entry>dynamic</entry>
813 <entry><option>-fno-warn-simple-patterns</option></entry>
817 <entry><option>-fwarn-type-defaults</option></entry>
818 <entry>warn when defaulting happens</entry>
819 <entry>dynamic</entry>
820 <entry><option>-fno-warn-type-defaults</option></entry>
824 <entry><option>-fwarn-unused-binds</option></entry>
825 <entry>warn about bindings that are unused</entry>
826 <entry>dynamic</entry>
827 <entry><option>-fno-warn-unused-binds</option></entry>
831 <entry><option>-fwarn-unused-imports</option></entry>
832 <entry>warn about unnecessary imports</entry>
833 <entry>dynamic</entry>
834 <entry><option>-fno-warn-unused-imports</option></entry>
838 <entry><option>-fwarn-unused-matches</option></entry>
839 <entry>warn about variables in patterns that aren't used</entry>
840 <entry>dynamic</entry>
841 <entry><option>-fno-warn-unused-matches</option></entry>
850 <title>Optimisation levels</title>
852 <para><xref linkend="options-optimise"/></para>
855 <tgroup cols="4" align="left" colsep="1" rowsep="1">
859 <entry>Description</entry>
860 <entry>Static/Dynamic</entry>
861 <entry>Reverse</entry>
866 <entry><option>-O</option></entry>
867 <entry>Enable default optimisation (level 1)</entry>
868 <entry>dynamic</entry>
869 <entry><option>-O0</option></entry>
872 <entry><option>-O</option><replaceable>n</replaceable></entry>
873 <entry>Set optimisation level <replaceable>n</replaceable></entry>
874 <entry>dynamic</entry>
875 <entry><option>-O0</option></entry>
883 <title>Individual optimisations</title>
885 <para><xref linkend="options-f"/></para>
888 <tgroup cols="4" align="left" colsep="1" rowsep="1">
892 <entry>Description</entry>
893 <entry>Static/Dynamic</entry>
894 <entry>Reverse</entry>
899 <entry><option>-fcase-merge</option></entry>
900 <entry>Enable case-merging</entry>
901 <entry>dynamic</entry>
902 <entry><option>-fno-case-merge</option></entry>
906 <entry><option>-fdicts-strict</option></entry>
907 <entry>Make dictionaries strict</entry>
908 <entry>static</entry>
909 <entry><option>-fno-dicts-strict</option></entry>
913 <entry><option>-fdo-eta-reduction</option></entry>
914 <entry>Enable eta-reduction</entry>
915 <entry>dynamic</entry>
916 <entry><option>-fno-do-eta-reduction</option></entry>
920 <entry><option>-fdo-lambda-eta-expansion</option></entry>
921 <entry>Enable lambda eta-reduction</entry>
922 <entry>dynamic</entry>
923 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
927 <entry><option>-fexcess-precision</option></entry>
928 <entry>Enable excess intermediate precision</entry>
929 <entry>dynamic</entry>
930 <entry><option>-fno-excess-precision</option></entry>
934 <entry><option>-frules-off</option></entry>
935 <entry>Switch off all rewrite rules (including rules
936 generated by automatic specialisation of overloaded functions)</entry>
937 <entry>static</entry>
938 <entry><option>-frules-off</option></entry>
942 <entry><option>-fignore-asserts</option></entry>
943 <entry>Ignore assertions in the source</entry>
944 <entry>dynamic</entry>
945 <entry><option>-fno-ignore-asserts</option></entry>
949 <entry><option>-fignore-interface-pragmas</option></entry>
950 <entry>Ignore pragmas in interface files</entry>
951 <entry>dynamic</entry>
952 <entry><option>-fno-ignore-interface-pragmas</option></entry>
956 <entry><option>-fliberate-case-threshold</option></entry>
957 <entry>Tweak the liberate-case optimisation (default: 10)</entry>
958 <entry>static</entry>
959 <entry><option>-fno-liberate-case-threshold</option></entry>
963 <entry><option>-fomit-interface-pragmas</option></entry>
964 <entry>Don't generate interface pragmas</entry>
965 <entry>dynamic</entry>
966 <entry><option>-fno-omit-interface-pragmas</option></entry>
970 <entry><option>-fmax-worker-args</option></entry>
971 <entry>If a worker has that many arguments, none will be
972 unpacked anymore (default: 10)</entry>
973 <entry>static</entry>
978 <entry><option>-fmax-simplifier-iterations</option></entry>
979 <entry>Set the max iterations for the simplifier</entry>
980 <entry>dynamic</entry>
985 <entry><option>-fno-state-hack</option></entry>
986 <entry>Turn off the "state hack" whereby any lambda with a real-world state token
987 as argument is considered to be single-entry. Hence OK to inline things inside it.</entry>
988 <entry>static</entry>
993 <entry><option>-fno-cse</option></entry>
994 <entry>Turn off common sub-expression</entry>
995 <entry>dynamic</entry>
1000 <entry><option>-fno-full-laziness</option></entry>
1001 <entry>Turn off full laziness (floating bindings outwards).</entry>
1002 <entry>dynamic</entry>
1003 <entry>-ffull-laziness</entry>
1007 <entry><option>-fno-pre-inlining</option></entry>
1008 <entry>Turn off pre-inlining</entry>
1009 <entry>static</entry>
1014 <entry><option>-fno-strictness</option></entry>
1015 <entry>Turn off strictness analysis</entry>
1016 <entry>dynamic</entry>
1021 <entry><option>-funbox-strict-fields</option></entry>
1022 <entry>Flatten strict constructor fields</entry>
1023 <entry>dynamic</entry>
1024 <entry><option>-fno-unbox-strict-fields</option></entry>
1028 <entry><option>-funfolding-creation-threshold</option></entry>
1029 <entry>Tweak unfolding settings</entry>
1030 <entry>static</entry>
1031 <entry><option>-fno-unfolding-creation-threshold</option></entry>
1035 <entry><option>-funfolding-fun-discount</option></entry>
1036 <entry>Tweak unfolding settings</entry>
1037 <entry>static</entry>
1038 <entry><option>-fno-unfolding-fun-discount</option></entry>
1042 <entry><option>-funfolding-keeness-factor</option></entry>
1043 <entry>Tweak unfolding settings</entry>
1044 <entry>static</entry>
1045 <entry><option>-fno-unfolding-keeness-factor</option></entry>
1049 <entry><option>-funfolding-update-in-place</option></entry>
1050 <entry>Tweak unfolding settings</entry>
1051 <entry>static</entry>
1052 <entry><option>-fno-unfolding-update-in-place</option></entry>
1056 <entry><option>-funfolding-use-threshold</option></entry>
1057 <entry>Tweak unfolding settings</entry>
1058 <entry>static</entry>
1059 <entry><option>-fno-unfolding-use-threshold</option></entry>
1067 <title>Profiling options</title>
1069 <para><xref linkend="profiling"/></para>
1072 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1076 <entry>Description</entry>
1077 <entry>Static/Dynamic</entry>
1078 <entry>Reverse</entry>
1083 <entry><option>-auto</option></entry>
1084 <entry>Auto-add <literal>_scc_</literal>s to all
1085 exported functions</entry>
1086 <entry>static</entry>
1087 <entry><option>-no-auto</option></entry>
1090 <entry><option>-auto-all</option></entry>
1091 <entry>Auto-add <literal>_scc_</literal>s to all
1092 top-level functions</entry>
1093 <entry>static</entry>
1094 <entry><option>-no-auto-all</option></entry>
1097 <entry><option>-caf-all</option></entry>
1098 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1099 <entry>static</entry>
1100 <entry><option>-no-caf-all</option></entry>
1103 <entry><option>-prof</option></entry>
1104 <entry>Turn on profiling</entry>
1105 <entry>static</entry>
1109 <entry><option>-ticky</option></entry>
1110 <entry>Turn on ticky-ticky profiling</entry>
1111 <entry>static</entry>
1120 <title>Haskell pre-processor options</title>
1122 <para><xref linkend="pre-processor"/></para>
1125 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1129 <entry>Description</entry>
1130 <entry>Static/Dynamic</entry>
1131 <entry>Reverse</entry>
1136 <entry><option>-F</option></entry>
1138 Enable the use of a pre-processor
1139 (set with <option>-pgmF</option>)
1141 <entry>dynamic</entry>
1150 <title>C pre-processor options</title>
1152 <para><xref linkend="c-pre-processor"/></para>
1155 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1159 <entry>Description</entry>
1160 <entry>Static/Dynamic</entry>
1161 <entry>Reverse</entry>
1166 <entry><option>-cpp</option></entry>
1167 <entry>Run the C pre-processor on Haskell source files</entry>
1168 <entry>dynamic</entry>
1172 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1173 <entry>Define a symbol in the C pre-processor</entry>
1174 <entry>dynamic</entry>
1175 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1178 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1179 <entry>Undefine a symbol in the C pre-processor</entry>
1180 <entry>dynamic</entry>
1184 <entry><option>-I</option><replaceable>dir</replaceable></entry>
1185 <entry>Add <replaceable>dir</replaceable> to the
1186 directory search list for <literal>#include</literal> files</entry>
1187 <entry>dynamic</entry>
1196 <title>C compiler options</title>
1198 <para><xref linkend="options-C-compiler"/></para>
1200 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1204 <entry>Description</entry>
1205 <entry>Static/Dynamic</entry>
1206 <entry>Reverse</entry>
1211 <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1212 <entry>Include <replaceable>file</replaceable> when
1213 compiling the <filename>.hc</filename> file</entry>
1214 <entry>dynamic</entry>
1223 <title>Code generation options</title>
1225 <para><xref linkend="options-codegen"/></para>
1228 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1232 <entry>Description</entry>
1233 <entry>Static/Dynamic</entry>
1234 <entry>Reverse</entry>
1239 <entry><option>-fasm</option></entry>
1240 <entry>Use the native code generator</entry>
1241 <entry>dynamic</entry>
1242 <entry>-fvia-C</entry>
1245 <entry><option>-fvia-C</option></entry>
1246 <entry>Compile via C</entry>
1247 <entry>dynamic</entry>
1248 <entry>-fasm</entry>
1251 <entry><option>-fno-code</option></entry>
1252 <entry>Omit code generation</entry>
1262 <title>Linking options</title>
1264 <para><xref linkend="options-linker"/></para>
1267 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1271 <entry>Description</entry>
1272 <entry>Static/Dynamic</entry>
1273 <entry>Reverse</entry>
1278 <entry><option>-fPIC</option></entry>
1279 <entry>Generate position-independent code (where available)</entry>
1280 <entry>static</entry>
1284 <entry><option>-dynamic</option></entry>
1285 <entry>Use dynamic Haskell libraries (if available)</entry>
1286 <entry>static</entry>
1290 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1291 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1292 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1293 <entry>dynamic</entry>
1297 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1298 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1299 directories searched for frameworks.
1300 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1301 <entry>dynamic</entry>
1305 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1306 <entry>Link in library <replaceable>lib</replaceable></entry>
1307 <entry>dynamic</entry>
1311 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1312 <entry>Add <replaceable>dir</replaceable> to the list of
1313 directories searched for libraries</entry>
1314 <entry>dynamic</entry>
1318 <entry><option>-main-is</option></entry>
1319 <entry>Set main function</entry>
1320 <entry>dynamic</entry>
1324 <entry><option>--mk-dll</option></entry>
1325 <entry>DLL-creation mode (Windows only)</entry>
1326 <entry>dynamic</entry>
1330 <entry><option>-no-hs-main</option></entry>
1331 <entry>Don't assume this program contains <literal>main</literal></entry>
1332 <entry>dynamic</entry>
1336 <entry><option>-no-link</option></entry>
1337 <entry>Omit linking</entry>
1338 <entry>dynamic</entry>
1342 <entry><option>-split-objs</option></entry>
1343 <entry>Split objects (for libraries)</entry>
1344 <entry>dynamic</entry>
1348 <entry><option>-static</option></entry>
1349 <entry>Use static Haskell libraries</entry>
1350 <entry>static</entry>
1354 <entry><option>-threaded</option></entry>
1355 <entry>Use the threaded runtime</entry>
1356 <entry>static</entry>
1360 <entry><option>-debug</option></entry>
1361 <entry>Use the debugging runtime</entry>
1362 <entry>static</entry>
1371 <title>Replacing phases</title>
1373 <para><xref linkend="replacing-phases"/></para>
1376 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1380 <entry>Description</entry>
1381 <entry>Static/Dynamic</entry>
1382 <entry>Reverse</entry>
1387 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1388 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1389 <entry>dynamic</entry>
1393 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1394 <entry>Use <replaceable>cmd</replaceable> as the C
1395 pre-processor (with <option>-cpp</option> only)</entry>
1396 <entry>dynamic</entry>
1400 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1401 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1402 <entry>dynamic</entry>
1406 <entry><option>-pgmm</option> <replaceable>cmd</replaceable></entry>
1407 <entry>Use <replaceable>cmd</replaceable> as the mangler</entry>
1408 <entry>dynamic</entry>
1412 <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
1413 <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
1414 <entry>dynamic</entry>
1418 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1419 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1420 <entry>dynamic</entry>
1424 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1425 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1426 <entry>dynamic</entry>
1430 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1431 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1432 <entry>dynamic</entry>
1436 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1437 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1438 (with <option>-F</option> only)</entry>
1439 <entry>dynamic</entry>
1445 <indexterm><primary><option>-pgmL</option></primary></indexterm>
1446 <indexterm><primary><option>-pgmP</option></primary></indexterm>
1447 <indexterm><primary><option>-pgmc</option></primary></indexterm>
1448 <indexterm><primary><option>-pgma</option></primary></indexterm>
1449 <indexterm><primary><option>-pgml</option></primary></indexterm>
1450 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1451 <indexterm><primary><option>-pgmF</option></primary></indexterm>
1456 <title>Forcing options to particular phases</title>
1458 <para><xref linkend="forcing-options-through"/></para>
1461 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1465 <entry>Description</entry>
1466 <entry>Static/Dynamic</entry>
1467 <entry>Reverse</entry>
1472 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1473 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1474 <entry>dynamic</entry>
1478 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1479 <entry>pass <replaceable>option</replaceable> to cpp (with
1480 <option>-cpp</option> only)</entry>
1481 <entry>dynamic</entry>
1485 <entry><option>-optF</option> <replaceable>option</replaceable></entry>
1486 <entry>pass <replaceable>option</replaceable> to the
1487 custom pre-processor</entry>
1488 <entry>dynamic</entry>
1492 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1493 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1494 <entry>dynamic</entry>
1498 <entry><option>-optm</option> <replaceable>option</replaceable></entry>
1499 <entry>pass <replaceable>option</replaceable> to the mangler</entry>
1500 <entry>dynamic</entry>
1504 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1505 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1506 <entry>dynamic</entry>
1510 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1511 <entry>pass <replaceable>option</replaceable> to the linker</entry>
1512 <entry>dynamic</entry>
1516 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1517 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1518 <entry>dynamic</entry>
1522 <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1523 <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1524 <entry>dynamic</entry>
1533 <title>Platform-specific options</title>
1535 <para><xref linkend="options-platform"/></para>
1538 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1542 <entry>Description</entry>
1543 <entry>Static/Dynamic</entry>
1544 <entry>Reverse</entry>
1549 <entry><option>-monly-[432]-regs</option></entry>
1550 <entry>(x86 only) give some registers back to the C compiler</entry>
1551 <entry>dynamic</entry>
1561 <title>External core file options</title>
1563 <para><xref linkend="ext-core"/></para>
1566 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1570 <entry>Description</entry>
1571 <entry>Static/Dynamic</entry>
1572 <entry>Reverse</entry>
1577 <entry><option>-fext-core</option></entry>
1578 <entry>Generate <filename>.hcr</filename> external Core files</entry>
1579 <entry>static</entry>
1589 <title>Compiler debugging options</title>
1591 <para><xref linkend="options-debugging"/></para>
1594 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1598 <entry>Description</entry>
1599 <entry>Static/Dynamic</entry>
1600 <entry>Reverse</entry>
1605 <entry><option>-dcore-lint</option></entry>
1606 <entry>Turn on internal sanity checking</entry>
1607 <entry>dynamic</entry>
1611 <entry><option>-ddump-asm</option></entry>
1612 <entry>Dump assembly</entry>
1613 <entry>dynamic</entry>
1617 <entry><option>-ddump-bcos</option></entry>
1618 <entry>Dump interpreter byte code</entry>
1619 <entry>dynamic</entry>
1623 <entry><option>-ddump-cmm</option></entry>
1624 <entry>Dump C-- output</entry>
1625 <entry>dynamic</entry>
1629 <entry><option>-ddump-cpranal</option></entry>
1630 <entry>Dump output from CPR analysis</entry>
1631 <entry>dynamic</entry>
1635 <entry><option>-ddump-cse</option></entry>
1636 <entry>Dump CSE output</entry>
1637 <entry>dynamic</entry>
1641 <entry><option>-ddump-deriv</option></entry>
1642 <entry>Dump deriving output</entry>
1643 <entry>dynamic</entry>
1647 <entry><option>-ddump-ds</option></entry>
1648 <entry>Dump desugarer output</entry>
1649 <entry>dynamic</entry>
1653 <entry><option>-ddump-flatC</option></entry>
1654 <entry>Dump “flat” C</entry>
1655 <entry>dynamic</entry>
1659 <entry><option>-ddump-foreign</option></entry>
1660 <entry>Dump <literal>foreign export</literal> stubs</entry>
1661 <entry>dynamic</entry>
1665 <entry><option>-ddump-inlinings</option></entry>
1666 <entry>Dump inlining info</entry>
1667 <entry>dynamic</entry>
1671 <entry><option>-ddump-occur-anal</option></entry>
1672 <entry>Dump occurrence analysis output</entry>
1673 <entry>dynamic</entry>
1677 <entry><option>-ddump-opt-cmm</option></entry>
1678 <entry>Dump the results of C-- to C-- optimising passes</entry>
1679 <entry>dynamic</entry>
1683 <entry><option>-ddump-parsed</option></entry>
1684 <entry>Dump parse tree</entry>
1685 <entry>dynamic</entry>
1689 <entry><option>-ddump-prep</option></entry>
1690 <entry>Dump prepared core</entry>
1691 <entry>dynamic</entry>
1695 <entry><option>-ddump-rn</option></entry>
1696 <entry>Dump renamer output</entry>
1697 <entry>dynamic</entry>
1701 <entry><option>-ddump-rules</option></entry>
1702 <entry>Dump rules</entry>
1703 <entry>dynamic</entry>
1707 <entry><option>-ddump-simpl</option></entry>
1708 <entry>Dump final simplifier output</entry>
1709 <entry>dynamic</entry>
1713 <entry><option>-ddump-simpl-iterations</option></entry>
1714 <entry>Dump output from each simplifier iteration</entry>
1715 <entry>dynamic</entry>
1719 <entry><option>-ddump-spec</option></entry>
1720 <entry>Dump specialiser output</entry>
1721 <entry>dynamic</entry>
1725 <entry><option>-ddump-splices</option></entry>
1726 <entry>Dump TH splided expressions, and what they evaluate to</entry>
1727 <entry>dynamic</entry>
1731 <entry><option>-ddump-stg</option></entry>
1732 <entry>Dump final STG</entry>
1733 <entry>dynamic</entry>
1737 <entry><option>-ddump-stranal</option></entry>
1738 <entry>Dump strictness analyser output</entry>
1739 <entry>dynamic</entry>
1743 <entry><option>-ddump-tc</option></entry>
1744 <entry>Dump typechecker output</entry>
1745 <entry>dynamic</entry>
1749 <entry><option>-ddump-types</option></entry>
1750 <entry>Dump type signatures</entry>
1751 <entry>dynamic</entry>
1755 <entry><option>-ddump-worker-wrapper</option></entry>
1756 <entry>Dump worker-wrapper output</entry>
1757 <entry>dynamic</entry>
1761 <entry><option>-ddump-if-trace</option></entry>
1762 <entry>Trace interface files</entry>
1763 <entry>dynamic</entry>
1767 <entry><option>-ddump-tc-trace</option></entry>
1768 <entry>Trace typechecker</entry>
1769 <entry>dynamic</entry>
1773 <entry><option>-ddump-rn-trace</option></entry>
1774 <entry>Trace renamer</entry>
1775 <entry>dynamic</entry>
1779 <entry><option>-ddump-rn-stats</option></entry>
1780 <entry>Renamer stats</entry>
1781 <entry>dynamic</entry>
1785 <entry><option>-ddump-simpl-stats</option></entry>
1786 <entry>Dump simplifier stats</entry>
1787 <entry>dynamic</entry>
1791 <entry><option>-dppr-debug</option></entry>
1792 <entry>Turn on debug printing (more verbose)</entry>
1793 <entry>static</entry>
1797 <entry><option>-dppr-noprags</option></entry>
1798 <entry>Don't output pragma info in dumps</entry>
1799 <entry>static</entry>
1803 <entry><option>-dppr-user-length</option></entry>
1804 <entry>Set the depth for printing expressions in error msgs</entry>
1805 <entry>static</entry>
1809 <entry><option>-dsource-stats</option></entry>
1810 <entry>Dump haskell source stats</entry>
1811 <entry>dynamic</entry>
1815 <entry><option>-dcmm-lint</option></entry>
1816 <entry>C-- pass sanity checking</entry>
1817 <entry>dynamic</entry>
1821 <entry><option>-dstg-lint</option></entry>
1822 <entry>STG pass sanity checking</entry>
1823 <entry>dynamic</entry>
1827 <entry><option>-dstg-stats</option></entry>
1828 <entry>Dump STG stats</entry>
1829 <entry>dynamic</entry>
1833 <entry><option>-dverbose-core2core</option></entry>
1834 <entry>Show output from each core-to-core pass</entry>
1835 <entry>dynamic</entry>
1839 <entry><option>-dverbose-stg2stg</option></entry>
1840 <entry>Show output from each STG-to-STG pass</entry>
1841 <entry>dynamic</entry>
1845 <entry><option>-dshow-passes</option></entry>
1846 <entry>Print out each pass name as it happens</entry>
1847 <entry>dynamic</entry>
1851 <entry><option>-dfaststring-stats</option></entry>
1852 <entry>Show statistics for fast string usage when finished</entry>
1853 <entry>dynamic</entry>
1857 <entry><option>-unreg</option></entry>
1858 <entry>Enable unregisterised compilation</entry>
1859 <entry>static</entry>
1868 <title>Misc compiler options</title>
1871 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1875 <entry>Description</entry>
1876 <entry>Static/Dynamic</entry>
1877 <entry>Reverse</entry>
1882 <entry><option>-fno-hi-version-check</option></entry>
1883 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1884 <entry>static</entry>
1888 <entry><option>-dno-black-holing</option></entry>
1889 <entry>Turn off black holing (probably doesn't work)</entry>
1890 <entry>static</entry>
1894 <entry><option>-fno-method-sharing</option></entry>
1895 <entry>Don't share specialisations of overloaded functions</entry>
1896 <entry>static</entry>
1900 <entry><option>-fhistory-size</option></entry>
1901 <entry>Set simplification history size</entry>
1902 <entry>static</entry>
1906 <entry><option>-funregisterised</option></entry>
1907 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1908 <entry>static</entry>
1912 <entry><option>-fno-asm-mangling</option></entry>
1913 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1914 <entry>dynamic</entry>
1918 <entry><option>-fno-print-bind-result</option></entry>
1919 <entry><link linkend="ghci-stmts">Turn off printing of binding results in GHCi</link></entry>
1920 <entry>dynamic</entry>
1934 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
1940 ;;; Local Variables: ***
1942 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***