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>;
173 see <xref linkend="ghci"/> for details.</entry>
178 <entry><option>--make</option></entry>
179 <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>;
180 see <xref linkend="make-mode"/> for details..</entry>
185 <entry><option>-e <replaceable>expr</replaceable></option></entry>
186 <entry>Evaluate <replaceable>expr</replaceable>;
187 see <xref linkend="eval-mode"/> for details.</entry>
192 <entry><option>-M</option></entry>
193 <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>;
194 see <xref linkend="makefile-dependencies"/> for details.</entry>
204 <title>Redirecting output</title>
206 <para><xref linkend="options-output"/></para>
209 <tgroup cols="4" align="left" colsep="1" rowsep="1">
213 <entry>Description</entry>
214 <entry>Static/Dynamic</entry>
215 <entry>Reverse</entry>
220 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
221 <entry>set the suffix to use for intermediate C files</entry>
222 <entry>dynamic</entry>
226 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
227 <entry>set directory for interface files</entry>
228 <entry>dynamic</entry>
232 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
233 <entry>set the suffix to use for interface files</entry>
234 <entry>dynamic</entry>
238 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
239 <entry>set output filename</entry>
240 <entry>dynamic</entry>
244 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
245 <entry>set output directory</entry>
246 <entry>dynamic</entry>
250 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
251 <entry>set the filename in which to put the interface</entry>
252 <entry>dynamic</entry>
256 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
257 <entry>set the output file suffix</entry>
258 <entry>dynamic</entry>
262 <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
263 <entry>redirect FFi stub files</entry>
264 <entry>dynamic</entry>
273 <title>Keeping intermediate files</title>
275 <para><xref linkend="keeping-intermediates"/></para>
278 <tgroup cols="4" align="left" colsep="1" rowsep="1">
282 <entry>Description</entry>
283 <entry>Static/Dynamic</entry>
284 <entry>Reverse</entry>
289 <entry><option>-keep-hc-file</option></entry>
290 <entry>retain intermediate <literal>.hc</literal> files</entry>
291 <entry>dynamic</entry>
295 <entry><option>-keep-s-file</option></entry>
296 <entry>retain intermediate <literal>.s</literal> files</entry>
297 <entry>dynamic</entry>
301 <entry><option>-keep-raw-s-file</option></entry>
302 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
303 <entry>dynamic</entry>
307 <entry><option>-keep-tmp-files</option></entry>
308 <entry>retain all intermediate temporary files</entry>
309 <entry>dynamic</entry>
318 <title>Temporary files</title>
320 <para><xref linkend="temp-files"/></para>
323 <tgroup cols="4" align="left" colsep="1" rowsep="1">
327 <entry>Description</entry>
328 <entry>Static/Dynamic</entry>
329 <entry>Reverse</entry>
334 <entry><option>-tmpdir</option></entry>
335 <entry>set the directory for temporary files</entry>
336 <entry>dynamic</entry>
345 <title>Finding imports</title>
347 <para><xref linkend="search-path"/></para>
350 <tgroup cols="4" align="left" colsep="1" rowsep="1">
355 <entry>Description</entry>
356 <entry>Static/Dynamic</entry>
357 <entry>Reverse</entry>
362 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
363 <entry>add <replaceable>dir</replaceable>,
364 <replaceable>dir2</replaceable>, etc. to import path</entry>
365 <entry>static/<literal>:set</literal></entry>
369 <entry><option>-i</option></entry>
370 <entry>Empty the import directory list</entry>
371 <entry>static/<literal>:set</literal></entry>
380 <title>Interface file options</title>
382 <para><xref linkend="hi-options"/></para>
385 <tgroup cols="4" align="left" colsep="1" rowsep="1">
390 <entry>Description</entry>
391 <entry>Static/Dynamic</entry>
392 <entry>Reverse</entry>
397 <entry><option>-ddump-hi</option></entry>
398 <entry>Dump the new interface to stdout</entry>
399 <entry>dynamic</entry>
403 <entry><option>-ddump-hi-diffs</option></entry>
404 <entry>Show the differences vs. the old interface</entry>
405 <entry>dynamic</entry>
409 <entry><option>-ddump-minimal-imports</option></entry>
410 <entry>Dump a minimal set of imports</entry>
411 <entry>dynamic</entry>
415 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
416 <entry>Read the interface in
417 <replaceable>file</replaceable> and dump it as text to
418 <literal>stdout</literal>.</entry>
428 <title>Recompilation checking</title>
430 <para><xref linkend="recomp"/></para>
433 <tgroup cols="4" align="left" colsep="1" rowsep="1">
438 <entry>Description</entry>
439 <entry>Static/Dynamic</entry>
440 <entry>Reverse</entry>
445 <entry><option>-fforce-recomp</option></entry>
446 <entry>Turn off recompilation checking; implied by any
447 <option>-ddump-X</option> option</entry>
448 <entry>dynamic</entry>
449 <entry><option>-fno-force-recomp</option></entry>
457 <title>Interactive-mode options</title>
459 <para><xref linkend="ghci-dot-files"/></para>
462 <tgroup cols="4" align="left" colsep="1" rowsep="1">
466 <entry>Description</entry>
467 <entry>Static/Dynamic</entry>
468 <entry>Reverse</entry>
473 <entry><option>-ignore-dot-ghci</option></entry>
474 <entry>Disable reading of <filename>.ghci</filename> files</entry>
475 <entry>static</entry>
479 <entry><option>-read-dot-ghci</option></entry>
480 <entry>Enable reading of <filename>.ghci</filename> files</entry>
481 <entry>static</entry>
485 <entry><option>-fdebugging</option></entry>
486 <entry>Generate bytecode enabled for debugging</entry>
487 <entry>dynamic</entry>
491 <entry><option>-fno-debugging</option></entry>
492 <entry>Do not include debugging information in bytecodes</entry>
493 <entry>dynamic</entry>
497 <entry><option>-fno-print-bind-result</option></entry>
498 <entry><link linkend="ghci-stmts">Turn off printing of binding results in GHCi</link></entry>
499 <entry>dynamic</entry>
508 <title>Packages</title>
510 <para><xref linkend="packages"/></para>
513 <tgroup cols="4" align="left" colsep="1" rowsep="1">
517 <entry>Description</entry>
518 <entry>Static/Dynamic</entry>
519 <entry>Reverse</entry>
524 <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
525 <entry>Compile to be part of package <replaceable>P</replaceable></entry>
526 <entry>dynamic</entry>
530 <entry><option>-package</option> <replaceable>P</replaceable></entry>
531 <entry>Expose package <replaceable>P</replaceable></entry>
532 <entry>static/<literal>:set</literal></entry>
536 <entry><option>-hide-all-packages</option></entry>
537 <entry>Hide all packages by default</entry>
538 <entry>static</entry>
542 <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
543 <entry>Hide package <replaceable>P</replaceable></entry>
544 <entry>static/<literal>:set</literal></entry>
548 <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
549 <entry>Ignore package <replaceable>P</replaceable></entry>
550 <entry>static/<literal>:set</literal></entry>
554 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
555 <entry>Load more packages from <replaceable>file</replaceable></entry>
556 <entry>static</entry>
560 <entry><option>-no-user-package-conf</option></entry>
561 <entry>Don't load the user's package config file.</entry>
562 <entry>static</entry>
571 <title>Language options</title>
573 <para><xref linkend="options-language"/></para>
576 <tgroup cols="4" align="left" colsep="1" rowsep="1">
580 <entry>Description</entry>
581 <entry>Static/Dynamic</entry>
582 <entry>Reverse</entry>
587 <entry><option>-fallow-overlapping-instances</option></entry>
588 <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
589 <entry>dynamic</entry>
590 <entry><option>-fno-allow-overlapping-instances</option></entry>
593 <entry><option>-fallow-incoherent-instances</option></entry>
594 <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.
595 Implies <option>-fallow-overlapping-instances</option> </entry>
596 <entry>dynamic</entry>
597 <entry><option>-fno-allow-incoherent-instances</option></entry>
600 <entry><option>-fallow-undecidable-instances</option></entry>
601 <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
602 <entry>dynamic</entry>
603 <entry><option>-fno-allow-undecidable-instances</option></entry>
606 <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
607 <entry>set the <link linkend="undecidable-instances">limit for context reduction</link></entry>
608 <entry>dynamic</entry>
609 <entry><option>20</option></entry>
612 <entry><option>-farrows</option></entry>
613 <entry>Enable <link linkend="arrow-notation">arrow
614 notation</link> extension</entry>
615 <entry>dynamic</entry>
616 <entry><option>-fno-arrows</option></entry>
619 <entry><option>-ffi</option> or <option>-fffi</option></entry>
620 <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
621 <option>-fglasgow-exts</option>)</entry>
622 <entry>dynamic</entry>
623 <entry><option>-fno-ffi</option></entry>
626 <entry><option>-fgenerics</option></entry>
627 <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
628 <entry>dynamic</entry>
629 <entry><option>-fno-fgenerics</option></entry>
632 <entry><option>-fglasgow-exts</option></entry>
633 <entry>Enable most language extensions</entry>
634 <entry>dynamic</entry>
635 <entry><option>-fno-glasgow-exts</option></entry>
638 <entry><option>-fimplicit-params</option></entry>
639 <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
640 Implied by <option>-fglasgow-exts</option>.</entry>
641 <entry>dynamic</entry>
642 <entry><option>-fno-implicit-params</option></entry>
645 <entry><option>-firrefutable-tuples</option></entry>
646 <entry>Make tuple pattern matching irrefutable</entry>
647 <entry>dynamic</entry>
648 <entry><option>-fno-irrefutable-tuples</option></entry>
651 <entry><option>-fno-implicit-prelude</option></entry>
652 <entry>Don't implicitly <literal>import Prelude</literal></entry>
653 <entry>dynamic</entry>
654 <entry><option>-fimplicit-prelude</option></entry>
657 <entry><option>-fno-monomorphism-restriction</option></entry>
658 <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
659 <entry>dynamic</entry>
660 <entry><option>-fmonomorphism-restriction</option></entry>
663 <entry><option>-fno-mono-pat-binds</option></entry>
664 <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
665 <entry>dynamic</entry>
666 <entry><option>-fmono-pat-binds</option></entry>
669 <entry><option>-fextended-default-rules</option></entry>
670 <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
671 <entry>dynamic</entry>
672 <entry><option>-fno-extended-default-rules</option></entry>
675 <entry><option>-foverloaded-strings</option></entry>
676 <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
678 <entry>dynamic</entry>
679 <entry><option>-fno-overloaded-strings</option></entry>
682 <entry><option>-fscoped-type-variables</option></entry>
683 <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
684 Implied by <option>-fglasgow-exts</option>.</entry>
685 <entry>dynamic</entry>
686 <entry><option>-fno-scoped-type-variables</option></entry>
689 <entry><option>-fth</option></entry>
690 <entry>Enable <link linkend="template-haskell">Template Haskell</link>.
691 No longer implied by <option>-fglasgow-exts</option>.</entry>
692 <entry>dynamic</entry>
693 <entry><option>-fno-th</option></entry>
696 <entry><option>-fbang-patterns</option></entry>
697 <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
698 <entry>dynamic</entry>
699 <entry><option>-fno-bang-patterns</option></entry>
707 <title>Warnings</title>
709 <para><xref linkend="options-sanity"/></para>
712 <tgroup cols="4" align="left" colsep="1" rowsep="1">
716 <entry>Description</entry>
717 <entry>Static/Dynamic</entry>
718 <entry>Reverse</entry>
723 <entry><option>-W</option></entry>
724 <entry>enable normal warnings</entry>
725 <entry>dynamic</entry>
726 <entry><option>-w</option></entry>
729 <entry><option>-w</option></entry>
730 <entry>disable all warnings</entry>
731 <entry>dynamic</entry>
735 <entry><option>-Wall</option></entry>
736 <entry>enable all warnings</entry>
737 <entry>dynamic</entry>
738 <entry><option>-w</option></entry>
741 <entry><option>-Werror</option></entry>
742 <entry>make warnings fatal</entry>
743 <entry>dynamic</entry>
748 <entry><option>-fwarn-deprecations</option></entry>
749 <entry>warn about uses of functions & types that are deprecated</entry>
750 <entry>dynamic</entry>
751 <entry><option>-fno-warn-deprecations</option></entry>
755 <entry><option>-fwarn-duplicate-exports</option></entry>
756 <entry>warn when an entity is exported multiple times</entry>
757 <entry>dynamic</entry>
758 <entry><option>-fno-warn-duplicate-exports</option></entry>
762 <entry><option>-fwarn-hi-shadowing</option></entry>
763 <entry>warn when a <literal>.hi</literal> file in the
764 current directory shadows a library</entry>
765 <entry>dynamic</entry>
766 <entry><option>-fno-warn-hi-shadowing</option></entry>
770 <entry><option>-fwarn-incomplete-patterns</option></entry>
771 <entry>warn when a pattern match could fail</entry>
772 <entry>dynamic</entry>
773 <entry><option>-fno-warn-incomplete-patterns</option></entry>
777 <entry><option>-fwarn-incomplete-record-updates</option></entry>
778 <entry>warn when a record update could fail</entry>
779 <entry>dynamic</entry>
780 <entry><option>-fno-warn-incomplete-record-updates</option></entry>
784 <entry><option>-fwarn-missing-fields</option></entry>
785 <entry>warn when fields of a record are uninitialised</entry>
786 <entry>dynamic</entry>
787 <entry><option>-fno-warn-missing-fields</option></entry>
791 <entry><option>-fwarn-missing-methods</option></entry>
792 <entry>warn when class methods are undefined</entry>
793 <entry>dynamic</entry>
794 <entry><option>-fno-warn-missing-methods</option></entry>
798 <entry><option>-fwarn-missing-signatures</option></entry>
799 <entry>warn about top-level functions without signatures</entry>
800 <entry>dynamic</entry>
801 <entry><option>-fno-warn-missing-signatures</option></entry>
805 <entry><option>-fwarn-name-shadowing</option></entry>
806 <entry>warn when names are shadowed</entry>
807 <entry>dynamic</entry>
808 <entry><option>-fno-warn-name-shadowing</option></entry>
812 <entry><option>-fwarn-orphans</option></entry>
813 <entry>warn when the module contains "orphan" instance declarations
814 or rewrite rules</entry>
815 <entry>dynamic</entry>
816 <entry><option>-fno-warn-orphans</option></entry>
820 <entry><option>-fwarn-overlapping-patterns</option></entry>
821 <entry>warn about overlapping patterns</entry>
822 <entry>dynamic</entry>
823 <entry><option>-fno-warn-overlapping-patterns</option></entry>
827 <entry><option>-fwarn-simple-patterns</option></entry>
828 <entry>warn about lambda-patterns that can fail</entry>
829 <entry>dynamic</entry>
830 <entry><option>-fno-warn-simple-patterns</option></entry>
834 <entry><option>-fwarn-tabs</option></entry>
835 <entry>warn if there are tabs in the source file</entry>
836 <entry>dynamic</entry>
837 <entry><option>-fno-warn-tabs</option></entry>
841 <entry><option>-fwarn-type-defaults</option></entry>
842 <entry>warn when defaulting happens</entry>
843 <entry>dynamic</entry>
844 <entry><option>-fno-warn-type-defaults</option></entry>
848 <entry><option>-fwarn-monomorphism-restriction</option></entry>
849 <entry>warn when the Monomorphism Restriction is applied</entry>
850 <entry>dynamic</entry>
851 <entry><option>-fno-warn-monomorphism-restriction</option></entry>
855 <entry><option>-fwarn-unused-binds</option></entry>
856 <entry>warn about bindings that are unused</entry>
857 <entry>dynamic</entry>
858 <entry><option>-fno-warn-unused-binds</option></entry>
862 <entry><option>-fwarn-unused-imports</option></entry>
863 <entry>warn about unnecessary imports</entry>
864 <entry>dynamic</entry>
865 <entry><option>-fno-warn-unused-imports</option></entry>
869 <entry><option>-fwarn-unused-matches</option></entry>
870 <entry>warn about variables in patterns that aren't used</entry>
871 <entry>dynamic</entry>
872 <entry><option>-fno-warn-unused-matches</option></entry>
881 <title>Optimisation levels</title>
883 <para><xref linkend="options-optimise"/></para>
886 <tgroup cols="4" align="left" colsep="1" rowsep="1">
890 <entry>Description</entry>
891 <entry>Static/Dynamic</entry>
892 <entry>Reverse</entry>
897 <entry><option>-O</option></entry>
898 <entry>Enable default optimisation (level 1)</entry>
899 <entry>dynamic</entry>
900 <entry><option>-O0</option></entry>
903 <entry><option>-O</option><replaceable>n</replaceable></entry>
904 <entry>Set optimisation level <replaceable>n</replaceable></entry>
905 <entry>dynamic</entry>
906 <entry><option>-O0</option></entry>
914 <title>Individual optimisations</title>
916 <para><xref linkend="options-f"/></para>
919 <tgroup cols="4" align="left" colsep="1" rowsep="1">
923 <entry>Description</entry>
924 <entry>Static/Dynamic</entry>
925 <entry>Reverse</entry>
930 <entry><option>-fcase-merge</option></entry>
931 <entry>Enable case-merging</entry>
932 <entry>dynamic</entry>
933 <entry><option>-fno-case-merge</option></entry>
937 <entry><option>-fdicts-strict</option></entry>
938 <entry>Make dictionaries strict</entry>
939 <entry>static</entry>
940 <entry><option>-fno-dicts-strict</option></entry>
944 <entry><option>-fdo-eta-reduction</option></entry>
945 <entry>Enable eta-reduction</entry>
946 <entry>dynamic</entry>
947 <entry><option>-fno-do-eta-reduction</option></entry>
951 <entry><option>-fdo-lambda-eta-expansion</option></entry>
952 <entry>Enable lambda eta-reduction</entry>
953 <entry>dynamic</entry>
954 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
958 <entry><option>-fexcess-precision</option></entry>
959 <entry>Enable excess intermediate precision</entry>
960 <entry>dynamic</entry>
961 <entry><option>-fno-excess-precision</option></entry>
965 <entry><option>-frules-off</option></entry>
966 <entry>Switch off all rewrite rules (including rules
967 generated by automatic specialisation of overloaded functions)</entry>
968 <entry>static</entry>
969 <entry><option>-frules-off</option></entry>
973 <entry><option>-fignore-asserts</option></entry>
974 <entry>Ignore assertions in the source</entry>
975 <entry>dynamic</entry>
976 <entry><option>-fno-ignore-asserts</option></entry>
980 <entry><option>-fignore-interface-pragmas</option></entry>
981 <entry>Ignore pragmas in interface files</entry>
982 <entry>dynamic</entry>
983 <entry><option>-fno-ignore-interface-pragmas</option></entry>
987 <entry><option>-fliberate-case-threshold</option></entry>
988 <entry>Tweak the liberate-case optimisation (default: 10)</entry>
989 <entry>static</entry>
990 <entry><option>-fno-liberate-case-threshold</option></entry>
994 <entry><option>-fomit-interface-pragmas</option></entry>
995 <entry>Don't generate interface pragmas</entry>
996 <entry>dynamic</entry>
997 <entry><option>-fno-omit-interface-pragmas</option></entry>
1001 <entry><option>-fmax-worker-args</option></entry>
1002 <entry>If a worker has that many arguments, none will be
1003 unpacked anymore (default: 10)</entry>
1004 <entry>static</entry>
1009 <entry><option>-fmax-simplifier-iterations</option></entry>
1010 <entry>Set the max iterations for the simplifier</entry>
1011 <entry>dynamic</entry>
1016 <entry><option>-fno-state-hack</option></entry>
1017 <entry>Turn off the "state hack" whereby any lambda with a real-world state token
1018 as argument is considered to be single-entry. Hence OK to inline things inside it.</entry>
1019 <entry>static</entry>
1024 <entry><option>-fno-cse</option></entry>
1025 <entry>Turn off common sub-expression</entry>
1026 <entry>dynamic</entry>
1031 <entry><option>-fno-full-laziness</option></entry>
1032 <entry>Turn off full laziness (floating bindings outwards).</entry>
1033 <entry>dynamic</entry>
1034 <entry>-ffull-laziness</entry>
1038 <entry><option>-fno-pre-inlining</option></entry>
1039 <entry>Turn off pre-inlining</entry>
1040 <entry>static</entry>
1045 <entry><option>-fno-strictness</option></entry>
1046 <entry>Turn off strictness analysis</entry>
1047 <entry>dynamic</entry>
1052 <entry><option>-funbox-strict-fields</option></entry>
1053 <entry>Flatten strict constructor fields</entry>
1054 <entry>dynamic</entry>
1055 <entry><option>-fno-unbox-strict-fields</option></entry>
1059 <entry><option>-funfolding-creation-threshold</option></entry>
1060 <entry>Tweak unfolding settings</entry>
1061 <entry>static</entry>
1062 <entry><option>-fno-unfolding-creation-threshold</option></entry>
1066 <entry><option>-funfolding-fun-discount</option></entry>
1067 <entry>Tweak unfolding settings</entry>
1068 <entry>static</entry>
1069 <entry><option>-fno-unfolding-fun-discount</option></entry>
1073 <entry><option>-funfolding-keeness-factor</option></entry>
1074 <entry>Tweak unfolding settings</entry>
1075 <entry>static</entry>
1076 <entry><option>-fno-unfolding-keeness-factor</option></entry>
1080 <entry><option>-funfolding-update-in-place</option></entry>
1081 <entry>Tweak unfolding settings</entry>
1082 <entry>static</entry>
1083 <entry><option>-fno-unfolding-update-in-place</option></entry>
1087 <entry><option>-funfolding-use-threshold</option></entry>
1088 <entry>Tweak unfolding settings</entry>
1089 <entry>static</entry>
1090 <entry><option>-fno-unfolding-use-threshold</option></entry>
1098 <title>Profiling options</title>
1100 <para><xref linkend="profiling"/></para>
1103 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1107 <entry>Description</entry>
1108 <entry>Static/Dynamic</entry>
1109 <entry>Reverse</entry>
1114 <entry><option>-auto</option></entry>
1115 <entry>Auto-add <literal>_scc_</literal>s to all
1116 exported functions</entry>
1117 <entry>static</entry>
1118 <entry><option>-no-auto</option></entry>
1121 <entry><option>-auto-all</option></entry>
1122 <entry>Auto-add <literal>_scc_</literal>s to all
1123 top-level functions</entry>
1124 <entry>static</entry>
1125 <entry><option>-no-auto-all</option></entry>
1128 <entry><option>-caf-all</option></entry>
1129 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1130 <entry>static</entry>
1131 <entry><option>-no-caf-all</option></entry>
1134 <entry><option>-prof</option></entry>
1135 <entry>Turn on profiling</entry>
1136 <entry>static</entry>
1140 <entry><option>-ticky</option></entry>
1141 <entry>Turn on ticky-ticky profiling</entry>
1142 <entry>static</entry>
1151 <title>Haskell pre-processor options</title>
1153 <para><xref linkend="pre-processor"/></para>
1156 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1160 <entry>Description</entry>
1161 <entry>Static/Dynamic</entry>
1162 <entry>Reverse</entry>
1167 <entry><option>-F</option></entry>
1169 Enable the use of a pre-processor
1170 (set with <option>-pgmF</option>)
1172 <entry>dynamic</entry>
1181 <title>C pre-processor options</title>
1183 <para><xref linkend="c-pre-processor"/></para>
1186 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1190 <entry>Description</entry>
1191 <entry>Static/Dynamic</entry>
1192 <entry>Reverse</entry>
1197 <entry><option>-cpp</option></entry>
1198 <entry>Run the C pre-processor on Haskell source files</entry>
1199 <entry>dynamic</entry>
1203 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1204 <entry>Define a symbol in the C pre-processor</entry>
1205 <entry>dynamic</entry>
1206 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1209 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1210 <entry>Undefine a symbol in the C pre-processor</entry>
1211 <entry>dynamic</entry>
1215 <entry><option>-I</option><replaceable>dir</replaceable></entry>
1216 <entry>Add <replaceable>dir</replaceable> to the
1217 directory search list for <literal>#include</literal> files</entry>
1218 <entry>dynamic</entry>
1227 <title>C compiler options</title>
1229 <para><xref linkend="options-C-compiler"/></para>
1231 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1235 <entry>Description</entry>
1236 <entry>Static/Dynamic</entry>
1237 <entry>Reverse</entry>
1242 <entry><option>-#include</option> <replaceable>file</replaceable></entry>
1243 <entry>Include <replaceable>file</replaceable> when
1244 compiling the <filename>.hc</filename> file</entry>
1245 <entry>dynamic</entry>
1254 <title>Code generation options</title>
1256 <para><xref linkend="options-codegen"/></para>
1259 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1263 <entry>Description</entry>
1264 <entry>Static/Dynamic</entry>
1265 <entry>Reverse</entry>
1270 <entry><option>-fasm</option></entry>
1271 <entry>Use the native code generator</entry>
1272 <entry>dynamic</entry>
1273 <entry>-fvia-C</entry>
1276 <entry><option>-fvia-C</option></entry>
1277 <entry>Compile via C</entry>
1278 <entry>dynamic</entry>
1279 <entry>-fasm</entry>
1282 <entry><option>-fno-code</option></entry>
1283 <entry>Omit code generation</entry>
1284 <entry>dynamic</entry>
1288 <entry><option>-fbyte-code</option></entry>
1289 <entry>Generate byte-code</entry>
1290 <entry>dynamic</entry>
1294 <entry><option>-fobject-code</option></entry>
1295 <entry>Generate object code</entry>
1296 <entry>dynamic</entry>
1305 <title>Linking options</title>
1307 <para><xref linkend="options-linker"/></para>
1310 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1314 <entry>Description</entry>
1315 <entry>Static/Dynamic</entry>
1316 <entry>Reverse</entry>
1321 <entry><option>-fPIC</option></entry>
1322 <entry>Generate position-independent code (where available)</entry>
1323 <entry>static</entry>
1327 <entry><option>-dynamic</option></entry>
1328 <entry>Use dynamic Haskell libraries (if available)</entry>
1329 <entry>static</entry>
1333 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1334 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1335 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1336 <entry>dynamic</entry>
1340 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1341 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1342 directories searched for frameworks.
1343 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1344 <entry>dynamic</entry>
1348 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1349 <entry>Link in library <replaceable>lib</replaceable></entry>
1350 <entry>dynamic</entry>
1354 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1355 <entry>Add <replaceable>dir</replaceable> to the list of
1356 directories searched for libraries</entry>
1357 <entry>dynamic</entry>
1361 <entry><option>-main-is</option></entry>
1362 <entry>Set main module and function</entry>
1363 <entry>dynamic</entry>
1367 <entry><option>--mk-dll</option></entry>
1368 <entry>DLL-creation mode (Windows only)</entry>
1369 <entry>dynamic</entry>
1373 <entry><option>-no-hs-main</option></entry>
1374 <entry>Don't assume this program contains <literal>main</literal></entry>
1375 <entry>dynamic</entry>
1379 <entry><option>-no-link</option></entry>
1380 <entry>Omit linking</entry>
1381 <entry>dynamic</entry>
1385 <entry><option>-split-objs</option></entry>
1386 <entry>Split objects (for libraries)</entry>
1387 <entry>dynamic</entry>
1391 <entry><option>-static</option></entry>
1392 <entry>Use static Haskell libraries</entry>
1393 <entry>static</entry>
1397 <entry><option>-threaded</option></entry>
1398 <entry>Use the threaded runtime</entry>
1399 <entry>static</entry>
1403 <entry><option>-debug</option></entry>
1404 <entry>Use the debugging runtime</entry>
1405 <entry>static</entry>
1414 <title>Replacing phases</title>
1416 <para><xref linkend="replacing-phases"/></para>
1419 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1423 <entry>Description</entry>
1424 <entry>Static/Dynamic</entry>
1425 <entry>Reverse</entry>
1430 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1431 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1432 <entry>dynamic</entry>
1436 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1437 <entry>Use <replaceable>cmd</replaceable> as the C
1438 pre-processor (with <option>-cpp</option> only)</entry>
1439 <entry>dynamic</entry>
1443 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1444 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1445 <entry>dynamic</entry>
1449 <entry><option>-pgmm</option> <replaceable>cmd</replaceable></entry>
1450 <entry>Use <replaceable>cmd</replaceable> as the mangler</entry>
1451 <entry>dynamic</entry>
1455 <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
1456 <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
1457 <entry>dynamic</entry>
1461 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1462 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
1463 <entry>dynamic</entry>
1467 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
1468 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
1469 <entry>dynamic</entry>
1473 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
1474 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
1475 <entry>dynamic</entry>
1479 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
1480 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
1481 (with <option>-F</option> only)</entry>
1482 <entry>dynamic</entry>
1488 <indexterm><primary><option>-pgmL</option></primary></indexterm>
1489 <indexterm><primary><option>-pgmP</option></primary></indexterm>
1490 <indexterm><primary><option>-pgmc</option></primary></indexterm>
1491 <indexterm><primary><option>-pgma</option></primary></indexterm>
1492 <indexterm><primary><option>-pgml</option></primary></indexterm>
1493 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
1494 <indexterm><primary><option>-pgmF</option></primary></indexterm>
1499 <title>Forcing options to particular phases</title>
1501 <para><xref linkend="forcing-options-through"/></para>
1504 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1508 <entry>Description</entry>
1509 <entry>Static/Dynamic</entry>
1510 <entry>Reverse</entry>
1515 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
1516 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
1517 <entry>dynamic</entry>
1521 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
1522 <entry>pass <replaceable>option</replaceable> to cpp (with
1523 <option>-cpp</option> only)</entry>
1524 <entry>dynamic</entry>
1528 <entry><option>-optF</option> <replaceable>option</replaceable></entry>
1529 <entry>pass <replaceable>option</replaceable> to the
1530 custom pre-processor</entry>
1531 <entry>dynamic</entry>
1535 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
1536 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
1537 <entry>dynamic</entry>
1541 <entry><option>-optm</option> <replaceable>option</replaceable></entry>
1542 <entry>pass <replaceable>option</replaceable> to the mangler</entry>
1543 <entry>dynamic</entry>
1547 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
1548 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
1549 <entry>dynamic</entry>
1553 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
1554 <entry>pass <replaceable>option</replaceable> to the linker</entry>
1555 <entry>dynamic</entry>
1559 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
1560 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
1561 <entry>dynamic</entry>
1565 <entry><option>-optdep</option> <replaceable>option</replaceable></entry>
1566 <entry>pass <replaceable>option</replaceable> to the dependency generator</entry>
1567 <entry>dynamic</entry>
1576 <title>Platform-specific options</title>
1578 <para><xref linkend="options-platform"/></para>
1581 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1585 <entry>Description</entry>
1586 <entry>Static/Dynamic</entry>
1587 <entry>Reverse</entry>
1592 <entry><option>-monly-[432]-regs</option></entry>
1593 <entry>(x86 only) give some registers back to the C compiler</entry>
1594 <entry>dynamic</entry>
1604 <title>External core file options</title>
1606 <para><xref linkend="ext-core"/></para>
1609 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1613 <entry>Description</entry>
1614 <entry>Static/Dynamic</entry>
1615 <entry>Reverse</entry>
1620 <entry><option>-fext-core</option></entry>
1621 <entry>Generate <filename>.hcr</filename> external Core files</entry>
1622 <entry>static</entry>
1632 <title>Compiler debugging options</title>
1634 <para><xref linkend="options-debugging"/></para>
1637 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1641 <entry>Description</entry>
1642 <entry>Static/Dynamic</entry>
1643 <entry>Reverse</entry>
1648 <entry><option>-dcore-lint</option></entry>
1649 <entry>Turn on internal sanity checking</entry>
1650 <entry>dynamic</entry>
1654 <entry><option>-ddump-asm</option></entry>
1655 <entry>Dump assembly</entry>
1656 <entry>dynamic</entry>
1660 <entry><option>-ddump-bcos</option></entry>
1661 <entry>Dump interpreter byte code</entry>
1662 <entry>dynamic</entry>
1666 <entry><option>-ddump-cmm</option></entry>
1667 <entry>Dump C-- output</entry>
1668 <entry>dynamic</entry>
1672 <entry><option>-ddump-cpranal</option></entry>
1673 <entry>Dump output from CPR analysis</entry>
1674 <entry>dynamic</entry>
1678 <entry><option>-ddump-cse</option></entry>
1679 <entry>Dump CSE output</entry>
1680 <entry>dynamic</entry>
1684 <entry><option>-ddump-deriv</option></entry>
1685 <entry>Dump deriving output</entry>
1686 <entry>dynamic</entry>
1690 <entry><option>-ddump-ds</option></entry>
1691 <entry>Dump desugarer output</entry>
1692 <entry>dynamic</entry>
1696 <entry><option>-ddump-flatC</option></entry>
1697 <entry>Dump “flat” C</entry>
1698 <entry>dynamic</entry>
1702 <entry><option>-ddump-foreign</option></entry>
1703 <entry>Dump <literal>foreign export</literal> stubs</entry>
1704 <entry>dynamic</entry>
1708 <entry><option>-ddump-inlinings</option></entry>
1709 <entry>Dump inlining info</entry>
1710 <entry>dynamic</entry>
1714 <entry><option>-ddump-occur-anal</option></entry>
1715 <entry>Dump occurrence analysis output</entry>
1716 <entry>dynamic</entry>
1720 <entry><option>-ddump-opt-cmm</option></entry>
1721 <entry>Dump the results of C-- to C-- optimising passes</entry>
1722 <entry>dynamic</entry>
1726 <entry><option>-ddump-parsed</option></entry>
1727 <entry>Dump parse tree</entry>
1728 <entry>dynamic</entry>
1732 <entry><option>-ddump-prep</option></entry>
1733 <entry>Dump prepared core</entry>
1734 <entry>dynamic</entry>
1738 <entry><option>-ddump-rn</option></entry>
1739 <entry>Dump renamer output</entry>
1740 <entry>dynamic</entry>
1744 <entry><option>-ddump-rules</option></entry>
1745 <entry>Dump rules</entry>
1746 <entry>dynamic</entry>
1750 <entry><option>-ddump-simpl</option></entry>
1751 <entry>Dump final simplifier output</entry>
1752 <entry>dynamic</entry>
1756 <entry><option>-ddump-simpl-iterations</option></entry>
1757 <entry>Dump output from each simplifier iteration</entry>
1758 <entry>dynamic</entry>
1762 <entry><option>-ddump-spec</option></entry>
1763 <entry>Dump specialiser output</entry>
1764 <entry>dynamic</entry>
1768 <entry><option>-ddump-splices</option></entry>
1769 <entry>Dump TH splided expressions, and what they evaluate to</entry>
1770 <entry>dynamic</entry>
1774 <entry><option>-ddump-stg</option></entry>
1775 <entry>Dump final STG</entry>
1776 <entry>dynamic</entry>
1780 <entry><option>-ddump-stranal</option></entry>
1781 <entry>Dump strictness analyser output</entry>
1782 <entry>dynamic</entry>
1786 <entry><option>-ddump-tc</option></entry>
1787 <entry>Dump typechecker output</entry>
1788 <entry>dynamic</entry>
1792 <entry><option>-ddump-types</option></entry>
1793 <entry>Dump type signatures</entry>
1794 <entry>dynamic</entry>
1798 <entry><option>-ddump-worker-wrapper</option></entry>
1799 <entry>Dump worker-wrapper output</entry>
1800 <entry>dynamic</entry>
1804 <entry><option>-ddump-if-trace</option></entry>
1805 <entry>Trace interface files</entry>
1806 <entry>dynamic</entry>
1810 <entry><option>-ddump-tc-trace</option></entry>
1811 <entry>Trace typechecker</entry>
1812 <entry>dynamic</entry>
1816 <entry><option>-ddump-rn-trace</option></entry>
1817 <entry>Trace renamer</entry>
1818 <entry>dynamic</entry>
1822 <entry><option>-ddump-rn-stats</option></entry>
1823 <entry>Renamer stats</entry>
1824 <entry>dynamic</entry>
1828 <entry><option>-ddump-simpl-stats</option></entry>
1829 <entry>Dump simplifier stats</entry>
1830 <entry>dynamic</entry>
1834 <entry><option>-dppr-debug</option></entry>
1835 <entry>Turn on debug printing (more verbose)</entry>
1836 <entry>static</entry>
1840 <entry><option>-dppr-noprags</option></entry>
1841 <entry>Don't output pragma info in dumps</entry>
1842 <entry>static</entry>
1846 <entry><option>-dppr-user-length</option></entry>
1847 <entry>Set the depth for printing expressions in error msgs</entry>
1848 <entry>static</entry>
1852 <entry><option>-dsource-stats</option></entry>
1853 <entry>Dump haskell source stats</entry>
1854 <entry>dynamic</entry>
1858 <entry><option>-dcmm-lint</option></entry>
1859 <entry>C-- pass sanity checking</entry>
1860 <entry>dynamic</entry>
1864 <entry><option>-dstg-lint</option></entry>
1865 <entry>STG pass sanity checking</entry>
1866 <entry>dynamic</entry>
1870 <entry><option>-dstg-stats</option></entry>
1871 <entry>Dump STG stats</entry>
1872 <entry>dynamic</entry>
1876 <entry><option>-dverbose-core2core</option></entry>
1877 <entry>Show output from each core-to-core pass</entry>
1878 <entry>dynamic</entry>
1882 <entry><option>-dverbose-stg2stg</option></entry>
1883 <entry>Show output from each STG-to-STG pass</entry>
1884 <entry>dynamic</entry>
1888 <entry><option>-dshow-passes</option></entry>
1889 <entry>Print out each pass name as it happens</entry>
1890 <entry>dynamic</entry>
1894 <entry><option>-dfaststring-stats</option></entry>
1895 <entry>Show statistics for fast string usage when finished</entry>
1896 <entry>dynamic</entry>
1900 <entry><option>-unreg</option></entry>
1901 <entry>Enable unregisterised compilation</entry>
1902 <entry>static</entry>
1911 <title>Misc compiler options</title>
1914 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1918 <entry>Description</entry>
1919 <entry>Static/Dynamic</entry>
1920 <entry>Reverse</entry>
1925 <entry><option>-fno-hi-version-check</option></entry>
1926 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
1927 <entry>static</entry>
1931 <entry><option>-dno-black-holing</option></entry>
1932 <entry>Turn off black holing (probably doesn't work)</entry>
1933 <entry>static</entry>
1937 <entry><option>-fno-method-sharing</option></entry>
1938 <entry>Don't share specialisations of overloaded functions</entry>
1939 <entry>static</entry>
1943 <entry><option>-fhistory-size</option></entry>
1944 <entry>Set simplification history size</entry>
1945 <entry>static</entry>
1949 <entry><option>-funregisterised</option></entry>
1950 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
1951 <entry>static</entry>
1955 <entry><option>-fno-asm-mangling</option></entry>
1956 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
1957 <entry>dynamic</entry>
1971 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
1977 ;;; Local Variables: ***
1979 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***