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>––supported-extensions</option> or <option>––supported-languages</option></entry>
64 <entry>display the supported languages and language extensions</entry>
69 <entry><option>––info</option></entry>
70 <entry>display information about the compiler</entry>
75 <entry><option>––version</option></entry>
76 <entry>display GHC version</entry>
81 <entry><option>––numeric-version</option></entry>
82 <entry>display GHC version (numeric only)</entry>
87 <entry><option>––print-libdir</option></entry>
88 <entry>display GHC library directory</entry>
93 <entry><option>-ferror-spans</option></entry>
94 <entry>output full span in error messages</entry>
99 <entry><option>-H</option><replaceable>size</replaceable></entry>
100 <entry>Set the minimum heap size to <replaceable>size</replaceable></entry>
101 <entry>static</entry>
105 <entry><option>-Rghc-timing</option></entry>
106 <entry>Summarise timing stats for GHC (same as <literal>+RTS -tstderr</literal>)</entry>
107 <entry>static</entry>
116 <title>Which phases to run</title>
118 <para><xref linkend="options-order"/></para>
121 <tgroup cols="4" align="left" colsep="1" rowsep="1">
125 <entry>Description</entry>
126 <entry>Static/Dynamic</entry>
127 <entry>Reverse</entry>
132 <entry><option>-E</option></entry>
133 <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
138 <entry><option>-C</option></entry>
139 <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
144 <entry><option>-S</option></entry>
145 <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
150 <entry><option>-c</option></entry>
151 <entry>Do not link</entry>
152 <entry>dynamic</entry>
156 <entry><option>-x</option> <replaceable>suffix</replaceable></entry>
157 <entry>Override default behaviour for source files</entry>
158 <entry>static</entry>
167 <title>Alternative modes of operation</title>
169 <para><xref linkend="modes"/></para>
172 <tgroup cols="4" align="left" colsep="1" rowsep="1">
176 <entry>Description</entry>
177 <entry>Static/Dynamic</entry>
178 <entry>Reverse</entry>
183 <entry><option>--interactive</option></entry>
184 <entry>Interactive mode - normally used by just running <command>ghci</command>;
185 see <xref linkend="ghci"/> for details.</entry>
190 <entry><option>--make</option></entry>
191 <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>;
192 see <xref linkend="make-mode"/> for details..</entry>
197 <entry><option>-e <replaceable>expr</replaceable></option></entry>
198 <entry>Evaluate <replaceable>expr</replaceable>;
199 see <xref linkend="eval-mode"/> for details.</entry>
204 <entry><option>-M</option></entry>
205 <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>;
206 see <xref linkend="makefile-dependencies"/> for details.</entry>
216 <title>Redirecting output</title>
218 <para><xref linkend="options-output"/></para>
221 <tgroup cols="4" align="left" colsep="1" rowsep="1">
225 <entry>Description</entry>
226 <entry>Static/Dynamic</entry>
227 <entry>Reverse</entry>
232 <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
233 <entry>set the suffix to use for intermediate C files</entry>
234 <entry>dynamic</entry>
238 <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
239 <entry>set directory for interface files</entry>
240 <entry>dynamic</entry>
244 <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
245 <entry>set the suffix to use for interface files</entry>
246 <entry>dynamic</entry>
250 <entry><option>-o</option> <replaceable>filename</replaceable></entry>
251 <entry>set output filename</entry>
252 <entry>dynamic</entry>
256 <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
257 <entry>set directory for object files</entry>
258 <entry>dynamic</entry>
262 <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
263 <entry>set the filename in which to put the interface</entry>
264 <entry>dynamic</entry>
268 <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
269 <entry>set the output file suffix</entry>
270 <entry>dynamic</entry>
274 <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
275 <entry>redirect FFi stub files</entry>
276 <entry>dynamic</entry>
280 <entry><option>-outputdir</option> <replaceable>dir</replaceable></entry>
281 <entry>set output directory</entry>
282 <entry>dynamic</entry>
291 <title>Keeping intermediate files</title>
293 <para><xref linkend="keeping-intermediates"/></para>
296 <tgroup cols="4" align="left" colsep="1" rowsep="1">
300 <entry>Description</entry>
301 <entry>Static/Dynamic</entry>
302 <entry>Reverse</entry>
307 <entry><option>-keep-hc-file</option> or
308 <option>-keep-hc-files</option></entry>
309 <entry>retain intermediate <literal>.hc</literal> files</entry>
310 <entry>dynamic</entry>
314 <entry><option>-keep-llvm-file</option> or
315 <option>-keep-llvm-files</option></entry>
316 <entry>retain intermediate LLVM <literal>.ll</literal> files</entry>
317 <entry>dynamic</entry>
321 <entry><option>-keep-s-file</option> or
322 <option>-keep-s-files</option></entry>
323 <entry>retain intermediate <literal>.s</literal> files</entry>
324 <entry>dynamic</entry>
328 <entry><option>-keep-raw-s-file</option> or
329 <option>-keep-raw-s-files</option></entry>
330 <entry>retain intermediate <literal>.raw_s</literal> files</entry>
331 <entry>dynamic</entry>
335 <entry><option>-keep-tmp-files</option></entry>
336 <entry>retain all intermediate temporary files</entry>
337 <entry>dynamic</entry>
346 <title>Temporary files</title>
348 <para><xref linkend="temp-files"/></para>
351 <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>-tmpdir</option></entry>
363 <entry>set the directory for temporary files</entry>
364 <entry>dynamic</entry>
373 <title>Finding imports</title>
375 <para><xref linkend="search-path"/></para>
378 <tgroup cols="4" align="left" colsep="1" rowsep="1">
383 <entry>Description</entry>
384 <entry>Static/Dynamic</entry>
385 <entry>Reverse</entry>
390 <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
391 <entry>add <replaceable>dir</replaceable>,
392 <replaceable>dir2</replaceable>, etc. to import path</entry>
393 <entry>static/<literal>:set</literal></entry>
397 <entry><option>-i</option></entry>
398 <entry>Empty the import directory list</entry>
399 <entry>static/<literal>:set</literal></entry>
408 <title>Interface file options</title>
410 <para><xref linkend="hi-options"/></para>
413 <tgroup cols="4" align="left" colsep="1" rowsep="1">
418 <entry>Description</entry>
419 <entry>Static/Dynamic</entry>
420 <entry>Reverse</entry>
425 <entry><option>-ddump-hi</option></entry>
426 <entry>Dump the new interface to stdout</entry>
427 <entry>dynamic</entry>
431 <entry><option>-ddump-hi-diffs</option></entry>
432 <entry>Show the differences vs. the old interface</entry>
433 <entry>dynamic</entry>
437 <entry><option>-ddump-minimal-imports</option></entry>
438 <entry>Dump a minimal set of imports</entry>
439 <entry>dynamic</entry>
443 <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
444 <entry>See <xref linkend="modes"/>.</entry>
452 <title>Recompilation checking</title>
454 <para><xref linkend="recomp"/></para>
457 <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>-fforce-recomp</option></entry>
470 <entry>Turn off recompilation checking; implied by any
471 <option>-ddump-X</option> option</entry>
472 <entry>dynamic</entry>
473 <entry><option>-fno-force-recomp</option></entry>
480 <sect2 id="interactive-mode-options">
481 <title>Interactive-mode options</title>
483 <para><xref linkend="ghci-dot-files"/></para>
486 <tgroup cols="4" align="left" colsep="1" rowsep="1">
490 <entry>Description</entry>
491 <entry>Static/Dynamic</entry>
492 <entry>Reverse</entry>
497 <entry><option>-ignore-dot-ghci</option></entry>
498 <entry>Disable reading of <filename>.ghci</filename> files</entry>
499 <entry>static</entry>
503 <entry><option>-read-dot-ghci</option></entry>
504 <entry>Enable reading of <filename>.ghci</filename> files</entry>
505 <entry>static</entry>
509 <entry><option>-fbreak-on-exception</option></entry>
510 <entry><link linkend="ghci-debugger-exceptions">Break on any exception thrown</link></entry>
511 <entry>dynamic</entry>
512 <entry><option>-fno-break-on-exception</option></entry>
515 <entry><option>-fbreak-on-error</option></entry>
516 <entry><link linkend="ghci-debugger-exceptions">Break on uncaught exceptions and errors</link></entry>
517 <entry>dynamic</entry>
518 <entry><option>-fno-break-on-error</option></entry>
521 <entry><option>-fprint-evld-with-show</option></entry>
522 <entry><link linkend="breakpoints">Enable usage of Show instances in <literal>:print</literal></link></entry>
523 <entry>dynamic</entry>
524 <entry><option>-fno-print-evld-with-show</option></entry>
527 <entry><option>-fprint-bind-result</option></entry>
528 <entry><link linkend="ghci-stmts">Turn on printing of binding results in GHCi</link></entry>
529 <entry>dynamic</entry>
530 <entry><option>-fno-print-bind-result</option></entry>
533 <entry><option>-fno-print-bind-contents</option></entry>
534 <entry><link linkend="breakpoints">Turn off printing of binding contents in GHCi</link></entry>
535 <entry>dynamic</entry>
539 <entry><option>-fno-implicit-import-qualified</option></entry>
540 <entry><link linkend="ghci-import-qualified">Turn off
541 implicit qualified import of everything in GHCi</link></entry>
542 <entry>dynamic</entry>
552 <title>Packages</title>
554 <para><xref linkend="packages"/></para>
557 <tgroup cols="4" align="left" colsep="1" rowsep="1">
561 <entry>Description</entry>
562 <entry>Static/Dynamic</entry>
563 <entry>Reverse</entry>
568 <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
569 <entry>Compile to be part of package <replaceable>P</replaceable></entry>
570 <entry>dynamic</entry>
574 <entry><option>-package</option> <replaceable>P</replaceable></entry>
575 <entry>Expose package <replaceable>P</replaceable></entry>
576 <entry>static/<literal>:set</literal></entry>
580 <entry><option>-hide-all-packages</option></entry>
581 <entry>Hide all packages by default</entry>
582 <entry>static</entry>
586 <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
587 <entry>Hide package <replaceable>P</replaceable></entry>
588 <entry>static/<literal>:set</literal></entry>
592 <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
593 <entry>Ignore package <replaceable>P</replaceable></entry>
594 <entry>static/<literal>:set</literal></entry>
598 <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
599 <entry>Load more packages from <replaceable>file</replaceable></entry>
600 <entry>static</entry>
604 <entry><option>-no-user-package-conf</option></entry>
605 <entry>Don't load the user's package config file.</entry>
606 <entry>static</entry>
610 <entry><option>-no-auto-link-packages</option></entry>
611 <entry>Don't automatically link in the haskell98 package.</entry>
612 <entry>dynamic</entry>
621 <title>Language options</title>
623 <para>Language options can be enabled either by a command-line option
624 <option>-Xblah</option>, or by a <literal>{-# LANGUAGE blah #-}</literal>
625 pragma in the file itself. See <xref linkend="options-language"/></para>
628 <tgroup cols="4" align="left" colsep="1" rowsep="1">
632 <entry>Description</entry>
633 <entry>Static/Dynamic</entry>
634 <entry>Reverse</entry>
639 <entry><option>-fglasgow-exts</option></entry>
640 <entry>Enable most language extensions</entry>
641 <entry>dynamic</entry>
642 <entry><option>-fno-glasgow-exts</option></entry>
645 <entry><option>-XOverlappingInstances</option></entry>
646 <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
647 <entry>dynamic</entry>
648 <entry><option>-XNoOverlappingInstances</option></entry>
651 <entry><option>-XIncoherentInstances</option></entry>
652 <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.
653 Implies <option>-XOverlappingInstances</option> </entry>
654 <entry>dynamic</entry>
655 <entry><option>-XNoIncoherentInstances</option></entry>
658 <entry><option>-XUndecidableInstances</option></entry>
659 <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
660 <entry>dynamic</entry>
661 <entry><option>-XNoUndecidableInstances</option></entry>
664 <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
665 <entry>set the <link linkend="undecidable-instances">limit for context reduction</link>. Default is 20.</entry>
666 <entry>dynamic</entry>
670 <entry><option>-XArrows</option></entry>
671 <entry>Enable <link linkend="arrow-notation">arrow
672 notation</link> extension</entry>
673 <entry>dynamic</entry>
674 <entry><option>-XNoArrows</option></entry>
677 <entry><option>-XDisambiguateRecordFields</option></entry>
678 <entry>Enable <link linkend="disambiguate-fields">record
679 field disambiguation</link></entry>
680 <entry>dynamic</entry>
681 <entry><option>-XNoDisambiguateRecordFields</option></entry>
684 <entry><option>-XForeignFunctionInterface</option></entry>
685 <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
686 <option>-fglasgow-exts</option>)</entry>
687 <entry>dynamic</entry>
688 <entry><option>-XNoForeignFunctionInterface</option></entry>
691 <entry><option>-XGenerics</option></entry>
692 <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
693 <entry>dynamic</entry>
694 <entry><option>-XNoGenerics</option></entry>
697 <entry><option>-XImplicitParams</option></entry>
698 <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
699 Implied by <option>-fglasgow-exts</option>.</entry>
700 <entry>dynamic</entry>
701 <entry><option>-XNoImplicitParams</option></entry>
704 <entry><option>-firrefutable-tuples</option></entry>
705 <entry>Make tuple pattern matching irrefutable</entry>
706 <entry>dynamic</entry>
707 <entry><option>-fno-irrefutable-tuples</option></entry>
710 <entry><option>-XNoImplicitPrelude</option></entry>
711 <entry>Don't implicitly <literal>import Prelude</literal></entry>
712 <entry>dynamic</entry>
713 <entry><option>-XImplicitPrelude</option></entry>
716 <entry><option>-XRebindableSyntax</option></entry>
717 <entry>Employ <link linkend="rebindable-syntax">rebindable syntax</link></entry>
718 <entry>dynamic</entry>
719 <entry><option>-XNoRebindableSyntax</option></entry>
722 <entry><option>-XNoMonomorphismRestriction</option></entry>
723 <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
724 <entry>dynamic</entry>
725 <entry><option>-XMonomorphismRrestriction</option></entry>
728 <entry><option>-XNoNPlusKPatterns</option></entry>
729 <entry>Disable support for <literal>n+k</literal> patterns</entry>
730 <entry>dynamic</entry>
731 <entry><option>-XNPlusKPatterns</option></entry>
734 <entry><option>-XNoMonoPatBinds</option></entry>
735 <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
736 <entry>dynamic</entry>
737 <entry><option>-XMonoPatBinds</option></entry>
740 <entry><option>-XRelaxedPolyRec</option></entry>
741 <entry>Relaxed checking for <link linkend="typing-binds">mutually-recursive polymorphic functions</link></entry>
742 <entry>dynamic</entry>
743 <entry><option>-XNoRelaxedPolyRec</option></entry>
746 <entry><option>-XExtendedDefaultRules</option></entry>
747 <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
748 <entry>dynamic</entry>
749 <entry><option>-XNoExtendedDefaultRules</option></entry>
752 <entry><option>-XOverloadedStrings</option></entry>
753 <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
755 <entry>dynamic</entry>
756 <entry><option>-XNoOverloadedStrings</option></entry>
759 <entry><option>-XGADTs</option></entry>
760 <entry>Enable <link linkend="gadt">generalised algebraic data types</link>.
762 <entry>dynamic</entry>
763 <entry><option>-XNoGADTs</option></entry>
766 <entry><option>-XTypeFamilies</option></entry>
767 <entry>Enable <link linkend="type-families">type families</link>.</entry>
768 <entry>dynamic</entry>
769 <entry><option>-XNoTypeFamilies</option></entry>
772 <entry><option>-XScopedTypeVariables</option></entry>
773 <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
774 Implied by <option>-fglasgow-exts</option>.</entry>
775 <entry>dynamic</entry>
776 <entry><option>-XNoScopedTypeVariables</option></entry>
779 <entry><option>-XMonoLocalBinds</option></entry>
780 <entry>Enable <link linkend="mono-local-binds">do not generalise local bindings</link>.
782 <entry>dynamic</entry>
783 <entry><option>-XNoMonoLocalBinds</option></entry>
786 <entry><option>-XTemplateHaskell</option></entry>
787 <entry>Enable <link linkend="template-haskell">Template Haskell</link>.
788 No longer implied by <option>-fglasgow-exts</option>.</entry>
789 <entry>dynamic</entry>
790 <entry><option>-XNoTemplateHaskell</option></entry>
793 <entry><option>-XQuasiQuotes</option></entry>
794 <entry>Enable <link linkend="th-quasiquotation">quasiquotation</link>.</entry>
795 <entry>dynamic</entry>
796 <entry><option>-XNoQuasiQuotes</option></entry>
799 <entry><option>-XBangPatterns</option></entry>
800 <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
801 <entry>dynamic</entry>
802 <entry><option>-XNoBangPatterns</option></entry>
805 <entry><option>-XCPP</option></entry>
806 <entry>Enable the <link linkend="c-pre-processor">C preprocessor</link>.</entry>
807 <entry>dynamic</entry>
808 <entry><option>-XNoCPP</option></entry>
811 <entry><option>-XPatternGuards</option></entry>
812 <entry>Enable <link linkend="pattern-guards">pattern guards</link>.</entry>
813 <entry>dynamic</entry>
814 <entry><option>-XNoPatternGuards</option></entry>
817 <entry><option>-XViewPatterns</option></entry>
818 <entry>Enable <link linkend="view-patterns">view patterns</link>.</entry>
819 <entry>dynamic</entry>
820 <entry><option>-XNoViewPatterns</option></entry>
823 <entry><option>-XUnicodeSyntax</option></entry>
824 <entry>Enable <link linkend="unicode-syntax">unicode syntax</link>.</entry>
825 <entry>dynamic</entry>
826 <entry><option>-XNoUnicodeSyntax</option></entry>
829 <entry><option>-XMagicHash</option></entry>
830 <entry>Allow "#" as a <link linkend="magic-hash">postfix modifier on identifiers</link>.</entry>
831 <entry>dynamic</entry>
832 <entry><option>-XNoMagicHash</option></entry>
835 <entry><option>-XExplicitForALl</option></entry>
836 <entry>Enable <link linkend="explicit-foralls">explicit universal quantification</link>.
837 Implied by <option>-XScopedTypeVariables</option>,
838 <option>-XLiberalTypeSynonyms</option>,
839 <option>-XRank2Types</option>,
840 <option>-XRankNTypes</option>,
841 <option>-XPolymorphicComponents</option>,
842 <option>-XExistentialQuantification</option>
844 <entry>dynamic</entry>
845 <entry><option>-XNoExplicitForAll</option></entry>
848 <entry><option>-XPolymorphicComponents</option></entry>
849 <entry>Enable <link linkend="universal-quantification">polymorphic components for data constructors</link>.</entry>
850 <entry>dynamic</entry>
851 <entry><option>-XNoPolymorphicComponents</option></entry>
854 <entry><option>-XRank2Types</option></entry>
855 <entry>Enable <link linkend="universal-quantification">rank-2 types</link>.</entry>
856 <entry>dynamic</entry>
857 <entry><option>-XNoRank2Types</option></entry>
860 <entry><option>-XRankNTypes</option></entry>
861 <entry>Enable <link linkend="universal-quantification">rank-N types</link>.</entry>
862 <entry>dynamic</entry>
863 <entry><option>-XNoRankNTypes</option></entry>
866 <entry><option>-XImpredicativeTypes</option></entry>
867 <entry>Enable <link linkend="impredicative-polymorphism">impredicative types</link>.</entry>
868 <entry>dynamic</entry>
869 <entry><option>-XNoImpredicativeTypes</option></entry>
872 <entry><option>-XExistentialQuantification</option></entry>
873 <entry>Enable <link linkend="existential-quantification">existential quantification</link>.</entry>
874 <entry>dynamic</entry>
875 <entry><option>-XNoExistentialQuantification</option></entry>
878 <entry><option>-XKindSignatures</option></entry>
879 <entry>Enable <link linkend="kinding">kind signatures</link>.</entry>
880 <entry>dynamic</entry>
881 <entry><option>-XNoKindSignatures</option></entry>
884 <entry><option>-XEmptyDataDecls</option></entry>
885 <entry>Enable empty data declarations.</entry>
886 <entry>dynamic</entry>
887 <entry><option>-XNoEmptyDataDecls</option></entry>
890 <entry><option>-XParallelListComp</option></entry>
891 <entry>Enable <link linkend="parallel-list-comprehensions">parallel list comprehensions</link>.</entry>
892 <entry>dynamic</entry>
893 <entry><option>-XNoParallelListComp</option></entry>
896 <entry><option>-XTransformListComp</option></entry>
897 <entry>Enable <link linkend="generalised-list-comprehensions">generalised list comprehensions</link>.</entry>
898 <entry>dynamic</entry>
899 <entry><option>-XNoTransformListComp</option></entry>
902 <entry><option>-XUnliftedFFITypes</option></entry>
903 <entry>Enable unlifted FFI types.</entry>
904 <entry>dynamic</entry>
905 <entry><option>-XNoUnliftedFFITypes</option></entry>
908 <entry><option>-XLiberalTypeSynonyms</option></entry>
909 <entry>Enable <link linkend="type-synonyms">liberalised type synonyms</link>.</entry>
910 <entry>dynamic</entry>
911 <entry><option>-XNoLiberalTypeSynonyms</option></entry>
914 <entry><option>-XTypeOperators</option></entry>
915 <entry>Enable type operators.</entry>
916 <entry>dynamic</entry>
917 <entry><option>-XNoTypeOperators</option></entry>
920 <entry><option>-XDoRec</option></entry>
921 <entry>Enable <link linkend="recursive-do-notation">recursive do notation</link>.</entry>
922 <entry>dynamic</entry>
923 <entry><option>-XNoDoRec</option></entry>
926 <entry><option>-XRecursiveDo</option></entry>
927 <entry>Enable <link linkend="mdo-notation">recursive do (mdo) notation</link>. This is deprecated; please use <link linkend="recursive-do-notation">recursive do notation</link> instead.</entry>
928 <entry>dynamic</entry>
929 <entry><option>-XNoRecursiveDo</option></entry>
932 <entry><option>-XPArr</option></entry>
933 <entry>Enable parallel arrays.</entry>
934 <entry>dynamic</entry>
935 <entry><option>-XNoPArr</option></entry>
938 <entry><option>-XRecordWildCards</option></entry>
939 <entry>Enable <link linkend="record-wildcards">record wildcards</link>.</entry>
940 <entry>dynamic</entry>
941 <entry><option>-XNoRecordWildCards</option></entry>
944 <entry><option>-XNamedFieldPuns</option></entry>
945 <entry>Enable <link linkend="record-puns">record puns</link>.</entry>
946 <entry>dynamic</entry>
947 <entry><option>-XNoNamedFieldPuns</option></entry>
950 <entry><option>-XDisambiguateRecordFields</option></entry>
951 <entry>Enable <link linkend="disambiguate-fields">record field disambiguation</link>. </entry>
952 <entry>dynamic</entry>
953 <entry><option>-XNoDisambiguateRecordFields</option></entry>
956 <entry><option>-XUnboxedTuples</option></entry>
957 <entry>Enable <link linkend="unboxed-tuples">unboxed tuples</link>.</entry>
958 <entry>dynamic</entry>
959 <entry><option>-XNoUnboxedTuples</option></entry>
962 <entry><option>-XStandaloneDeriving</option></entry>
963 <entry>Enable <link linkend="stand-alone-deriving">standalone deriving</link>.</entry>
964 <entry>dynamic</entry>
965 <entry><option>-XNoStandaloneDeriving</option></entry>
968 <entry><option>-XDeriveDataTypeable</option></entry>
969 <entry>Enable <link linkend="deriving-typeable">deriving for the Data and Typeable classes</link>.</entry>
970 <entry>dynamic</entry>
971 <entry><option>-XNoDeriveDataTypeable</option></entry>
974 <entry><option>-XGeneralizedNewtypeDeriving</option></entry>
975 <entry>Enable <link linkend="newtype-deriving">newtype deriving</link>.</entry>
976 <entry>dynamic</entry>
977 <entry><option>-XNoGeneralizedNewtypeDeriving</option></entry>
980 <entry><option>-XTypeSynonymInstances</option></entry>
981 <entry>Enable <link linkend="flexible-instance-head">type synonyms in instance heads</link>.</entry>
982 <entry>dynamic</entry>
983 <entry><option>-XNoTypeSynonymInstances</option></entry>
986 <entry><option>-XFlexibleContexts</option></entry>
987 <entry>Enable <link linkend="flexible-contexts">flexible contexts</link>.</entry>
988 <entry>dynamic</entry>
989 <entry><option>-XNoFlexibleContexts</option></entry>
992 <entry><option>-XFlexibleInstances</option></entry>
993 <entry>Enable <link linkend="instance-rules">flexible instances</link>.</entry>
994 <entry>dynamic</entry>
995 <entry><option>-XNoFlexibleInstances</option></entry>
998 <entry><option>-XConstrainedClassMethods</option></entry>
999 <entry>Enable <link linkend="class-method-types">constrained class methods</link>.</entry>
1000 <entry>dynamic</entry>
1001 <entry><option>-XNoConstrainedClassMethods</option></entry>
1004 <entry><option>-XMultiParamTypeClasses</option></entry>
1005 <entry>Enable <link linkend="multi-param-type-classes">multi parameter type classes</link>.</entry>
1006 <entry>dynamic</entry>
1007 <entry><option>-XNoMultiParamTypeClasses</option></entry>
1010 <entry><option>-XFunctionalDependencies</option></entry>
1011 <entry>Enable <link linkend="functional-dependencies">functional dependencies</link>.</entry>
1012 <entry>dynamic</entry>
1013 <entry><option>-XNoFunctionalDependencies</option></entry>
1016 <entry><option>-XPackageImports</option></entry>
1017 <entry>Enable <link linkend="package-imports">package-qualified imports</link>.</entry>
1018 <entry>dynamic</entry>
1019 <entry><option>-XNoPackageImports</option></entry>
1027 <title>Warnings</title>
1029 <para><xref linkend="options-sanity"/></para>
1032 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1036 <entry>Description</entry>
1037 <entry>Static/Dynamic</entry>
1038 <entry>Reverse</entry>
1043 <entry><option>-W</option></entry>
1044 <entry>enable normal warnings</entry>
1045 <entry>dynamic</entry>
1046 <entry><option>-w</option></entry>
1049 <entry><option>-w</option></entry>
1050 <entry>disable all warnings</entry>
1051 <entry>dynamic</entry>
1055 <entry><option>-Wall</option></entry>
1056 <entry>enable almost all warnings (details in <xref linkend="options-sanity"/>)</entry>
1057 <entry>dynamic</entry>
1058 <entry><option>-w</option></entry>
1061 <entry><option>-Werror</option></entry>
1062 <entry>make warnings fatal</entry>
1063 <entry>dynamic</entry>
1064 <entry>-Wwarn</entry>
1067 <entry><option>-Wwarn</option></entry>
1068 <entry>make warnings non-fatal</entry>
1069 <entry>dynamic</entry>
1070 <entry>-Werror</entry>
1074 <entry><option>-fwarn-unrecognised-pragmas</option></entry>
1075 <entry>warn about uses of pragmas that GHC doesn't recognise</entry>
1076 <entry>dynamic</entry>
1077 <entry><option>-fno-warn-unrecognised-pragmas</option></entry>
1081 <entry><option>-fwarn-warnings-deprecations</option></entry>
1082 <entry>warn about uses of functions & types that have warnings or deprecated pragmas</entry>
1083 <entry>dynamic</entry>
1084 <entry><option>-fno-warn-warnings-deprecations</option></entry>
1088 <entry><option>-fwarn-deprecated-flags</option></entry>
1089 <entry>warn about uses of commandline flags that are deprecated</entry>
1090 <entry>dynamic</entry>
1091 <entry><option>-fno-warn-deprecated-flags</option></entry>
1095 <entry><option>-fwarn-duplicate-exports</option></entry>
1096 <entry>warn when an entity is exported multiple times</entry>
1097 <entry>dynamic</entry>
1098 <entry><option>-fno-warn-duplicate-exports</option></entry>
1102 <entry><option>-fwarn-hi-shadowing</option></entry>
1103 <entry>warn when a <literal>.hi</literal> file in the
1104 current directory shadows a library</entry>
1105 <entry>dynamic</entry>
1106 <entry><option>-fno-warn-hi-shadowing</option></entry>
1110 <entry><option>-fwarn-identities</option></entry>
1111 <entry>warn about uses of Prelude numeric conversions that are probably
1112 the identity (and hence could be omitted)</entry>
1113 <entry>dynamic</entry>
1114 <entry><option>-fno-warn-identities</option></entry>
1118 <entry><option>-fwarn-implicit-prelude</option></entry>
1119 <entry>warn when the Prelude is implicitly imported</entry>
1120 <entry>dynamic</entry>
1121 <entry><option>-fno-warn-implicit-prelude</option></entry>
1125 <entry><option>-fwarn-incomplete-patterns</option></entry>
1126 <entry>warn when a pattern match could fail</entry>
1127 <entry>dynamic</entry>
1128 <entry><option>-fno-warn-incomplete-patterns</option></entry>
1132 <entry><option>-fwarn-incomplete-record-updates</option></entry>
1133 <entry>warn when a record update could fail</entry>
1134 <entry>dynamic</entry>
1135 <entry><option>-fno-warn-incomplete-record-updates</option></entry>
1139 <entry><option>-fwarn-lazy-unlifted-bindings</option></entry>
1140 <entry>warn when a pattern binding looks lazy but must be strict</entry>
1141 <entry>dynamic</entry>
1142 <entry><option>-fno-warn-lazy-unlifted-bindings</option></entry>
1146 <entry><option>-fwarn-missing-fields</option></entry>
1147 <entry>warn when fields of a record are uninitialised</entry>
1148 <entry>dynamic</entry>
1149 <entry><option>-fno-warn-missing-fields</option></entry>
1153 <entry><option>-fwarn-missing-import-lists</option></entry>
1154 <entry>warn when an import declaration does not explicitly
1155 list all the names brought into scope</entry>
1156 <entry>dynamic</entry>
1157 <entry><option>-fnowarn-missing-import-lists</option></entry>
1161 <entry><option>-fwarn-missing-methods</option></entry>
1162 <entry>warn when class methods are undefined</entry>
1163 <entry>dynamic</entry>
1164 <entry><option>-fno-warn-missing-methods</option></entry>
1168 <entry><option>-fwarn-missing-signatures</option></entry>
1169 <entry>warn about top-level functions without signatures</entry>
1170 <entry>dynamic</entry>
1171 <entry><option>-fno-warn-missing-signatures</option></entry>
1175 <entry><option>-fwarn-name-shadowing</option></entry>
1176 <entry>warn when names are shadowed</entry>
1177 <entry>dynamic</entry>
1178 <entry><option>-fno-warn-name-shadowing</option></entry>
1182 <entry><option>-fwarn-orphans</option></entry>
1183 <entry>warn when the module contains <link linkend="orphan-modules">orphan instance declarations
1184 or rewrite rules</link></entry>
1185 <entry>dynamic</entry>
1186 <entry><option>-fno-warn-orphans</option></entry>
1190 <entry><option>-fwarn-overlapping-patterns</option></entry>
1191 <entry>warn about overlapping patterns</entry>
1192 <entry>dynamic</entry>
1193 <entry><option>-fno-warn-overlapping-patterns</option></entry>
1197 <entry><option>-fwarn-tabs</option></entry>
1198 <entry>warn if there are tabs in the source file</entry>
1199 <entry>dynamic</entry>
1200 <entry><option>-fno-warn-tabs</option></entry>
1204 <entry><option>-fwarn-type-defaults</option></entry>
1205 <entry>warn when defaulting happens</entry>
1206 <entry>dynamic</entry>
1207 <entry><option>-fno-warn-type-defaults</option></entry>
1211 <entry><option>-fwarn-monomorphism-restriction</option></entry>
1212 <entry>warn when the Monomorphism Restriction is applied</entry>
1213 <entry>dynamic</entry>
1214 <entry><option>-fno-warn-monomorphism-restriction</option></entry>
1218 <entry><option>-fwarn-unused-binds</option></entry>
1219 <entry>warn about bindings that are unused</entry>
1220 <entry>dynamic</entry>
1221 <entry><option>-fno-warn-unused-binds</option></entry>
1225 <entry><option>-fwarn-unused-imports</option></entry>
1226 <entry>warn about unnecessary imports</entry>
1227 <entry>dynamic</entry>
1228 <entry><option>-fno-warn-unused-imports</option></entry>
1232 <entry><option>-fwarn-unused-matches</option></entry>
1233 <entry>warn about variables in patterns that aren't used</entry>
1234 <entry>dynamic</entry>
1235 <entry><option>-fno-warn-unused-matches</option></entry>
1239 <entry><option>-fwarn-unused-do-bind</option></entry>
1240 <entry>warn about do bindings that appear to throw away values of types other than <literal>()</literal></entry>
1241 <entry>dynamic</entry>
1242 <entry><option>-fno-warn-unused-do-bind</option></entry>
1246 <entry><option>-fwarn-wrong-do-bind</option></entry>
1247 <entry>warn about do bindings that appear to throw away monadic values that you should have bound instead</entry>
1248 <entry>dynamic</entry>
1249 <entry><option>-fno-warn-wrong-do-bind</option></entry>
1258 <title>Optimisation levels</title>
1260 <para><xref linkend="options-optimise"/></para>
1263 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1267 <entry>Description</entry>
1268 <entry>Static/Dynamic</entry>
1269 <entry>Reverse</entry>
1274 <entry><option>-O</option></entry>
1275 <entry>Enable default optimisation (level 1)</entry>
1276 <entry>dynamic</entry>
1277 <entry><option>-O0</option></entry>
1280 <entry><option>-O</option><replaceable>n</replaceable></entry>
1281 <entry>Set optimisation level <replaceable>n</replaceable></entry>
1282 <entry>dynamic</entry>
1283 <entry><option>-O0</option></entry>
1291 <title>Individual optimisations</title>
1293 <para><xref linkend="options-f"/></para>
1296 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1300 <entry>Description</entry>
1301 <entry>Static/Dynamic</entry>
1302 <entry>Reverse</entry>
1307 <entry><option>-fcase-merge</option></entry>
1308 <entry>Enable case-merging. Implied by <option>-O</option>.</entry>
1309 <entry>dynamic</entry>
1310 <entry><option>-fno-case-merge</option></entry>
1314 <entry><option>-fdicts-strict</option></entry>
1315 <entry>Make dictionaries strict</entry>
1316 <entry>static</entry>
1317 <entry><option>-fno-dicts-strict</option></entry>
1321 <entry><option>-fmethod-sharing</option></entry>
1322 <entry>Share specialisations of overloaded functions (default)</entry>
1323 <entry>dynamic</entry>
1324 <entry><option>-fno-method-sharing</option></entry>
1328 <entry><option>-fdo-eta-reduction</option></entry>
1329 <entry>Enable eta-reduction. Implied by <option>-O</option>.</entry>
1330 <entry>dynamic</entry>
1331 <entry><option>-fno-do-eta-reduction</option></entry>
1335 <entry><option>-fdo-lambda-eta-expansion</option></entry>
1336 <entry>Enable lambda eta-reduction</entry>
1337 <entry>dynamic</entry>
1338 <entry><option>-fno-do-lambda-eta-expansion</option></entry>
1342 <entry><option>-fexcess-precision</option></entry>
1343 <entry>Enable excess intermediate precision</entry>
1344 <entry>dynamic</entry>
1345 <entry><option>-fno-excess-precision</option></entry>
1349 <entry><option>-fignore-asserts</option></entry>
1350 <entry>Ignore assertions in the source</entry>
1351 <entry>dynamic</entry>
1352 <entry><option>-fno-ignore-asserts</option></entry>
1356 <entry><option>-fignore-interface-pragmas</option></entry>
1357 <entry>Ignore pragmas in interface files</entry>
1358 <entry>dynamic</entry>
1359 <entry><option>-fno-ignore-interface-pragmas</option></entry>
1363 <entry><option>-fomit-interface-pragmas</option></entry>
1364 <entry>Don't generate interface pragmas</entry>
1365 <entry>dynamic</entry>
1366 <entry><option>-fno-omit-interface-pragmas</option></entry>
1370 <entry><option>-fmax-worker-args</option></entry>
1371 <entry>If a worker has that many arguments, none will be
1372 unpacked anymore (default: 10)</entry>
1373 <entry>static</entry>
1378 <entry><option>-fsimplifier-phases</option></entry>
1379 <entry>Set the number of phases for the simplifier (default 2).
1380 Ignored with <option>-O0</option>.</entry>
1381 <entry>dynamic</entry>
1386 <entry><option>-fmax-simplifier-iterations</option></entry>
1387 <entry>Set the max iterations for the simplifier</entry>
1388 <entry>dynamic</entry>
1393 <entry><option>-fno-state-hack</option></entry>
1394 <entry>Turn off the "state hack" whereby any lambda with a real-world state token
1395 as argument is considered to be single-entry. Hence OK to inline things inside it.</entry>
1396 <entry>static</entry>
1401 <entry><option>-fcse</option></entry>
1402 <entry>Turn on common sub-expression elimination. Implied by <option>-O</option>.</entry>
1403 <entry>dynamic</entry>
1404 <entry>-fno-cse</entry>
1408 <entry><option>-fspecialise</option></entry>
1409 <entry>Turn on specialisation of overloaded functions. Implied by <option>-O</option>.</entry>
1410 <entry>dynamic</entry>
1411 <entry>-fno-specialise</entry>
1415 <entry><option>-ffull-laziness</option></entry>
1416 <entry>Turn on full laziness (floating bindings outwards). Implied by <option>-O</option>.</entry>
1417 <entry>dynamic</entry>
1418 <entry>-fno-full-laziness</entry>
1422 <entry><option>-ffloat-in</option></entry>
1423 <entry>Turn on the float-in transformation. Implied by <option>-O</option>.</entry>
1424 <entry>dynamic</entry>
1425 <entry>-fno-float-in</entry>
1429 <entry><option>-fenable-rewrite-rules</option></entry>
1430 <entry>Switch on all rewrite rules (including rules
1431 generated by automatic specialisation of overloaded functions).
1432 Implied by <option>-O</option>. </entry>
1433 <entry>dynamic</entry>
1434 <entry><option>-fno-enable-rewrite-rules</option></entry>
1438 <entry><option>-fstrictness</option></entry>
1439 <entry>Turn on strictness analysis. Implied by <option>-O</option>.</entry>
1440 <entry>dynamic</entry>
1441 <entry>-fno-strictness</entry>
1445 <entry><option>-fstrictness=before</option>=<replaceable>n</replaceable></entry>
1446 <entry>Run an additional strictness analysis before simplifier
1447 phase <replaceable>n</replaceable></entry>
1448 <entry>dynamic</entry>
1453 <entry><option>-fspec-constr</option></entry>
1454 <entry>Turn on the SpecConstr transformation. Implied by <option>-O2</option>.</entry>
1455 <entry>dynamic</entry>
1456 <entry>-fno-spec-constr</entry>
1460 <entry><option>-fspec-constr-threshold</option>=<replaceable>n</replaceable></entry>
1461 <entry>Set the size threshold for the SpecConstr transformation to <replaceable>n</replaceable> (default: 200)</entry>
1462 <entry>static</entry>
1463 <entry><option>-fno-spec-constr-threshold</option></entry>
1467 <entry><option>-fspec-constr-count</option>=<replaceable>n</replaceable></entry>
1468 <entry>Set to <replaceable>n</replaceable> (default: 3) the maximum number of
1469 specialisations that will be created for any one function
1470 by the SpecConstr transformation</entry>
1471 <entry>static</entry>
1472 <entry><option>-fno-spec-constr-count</option></entry>
1476 <entry><option>-fliberate-case</option></entry>
1477 <entry>Turn on the liberate-case transformation. Implied by <option>-O2</option>.</entry>
1478 <entry>dynamic</entry>
1479 <entry>-fno-liberate-case</entry>
1483 <entry><option>-fstatic-argument-transformation</option></entry>
1484 <entry>Turn on the static argument transformation. Implied by <option>-O2</option>.</entry>
1485 <entry>dynamic</entry>
1486 <entry>-fno-static-argument-transformation</entry>
1490 <entry><option>-fliberate-case-threshold</option>=<replaceable>n</replaceable></entry>
1491 <entry>Set the size threshold for the liberate-case transformation to <replaceable>n</replaceable> (default: 200)</entry>
1492 <entry>static</entry>
1493 <entry><option>-fno-liberate-case-threshold</option></entry>
1497 <entry><option>-funbox-strict-fields</option></entry>
1498 <entry>Flatten strict constructor fields</entry>
1499 <entry>dynamic</entry>
1500 <entry><option>-fno-unbox-strict-fields</option></entry>
1504 <entry><option>-funfolding-creation-threshold</option></entry>
1505 <entry>Tweak unfolding settings</entry>
1506 <entry>static</entry>
1507 <entry><option>-fno-unfolding-creation-threshold</option></entry>
1511 <entry><option>-funfolding-fun-discount</option></entry>
1512 <entry>Tweak unfolding settings</entry>
1513 <entry>static</entry>
1514 <entry><option>-fno-unfolding-fun-discount</option></entry>
1518 <entry><option>-funfolding-keeness-factor</option></entry>
1519 <entry>Tweak unfolding settings</entry>
1520 <entry>static</entry>
1521 <entry><option>-fno-unfolding-keeness-factor</option></entry>
1525 <entry><option>-funfolding-use-threshold</option></entry>
1526 <entry>Tweak unfolding settings</entry>
1527 <entry>static</entry>
1528 <entry><option>-fno-unfolding-use-threshold</option></entry>
1532 <entry><option>-fno-pre-inlining</option></entry>
1533 <entry>Turn off pre-inlining</entry>
1534 <entry>static</entry>
1539 <entry><option>-feager-blackholing</option></entry>
1540 <entry>Turn on <link linkend="parallel-compile-options">eager blackholing</link></entry>
1541 <entry>dynamic</entry>
1550 <title>Profiling options</title>
1552 <para><xref linkend="profiling"/></para>
1555 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1559 <entry>Description</entry>
1560 <entry>Static/Dynamic</entry>
1561 <entry>Reverse</entry>
1566 <entry><option>-auto</option></entry>
1567 <entry>Auto-add <literal>_scc_</literal>s to all
1568 exported functions not marked INLINE</entry>
1569 <entry>dynamic</entry>
1570 <entry><option>-no-auto</option></entry>
1573 <entry><option>-auto-all</option></entry>
1574 <entry>Auto-add <literal>_scc_</literal>s to all
1575 top-level functions not marked INLINE</entry>
1576 <entry>dynamic</entry>
1577 <entry><option>-no-auto-all</option></entry>
1580 <entry><option>-caf-all</option></entry>
1581 <entry>Auto-add <literal>_scc_</literal>s to all CAFs</entry>
1582 <entry>dynamic</entry>
1583 <entry><option>-no-caf-all</option></entry>
1586 <entry><option>-prof</option></entry>
1587 <entry>Turn on profiling</entry>
1588 <entry>static</entry>
1592 <entry><option>-ticky</option></entry>
1593 <entry><link linkend="ticky-ticky">Turn on ticky-ticky profiling</link></entry>
1594 <entry>static</entry>
1603 <title>Program coverage options</title>
1605 <para><xref linkend="hpc"/></para>
1608 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1612 <entry>Description</entry>
1613 <entry>Static/Dynamic</entry>
1614 <entry>Reverse</entry>
1619 <entry><option>-fhpc</option></entry>
1620 <entry>Turn on Haskell program coverage instrumentation</entry>
1621 <entry>static</entry>
1622 <entry><option>-</option></entry>
1625 <entry><option>-hpcdir dir</option></entry>
1626 <entry>Directory to deposit .mix files during compilation (default is .hpc)</entry>
1627 <entry>dynamic</entry>
1628 <entry><option>-</option></entry>
1636 <title>Haskell pre-processor options</title>
1638 <para><xref linkend="pre-processor"/></para>
1641 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1645 <entry>Description</entry>
1646 <entry>Static/Dynamic</entry>
1647 <entry>Reverse</entry>
1652 <entry><option>-F</option></entry>
1654 Enable the use of a pre-processor
1655 (set with <option>-pgmF</option>)
1657 <entry>dynamic</entry>
1666 <title>C pre-processor options</title>
1668 <para><xref linkend="c-pre-processor"/></para>
1671 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1675 <entry>Description</entry>
1676 <entry>Static/Dynamic</entry>
1677 <entry>Reverse</entry>
1682 <entry><option>-cpp</option></entry>
1683 <entry>Run the C pre-processor on Haskell source files</entry>
1684 <entry>dynamic</entry>
1688 <entry><option>-D</option><replaceable>symbol</replaceable><optional>=<replaceable>value</replaceable></optional></entry>
1689 <entry>Define a symbol in the C pre-processor</entry>
1690 <entry>dynamic</entry>
1691 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1694 <entry><option>-U</option><replaceable>symbol</replaceable></entry>
1695 <entry>Undefine a symbol in the C pre-processor</entry>
1696 <entry>dynamic</entry>
1700 <entry><option>-I</option><replaceable>dir</replaceable></entry>
1701 <entry>Add <replaceable>dir</replaceable> to the
1702 directory search list for <literal>#include</literal> files</entry>
1703 <entry>dynamic</entry>
1712 <title>Code generation options</title>
1714 <para><xref linkend="options-codegen"/></para>
1717 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1721 <entry>Description</entry>
1722 <entry>Static/Dynamic</entry>
1723 <entry>Reverse</entry>
1728 <entry><option>-fasm</option></entry>
1729 <entry>Use the native code generator</entry>
1730 <entry>dynamic</entry>
1731 <entry>-fvia-C</entry>
1734 <entry><option>-fvia-C</option></entry>
1735 <entry>Compile via C</entry>
1736 <entry>dynamic</entry>
1737 <entry>-fasm</entry>
1740 <entry><option>-fllvm</option></entry>
1741 <entry>Compile via LLVM</entry>
1742 <entry>dynamic</entry>
1743 <entry>-fasm</entry>
1746 <entry><option>-fno-code</option></entry>
1747 <entry>Omit code generation</entry>
1748 <entry>dynamic</entry>
1752 <entry><option>-fbyte-code</option></entry>
1753 <entry>Generate byte-code</entry>
1754 <entry>dynamic</entry>
1758 <entry><option>-fobject-code</option></entry>
1759 <entry>Generate object code</entry>
1760 <entry>dynamic</entry>
1769 <title>Linking options</title>
1771 <para><xref linkend="options-linker"/></para>
1774 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1778 <entry>Description</entry>
1779 <entry>Static/Dynamic</entry>
1780 <entry>Reverse</entry>
1785 <entry><option>-shared</option></entry>
1786 <entry>Generate a shared library (as opposed to an executable)</entry>
1787 <entry>dynamic</entry>
1791 <entry><option>-fPIC</option></entry>
1792 <entry>Generate position-independent code (where available)</entry>
1793 <entry>static</entry>
1797 <entry><option>-dynamic</option></entry>
1798 <entry>Use dynamic Haskell libraries (if available)</entry>
1799 <entry>static</entry>
1803 <entry><option>-dynload</option></entry>
1804 <entry>Selects one of a number of modes for finding shared
1805 libraries at runtime.</entry>
1806 <entry>static</entry>
1810 <entry><option>-framework</option> <replaceable>name</replaceable></entry>
1811 <entry>On Darwin/MacOS X only, link in the framework <replaceable>name</replaceable>.
1812 This option corresponds to the <option>-framework</option> option for Apple's Linker.</entry>
1813 <entry>dynamic</entry>
1817 <entry><option>-framework-path</option> <replaceable>name</replaceable></entry>
1818 <entry>On Darwin/MacOS X only, add <replaceable>dir</replaceable> to the list of
1819 directories searched for frameworks.
1820 This option corresponds to the <option>-F</option> option for Apple's Linker.</entry>
1821 <entry>dynamic</entry>
1825 <entry><option>-l</option><replaceable>lib</replaceable></entry>
1826 <entry>Link in library <replaceable>lib</replaceable></entry>
1827 <entry>dynamic</entry>
1831 <entry><option>-L</option><replaceable>dir</replaceable></entry>
1832 <entry>Add <replaceable>dir</replaceable> to the list of
1833 directories searched for libraries</entry>
1834 <entry>dynamic</entry>
1838 <entry><option>-main-is</option></entry>
1839 <entry>Set main module and function</entry>
1840 <entry>dynamic</entry>
1844 <entry><option>--mk-dll</option></entry>
1845 <entry>DLL-creation mode (Windows only)</entry>
1846 <entry>dynamic</entry>
1850 <entry><option>-no-hs-main</option></entry>
1851 <entry>Don't assume this program contains <literal>main</literal></entry>
1852 <entry>dynamic</entry>
1856 <entry><option>-rtsopts</option>, <option>-rtsopts={none,some,all}</option></entry>
1857 <entry>Control whether the RTS behaviour can be tweaked via command-line
1858 flags and the <literal>GHCRTS</literal> environment
1859 variable. Using <literal>none</literal> means no RTS flags can be given; <literal>some</literal> means only a minimum of safe options can be given (the default), and <literal>all</literal> (or no argument at all) means that all RTS flags are permitted.</entry>
1860 <entry>dynamic</entry>
1864 <entry><option>-with-rtsopts=<replaceable>opts</replaceable></option></entry>
1865 <entry>Set the default RTS options to
1866 <replaceable>opts</replaceable>.</entry>
1867 <entry>dynamic</entry>
1871 <entry><option>-no-link</option></entry>
1872 <entry>Omit linking</entry>
1873 <entry>dynamic</entry>
1877 <entry><option>-split-objs</option></entry>
1878 <entry>Split objects (for libraries)</entry>
1879 <entry>dynamic</entry>
1883 <entry><option>-static</option></entry>
1884 <entry>Use static Haskell libraries</entry>
1885 <entry>static</entry>
1889 <entry><option>-threaded</option></entry>
1890 <entry>Use the threaded runtime</entry>
1891 <entry>static</entry>
1895 <entry><option>-debug</option></entry>
1896 <entry>Use the debugging runtime</entry>
1897 <entry>static</entry>
1901 <entry><option>-eventlog</option></entry>
1902 <entry>Enable runtime event tracing</entry>
1903 <entry>static</entry>
1907 <entry><option>-fno-gen-manifest</option></entry>
1908 <entry>Do not generate a manifest file (Windows only)</entry>
1909 <entry>dynamic</entry>
1913 <entry><option>-fno-embed-manifest</option></entry>
1914 <entry>Do not embed the manifest in the executable (Windows only)</entry>
1915 <entry>dynamic</entry>
1919 <entry><option>-fno-shared-implib</option></entry>
1920 <entry>Don't generate an import library for a DLL (Windows only)</entry>
1921 <entry>dynamic</entry>
1925 <entry><option>-dylib-install-name</option> <replaceable>path</replaceable></entry>
1926 <entry>Set the install name (via <literal>-install_name</literal> passed to Apple's
1927 linker), specifying the full install path of the library file. Any libraries
1928 or executables that link with it later will pick up that path as their
1929 runtime search location for it. (Darwin/MacOS X only)</entry>
1930 <entry>dynamic</entry>
1939 <title>Replacing phases</title>
1941 <para><xref linkend="replacing-phases"/></para>
1944 <tgroup cols="4" align="left" colsep="1" rowsep="1">
1948 <entry>Description</entry>
1949 <entry>Static/Dynamic</entry>
1950 <entry>Reverse</entry>
1955 <entry><option>-pgmL</option> <replaceable>cmd</replaceable></entry>
1956 <entry>Use <replaceable>cmd</replaceable> as the literate pre-processor</entry>
1957 <entry>dynamic</entry>
1961 <entry><option>-pgmP</option> <replaceable>cmd</replaceable></entry>
1962 <entry>Use <replaceable>cmd</replaceable> as the C
1963 pre-processor (with <option>-cpp</option> only)</entry>
1964 <entry>dynamic</entry>
1968 <entry><option>-pgmc</option> <replaceable>cmd</replaceable></entry>
1969 <entry>Use <replaceable>cmd</replaceable> as the C compiler</entry>
1970 <entry>dynamic</entry>
1973 <entry><option>-pgmlo</option> <replaceable>cmd</replaceable></entry>
1974 <entry>Use <replaceable>cmd</replaceable> as the LLVM optimiser</entry>
1975 <entry>dynamic</entry>
1979 <entry><option>-pgmlc</option> <replaceable>cmd</replaceable></entry>
1980 <entry>Use <replaceable>cmd</replaceable> as the LLVM compiler</entry>
1981 <entry>dynamic</entry>
1986 <entry><option>-pgmm</option> <replaceable>cmd</replaceable></entry>
1987 <entry>Use <replaceable>cmd</replaceable> as the mangler</entry>
1988 <entry>dynamic</entry>
1992 <entry><option>-pgms</option> <replaceable>cmd</replaceable></entry>
1993 <entry>Use <replaceable>cmd</replaceable> as the splitter</entry>
1994 <entry>dynamic</entry>
1998 <entry><option>-pgma</option> <replaceable>cmd</replaceable></entry>
1999 <entry>Use <replaceable>cmd</replaceable> as the assembler</entry>
2000 <entry>dynamic</entry>
2004 <entry><option>-pgml</option> <replaceable>cmd</replaceable></entry>
2005 <entry>Use <replaceable>cmd</replaceable> as the linker</entry>
2006 <entry>dynamic</entry>
2010 <entry><option>-pgmdll</option> <replaceable>cmd</replaceable></entry>
2011 <entry>Use <replaceable>cmd</replaceable> as the DLL generator</entry>
2012 <entry>dynamic</entry>
2016 <entry><option>-pgmF</option> <replaceable>cmd</replaceable></entry>
2017 <entry>Use <replaceable>cmd</replaceable> as the pre-processor
2018 (with <option>-F</option> only)</entry>
2019 <entry>dynamic</entry>
2023 <entry><option>-pgmwindres</option> <replaceable>cmd</replaceable></entry>
2024 <entry>Use <replaceable>cmd</replaceable> as the program for
2025 embedding manifests on Windows.</entry>
2026 <entry>dynamic</entry>
2032 <indexterm><primary><option>-pgmL</option></primary></indexterm>
2033 <indexterm><primary><option>-pgmP</option></primary></indexterm>
2034 <indexterm><primary><option>-pgmc</option></primary></indexterm>
2035 <indexterm><primary><option>-pgmlo</option></primary></indexterm>
2036 <indexterm><primary><option>-pgmlc</option></primary></indexterm>
2037 <indexterm><primary><option>-pgma</option></primary></indexterm>
2038 <indexterm><primary><option>-pgml</option></primary></indexterm>
2039 <indexterm><primary><option>-pgmdll</option></primary></indexterm>
2040 <indexterm><primary><option>-pgmF</option></primary></indexterm>
2045 <title>Forcing options to particular phases</title>
2047 <para><xref linkend="forcing-options-through"/></para>
2050 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2054 <entry>Description</entry>
2055 <entry>Static/Dynamic</entry>
2056 <entry>Reverse</entry>
2061 <entry><option>-optL</option> <replaceable>option</replaceable></entry>
2062 <entry>pass <replaceable>option</replaceable> to the literate pre-processor</entry>
2063 <entry>dynamic</entry>
2067 <entry><option>-optP</option> <replaceable>option</replaceable></entry>
2068 <entry>pass <replaceable>option</replaceable> to cpp (with
2069 <option>-cpp</option> only)</entry>
2070 <entry>dynamic</entry>
2074 <entry><option>-optF</option> <replaceable>option</replaceable></entry>
2075 <entry>pass <replaceable>option</replaceable> to the
2076 custom pre-processor</entry>
2077 <entry>dynamic</entry>
2081 <entry><option>-optc</option> <replaceable>option</replaceable></entry>
2082 <entry>pass <replaceable>option</replaceable> to the C compiler</entry>
2083 <entry>dynamic</entry>
2087 <entry><option>-optlo</option> <replaceable>option</replaceable></entry>
2088 <entry>pass <replaceable>option</replaceable> to the LLVM optimiser</entry>
2089 <entry>dynamic</entry>
2093 <entry><option>-optlc</option> <replaceable>option</replaceable></entry>
2094 <entry>pass <replaceable>option</replaceable> to the LLVM compiler</entry>
2095 <entry>dynamic</entry>
2099 <entry><option>-optm</option> <replaceable>option</replaceable></entry>
2100 <entry>pass <replaceable>option</replaceable> to the mangler</entry>
2101 <entry>dynamic</entry>
2105 <entry><option>-opta</option> <replaceable>option</replaceable></entry>
2106 <entry>pass <replaceable>option</replaceable> to the assembler</entry>
2107 <entry>dynamic</entry>
2111 <entry><option>-optl</option> <replaceable>option</replaceable></entry>
2112 <entry>pass <replaceable>option</replaceable> to the linker</entry>
2113 <entry>dynamic</entry>
2117 <entry><option>-optdll</option> <replaceable>option</replaceable></entry>
2118 <entry>pass <replaceable>option</replaceable> to the DLL generator</entry>
2119 <entry>dynamic</entry>
2123 <entry><option>-optwindres</option> <replaceable>option</replaceable></entry>
2124 <entry>pass <replaceable>option</replaceable> to <literal>windres</literal>.</entry>
2125 <entry>dynamic</entry>
2134 <title>Platform-specific options</title>
2136 <para><xref linkend="options-platform"/></para>
2139 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2143 <entry>Description</entry>
2144 <entry>Static/Dynamic</entry>
2145 <entry>Reverse</entry>
2150 <entry><option>-msse2</option></entry>
2151 <entry>(x86 only) Use SSE2 for floating point</entry>
2152 <entry>dynamic</entry>
2158 <entry><option>-monly-[432]-regs</option></entry>
2159 <entry>(x86 only) give some registers back to the C compiler</entry>
2160 <entry>dynamic</entry>
2170 <title>External core file options</title>
2172 <para><xref linkend="ext-core"/></para>
2175 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2179 <entry>Description</entry>
2180 <entry>Static/Dynamic</entry>
2181 <entry>Reverse</entry>
2186 <entry><option>-fext-core</option></entry>
2187 <entry>Generate <filename>.hcr</filename> external Core files</entry>
2188 <entry>dynamic</entry>
2198 <title>Compiler debugging options</title>
2200 <para><xref linkend="options-debugging"/></para>
2203 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2207 <entry>Description</entry>
2208 <entry>Static/Dynamic</entry>
2209 <entry>Reverse</entry>
2214 <entry><option>-dcore-lint</option></entry>
2215 <entry>Turn on internal sanity checking</entry>
2216 <entry>dynamic</entry>
2220 <entry><option>-ddump-asm</option></entry>
2221 <entry>Dump assembly</entry>
2222 <entry>dynamic</entry>
2226 <entry><option>-ddump-bcos</option></entry>
2227 <entry>Dump interpreter byte code</entry>
2228 <entry>dynamic</entry>
2232 <entry><option>-ddump-cmm</option></entry>
2233 <entry>Dump C-- output</entry>
2234 <entry>dynamic</entry>
2238 <entry><option>-ddump-cpranal</option></entry>
2239 <entry>Dump output from CPR analysis</entry>
2240 <entry>dynamic</entry>
2244 <entry><option>-ddump-cse</option></entry>
2245 <entry>Dump CSE output</entry>
2246 <entry>dynamic</entry>
2250 <entry><option>-ddump-deriv</option></entry>
2251 <entry>Dump deriving output</entry>
2252 <entry>dynamic</entry>
2256 <entry><option>-ddump-ds</option></entry>
2257 <entry>Dump desugarer output</entry>
2258 <entry>dynamic</entry>
2262 <entry><option>-ddump-flatC</option></entry>
2263 <entry>Dump “flat” C</entry>
2264 <entry>dynamic</entry>
2268 <entry><option>-ddump-foreign</option></entry>
2269 <entry>Dump <literal>foreign export</literal> stubs</entry>
2270 <entry>dynamic</entry>
2274 <entry><option>-ddump-hpc</option></entry>
2275 <entry>Dump after instrumentation for program coverage</entry>
2276 <entry>dynamic</entry>
2280 <entry><option>-ddump-inlinings</option></entry>
2281 <entry>Dump inlining info</entry>
2282 <entry>dynamic</entry>
2286 <entry><option>-ddump-llvm</option></entry>
2287 <entry>Dump LLVM intermediate code</entry>
2288 <entry>dynamic</entry>
2292 <entry><option>-ddump-occur-anal</option></entry>
2293 <entry>Dump occurrence analysis output</entry>
2294 <entry>dynamic</entry>
2298 <entry><option>-ddump-opt-cmm</option></entry>
2299 <entry>Dump the results of C-- to C-- optimising passes</entry>
2300 <entry>dynamic</entry>
2304 <entry><option>-ddump-parsed</option></entry>
2305 <entry>Dump parse tree</entry>
2306 <entry>dynamic</entry>
2310 <entry><option>-ddump-prep</option></entry>
2311 <entry>Dump prepared core</entry>
2312 <entry>dynamic</entry>
2316 <entry><option>-ddump-rn</option></entry>
2317 <entry>Dump renamer output</entry>
2318 <entry>dynamic</entry>
2322 <entry><option>-ddump-rule-firings</option></entry>
2323 <entry>Dump rule firing info</entry>
2324 <entry>dynamic</entry>
2328 <entry><option>-ddump-rule-rewrites</option></entry>
2329 <entry>Dump detailed rule firing info</entry>
2330 <entry>dynamic</entry>
2334 <entry><option>-ddump-rules</option></entry>
2335 <entry>Dump rules</entry>
2336 <entry>dynamic</entry>
2340 <entry><option>-ddump-simpl</option></entry>
2341 <entry>Dump final simplifier output</entry>
2342 <entry>dynamic</entry>
2346 <entry><option>-ddump-simpl-phases</option></entry>
2347 <entry>Dump output from each simplifier phase</entry>
2348 <entry>dynamic</entry>
2352 <entry><option>-ddump-simpl-iterations</option></entry>
2353 <entry>Dump output from each simplifier iteration</entry>
2354 <entry>dynamic</entry>
2358 <entry><option>-ddump-spec</option></entry>
2359 <entry>Dump specialiser output</entry>
2360 <entry>dynamic</entry>
2364 <entry><option>-ddump-splices</option></entry>
2365 <entry>Dump TH spliced expressions, and what they evaluate to</entry>
2366 <entry>dynamic</entry>
2370 <entry><option>-ddump-stg</option></entry>
2371 <entry>Dump final STG</entry>
2372 <entry>dynamic</entry>
2376 <entry><option>-ddump-stranal</option></entry>
2377 <entry>Dump strictness analyser output</entry>
2378 <entry>dynamic</entry>
2382 <entry><option>-ddump-tc</option></entry>
2383 <entry>Dump typechecker output</entry>
2384 <entry>dynamic</entry>
2388 <entry><option>-ddump-types</option></entry>
2389 <entry>Dump type signatures</entry>
2390 <entry>dynamic</entry>
2394 <entry><option>-ddump-worker-wrapper</option></entry>
2395 <entry>Dump worker-wrapper output</entry>
2396 <entry>dynamic</entry>
2400 <entry><option>-ddump-if-trace</option></entry>
2401 <entry>Trace interface files</entry>
2402 <entry>dynamic</entry>
2406 <entry><option>-ddump-tc-trace</option></entry>
2407 <entry>Trace typechecker</entry>
2408 <entry>dynamic</entry>
2412 <entry><option>-ddump-rn-trace</option></entry>
2413 <entry>Trace renamer</entry>
2414 <entry>dynamic</entry>
2418 <entry><option>-ddump-rn-stats</option></entry>
2419 <entry>Renamer stats</entry>
2420 <entry>dynamic</entry>
2424 <entry><option>-ddump-simpl-stats</option></entry>
2425 <entry>Dump simplifier stats</entry>
2426 <entry>dynamic</entry>
2430 <entry><option>-dno-debug-output</option></entry>
2431 <entry>Suppress unsolicited debugging output</entry>
2432 <entry>static</entry>
2436 <entry><option>-dppr-debug</option></entry>
2437 <entry>Turn on debug printing (more verbose)</entry>
2438 <entry>static</entry>
2442 <entry><option>-dsuppress-uniques</option></entry>
2443 <entry>Suppress the printing of uniques in debug output (easier to use <command>diff</command>.</entry>
2444 <entry>static</entry>
2448 <entry><option>-dsuppress-coercions</option></entry>
2449 <entry>Suppress the printing of coercions in Core dumps to make them shorter.</entry>
2450 <entry>static</entry>
2454 <entry><option>-dsuppress-module-prefixes</option></entry>
2455 <entry>Suppress the printing of module qualification prefixes in Core dumps to make them easier to read.</entry>
2456 <entry>static</entry>
2460 <entry><option>-dppr-noprags</option></entry>
2461 <entry>Don't output pragma info in dumps</entry>
2462 <entry>static</entry>
2466 <entry><option>-dppr-user-length</option></entry>
2467 <entry>Set the depth for printing expressions in error msgs</entry>
2468 <entry>static</entry>
2472 <entry><option>-dsource-stats</option></entry>
2473 <entry>Dump haskell source stats</entry>
2474 <entry>dynamic</entry>
2478 <entry><option>-dcmm-lint</option></entry>
2479 <entry>C-- pass sanity checking</entry>
2480 <entry>dynamic</entry>
2484 <entry><option>-dstg-lint</option></entry>
2485 <entry>STG pass sanity checking</entry>
2486 <entry>dynamic</entry>
2490 <entry><option>-dstg-stats</option></entry>
2491 <entry>Dump STG stats</entry>
2492 <entry>dynamic</entry>
2496 <entry><option>-dverbose-core2core</option></entry>
2497 <entry>Show output from each core-to-core pass</entry>
2498 <entry>dynamic</entry>
2502 <entry><option>-dverbose-stg2stg</option></entry>
2503 <entry>Show output from each STG-to-STG pass</entry>
2504 <entry>dynamic</entry>
2508 <entry><option>-dshow-passes</option></entry>
2509 <entry>Print out each pass name as it happens</entry>
2510 <entry>dynamic</entry>
2514 <entry><option>-dfaststring-stats</option></entry>
2515 <entry>Show statistics for fast string usage when finished</entry>
2516 <entry>dynamic</entry>
2525 <title>Misc compiler options</title>
2528 <tgroup cols="4" align="left" colsep="1" rowsep="1">
2532 <entry>Description</entry>
2533 <entry>Static/Dynamic</entry>
2534 <entry>Reverse</entry>
2539 <entry><option>-fno-hi-version-check</option></entry>
2540 <entry>Don't complain about <literal>.hi</literal> file mismatches</entry>
2541 <entry>static</entry>
2545 <entry><option>-dno-black-holing</option></entry>
2546 <entry>Turn off black holing (probably doesn't work)</entry>
2547 <entry>static</entry>
2551 <entry><option>-fhistory-size</option></entry>
2552 <entry>Set simplification history size</entry>
2553 <entry>static</entry>
2557 <entry><option>-funregisterised</option></entry>
2558 <entry>Unregisterised compilation (use <option>-unreg</option> instead)</entry>
2559 <entry>static</entry>
2563 <entry><option>-fno-asm-mangling</option></entry>
2564 <entry>Turn off assembly mangling (use <option>-unreg</option> instead)</entry>
2565 <entry>dynamic</entry>
2569 <entry><option>-fno-ghci-sandbox</option></entry>
2570 <entry>Turn off the GHCi sandbox. Means computations are run in teh main thread, rather than a forked thread.</entry>
2571 <entry>dynamic</entry>
2585 , ( "H" , HasArg (setHeapSize . fromIntegral . decodeSize) )
2591 ;;; Local Variables: ***
2592 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***