Flag reference This section is a quick-reference for GHC's command-line flags. For each flag, we also list its static/dynamic status (see ), and the flag's opposite (if available). Help and verbosity options (<xref linkend="options-help">) Flag Description Static/Dynamic Reverse help static - help static - verbose mode (equivalent to ) dynamic - n set verbosity level dynamic - display GHC version static - display GHC version static - display GHC version (numeric only) static - display GHC library directory static - Which phases to run (<xref linkend="options-order">) Flag Description Static/Dynamic Reverse Stop after preprocessing (.hspp file) static - Stop after generating C (.hc file) static - Stop after generating assembly (.s file) static - Stop after compiling to object code (.o file) static - Redirecting output (<xref linkend="options-output">) Flag Description Static/Dynamic Reverse suffix set the suffix to use for intermediate C files static - dir set directory for interface files static - suffix set the suffix to use for interface files static - filename set output filename static - dir set output directory static - filename set the filename in which to put the interface static suffix set the output file suffix static - Keeping intermediate files (<xref linkend="keeping-intermediates">) Flag Description Static/Dynamic Reverse retain intermediate .hc files static - retain intermediate .s files static - retain intermediate .raw_s files static - retain all intermediate temporary files static - Temporary files (<xref linkend="temp-files">) Flag Description Static/Dynamic Reverse set the directory for temporary files static - Finding imports (<xref linkend="search-path">) Flag Description Static/Dynamic Reverse dir1:dir2:... add dir, dir2, etc. to import path static - Empty the import directory list static - Interface file options (<xref linkend="hi-options">) Flag Description Static/Dynamic Reverse Dump the new interface to stdout dynamic - Show the differences vs. the old interface dynamic - Dump a minimal set of imports dynamic - file Read the interface in file and dump it as text to stdout. static - Recompilation checking (<xref linkend="recomp">) Flag Description Static/Dynamic Reverse Turn off recompilation checking static Interactive-mode options (<xref linkend="ghci-dot-files">) Flag Description Static/Dynamic Reverse Disable reading of .ghci files static - Enable reading of .ghci files static - Packages (<xref linkend="packages">) Flag Description Static/Dynamic Reverse name Use package name static - file Load more packages from file static - name Compile code for package name static - Language options (<xref linkend="options-language">) Flag Description Static/Dynamic Reverse Enable overlapping instances dynamic Enable arrow notation extension dynamic Enable undecidable instances dynamic n set the limit for context reduction dynamic or Enable foreign function interface (implied by ) dynamic Enable generics dynamic Enable most language extensions dynamic Ignore assertions dynamic Enable Implicit Parameters dynamic Make tuple pattern matching irrefutable dynamic Don't implicitly import Prelude dynamic - Disable the monomorphism restriction dynamic Enable Template Haskell dynamic Enable deprecated with keyword dynamic Warnings (<xref linkend="options-sanity">) Flag Description Static/Dynamic Reverse enable normal warnings dynamic disable all warnings dynamic - enable all warnings dynamic make warnings fatal dynamic warn about uses of functions & types that are deprecated dynamic warn when an entity is exported multiple times dynamic warn when a .hi file in the current directory shadows a library dynamic warn when a pattern match could fail dynamic enable miscellaneous warnings dynamic warn when fields of a record are uninitialised dynamic warn when class methods are undefined dynamic warn about top-level functions without signatures dynamic warn when names are shadowed dynamic warn about overlapping patterns dynamic warn about lambda-patterns that can fail dynamic warn when defaulting happens dynamic warn about bindings that are unused dynamic warn about unnecessary imports dynamic warn about variables in patterns that aren't used dynamic Optimisation levels (<xref linkend="options-optimise">) Flag Description Static/Dynamic Reverse Enable default optimisation (level 1) static n Set optimisation level n static Individual optimisations (<xref linkend="options-f">) Flag Description Static/Dynamic Reverse Enable case-merging static Make dictionaries strict dynamic Enable eta-reduction static Enable lambda eta-reduction static Enable excess intermediate precision static Switch off all rewrite rules (including rules generated by automatic specialisation of overloaded functions) static Ignore assertions in the source static Ignore pragmas in interface files static Enable let-no-escape optimisation static Tweak the liberate-case optimisation (default: 10) static Don't generate interface pragmas static If a worker has that many arguments, none will be unpacked anymore (default: 10) static - Set the max iterations for the simplifier static - Turn off CPR analysis static - Turn off common sub-expression static - Turn off pre-inlining static - Turn off strictness analysis static - Make numbers strict dynamic Flatten strict constructor fields static Tweak unfolding settings static Tweak unfolding settings static Tweak unfolding settings static Tweak unfolding settings static Tweak unfolding settings static Turn on UsageSP analysis static Profiling options (<xref linkend="profiling">) Flag Description Static/Dynamic Reverse Auto-add _scc_s to all exported functions static Auto-add _scc_s to all top-level functions static Auto-add _scc_s to all dictionaries static Auto-add _scc_s to all CAFs static Turn on profiling static - Turn on ticky-ticky profiling static - Parallelism options (<xref linkend="sec-using-parallel">) Flag Description Static/Dynamic Reverse Enable GRANSIM static - Enable Parallel Haskell static - Enable SMP support static - C pre-processor options (<xref linkend="c-pre-processor">) Flag Description Static/Dynamic Reverse Run the C pre-processor on Haskell source files dynamic - symbol=value Define a symbol in the C pre-processor dynamic symbol symbol Undefine a symbol in the C pre-processor dynamic - dir Add dir to the directory search list for #include files static - C compiler options (<xref linkend="options-C-compiler">) Flag Description Static/Dynamic Reverse file Include file when compiling the .hc file dynamic - Code generation options (<xref linkend="options-codegen">) Flag Description Static/Dynamic Reverse Use the native code generator dynamic -fvia-C Compile via C dynamic -fasm Omit code generation static - Linking options (<xref linkend="options-linker">) Flag Description Static/Dynamic Reverse Use dynamic Haskell libraries (if available) static - name On Darwin/MacOS X only, link in the framework name. This option corresponds to the option for Apple's Linker. static - name On Darwin/MacOS X only, add dir to the list of directories searched for frameworks. This option corresponds to the option for Apple's Linker. static - lib Link in library lib static - dir Add dir to the list of directories searched for libraries static - Set main function static - Don't asssume this program contains main static - Omit linking static - name Link in package name static - Split objects (for libraries) static - Use static Haskell libraries static - Replacing phases (<xref linkend="replacing-phases">) Flag Description Static/Dynamic Reverse cmd Use cmd as the literate pre-processor static - cmd Use cmd as the C pre-processor (with only) static - cmd Use cmd as the C compiler static - cmd Use cmd as the assembler static - cmd Use cmd as the linker static - cmd Use cmd as the DLL generator static - cmd Use cmd as the dependency generator static - cmd Use cmd as the pre-processor (with only) static - Forcing options to particular phases (<xref linkend="forcing-options-through">) Flag Description Static/Dynamic Reverse option pass option to the literate pre-processor dynamic - option pass option to cpp (with only) dynamic - option pass option to the C compiler dynamic - option pass option to the assembler dynamic - option pass option to the linker static - option pass option to the DLL generator static - option pass option to the dependency generator static - Platform-specific options (<xref linkend="options-platform">) Flag Description Static/Dynamic Reverse (SPARC only) enable version 8 support static - (x86 only) give some registers back to the C compiler dynamic - External core file options (<xref linkend="ext-core">) Flag Description Static/Dynamic Reverse Generate .hcr external Core files static - Compiler debugging options (<xref linkend="options-debugging">) Flag Description Static/Dynamic Reverse Turn on internal sanity checking dynamic - Dump abstract C dynamic - Dump assembly dynamic - Dump interpreter byte code dynamic - Dump output from CPR analysis dynamic - Dump CSE output dynamic - Dump deriving output dynamic - Dump desugarer output dynamic - Dump “flat” C dynamic - Dump foreign export stubs dynamic - Dump inlining info dynamic - Dump occurrence analysis output dynamic - Dump parse tree dynamic - Dump “real” C dynamic - Dump renamer output dynamic - Dump rules dynamic - Dump saturated output dynamic - Dump final simplifier output dynamic - Dump output from each simplifier iteration dynamic - Dump specialiser output dynamic - Dump final STG dynamic - Dump strictness analyser output dynamic - Dump typechecker output dynamic - Dump type signatures dynamic - Dump UsageSP analysis output dynamic - Dump worker-wrapper output dynamic - Trace renamer dynamic - Renamer stats dynamic - Native code generator intermediate form dynamic - Dump simplifier stats dynamic - Turn on debug printing (more verbose) static - Don't output pragma info in dumps static - Set the depth for printing expressions in error msgs static - Dump haskell source stats dynamic - STG pass sanity checking dynamic - Dump STG stats dynamic - UsageSP sanity checker dynamic - Show output from each core-to-core pass dynamic - Show output from each STG-to-STG pass dynamic - Enable unregisterised compilation static - Misc compiler options Flag Description Static/Dynamic Reverse ??? static - Make all top-level names global (for ) static - Don't complain about .hi file mismatches static - Turn off black holing (probably doesn't work) static - Don't share specialisations of overloaded functions static - Renamer: don't prune declarations static - Set simplification history size static - Unregisterised compilation (use instead) static - Turn off assembly mangling (use instead) static -