1GHC(1)                     Glasgow Haskell Compiler                     GHC(1)
2
3
4

NAME

6       ghc - the Glasgow Haskell Compiler
7

SYNOPSIS

9          ghc [option|filename]
10          ghci [option|filename]
11

DESCRIPTION

13       This manual page documents briefly the ghc and ghci commands. Note that
14       ghci is not yet available on all architectures. Extensive documentation
15       is  available  in  various  other  formats including PDF <https://down
16       loads.haskell.org/ghc/latest/docs/users_guide.pdf>       and       HTML
17       <https://downloads.haskell.org/ghc/latest/docs/html/>.
18
19       Each  of  GHC's  command line options is classified as either static or
20       dynamic. A static flag may only  be  specified  on  the  command  line,
21       whereas  a  dynamic  flag  may  also be given in an OPTIONS pragma in a
22       source file or set from the GHCi command-line with :set .
23
24       As a rule of thumb, all the language options are dynamic,  as  are  the
25       warning options and the debugging options.
26
27       The  rest  are  static, with the notable exceptions of -v, -cpp, -fasm,
28       -fvia-C, -fllvm, and -#include.  The OPTIONS sections lists the  status
29       of each flag.
30
31       Common suffixes of file names for Haskell are:
32
33       .hs    Haskell source code; preprocess, compile
34
35       .lhs   literate Haskell source; unlit, preprocess, compile
36
37       .hi    Interface file; contains information about exported symbols
38
39       .hc    intermediate C files
40
41       .⟨way⟩_o
42              object files for "way" ⟨way⟩; common ways are:
43
44              dyn    dynamically-linked
45
46              p      built with profiling
47
48       .⟨way⟩_hi
49              interface files for "way" ⟨way⟩; common ways are:
50

OPTIONS

52       Code generation
53              -dynamic-too   -fasm   -fllvm   -fbyte-code  -fbyte-code-and-ob‐
54              ject-code   -fexpose-internal-symbols    -fexternal-dynamic-refs
55              -fllvm   -fasm   -fno-code   -fobject-code  -fPIC  -fPIE  -fpre‐
56              fer-byte-code    -fwrite-if-simplified-core    -fwrite-interface
57              -split-objs
58
59       Debugging the compiler
60              -dasm-lint  -dcmm-lint  -dcore-lint  -ddump-asm  -ddump-asm-con‐
61              flicts -ddump-asm-liveness -ddump-asm-native -ddump-asm-regalloc
62              -ddump-asm-regalloc-stages      -ddump-asm-stats     -ddump-bcos
63              -ddump-c-backend -ddump-call-arity -ddump-cfg-weights -ddump-cmm
64              -ddump-cmm-caf   -ddump-cmm-cbe   -ddump-cmm-cfg  -ddump-cmm-cps
65              -ddump-cmm-from-stg        -ddump-cmm-info        -ddump-cmm-opt
66              -ddump-cmm-proc         -ddump-cmm-procmap        -ddump-cmm-raw
67              -ddump-cmm-sink -ddump-cmm-sp -ddump-cmm-split -ddump-cmm-switch
68              -ddump-cmm-thread-sanitizer  -ddump-cmm-verbose  -ddump-cmm-ver‐
69              bose-by-proc       -ddump-core-stats       -ddump-cpr-signatures
70              -ddump-cpranal     -ddump-cs-trace    -ddump-cse    -ddump-debug
71              -ddump-deriv    -ddump-ds    -ddump-ds-preopt    -ddump-ec-trace
72              -ddump-exitify    -ddump-faststrings    -ddump-file-prefix=⟨str⟩
73              -ddump-foreign -ddump-hie -ddump-hpc -ddump-if-trace  -ddump-in‐
74              linings   -ddump-js   -ddump-json   -ddump-late-cc   -ddump-llvm
75              -ddump-mod-map  -ddump-occur-anal  -ddump-opt-cmm  -ddump-parsed
76              -ddump-parsed-ast     -ddump-prep     -ddump-rn    -ddump-rn-ast
77              -ddump-rn-stats -ddump-rn-trace -ddump-rtti  -ddump-rule-firings
78              -ddump-rule-rewrites  -ddump-rules -ddump-simpl -ddump-simpl-it‐
79              erations   -ddump-simpl-stats   -ddump-simpl-trace   -ddump-spec
80              -ddump-splices    -ddump-stg    -ddump-stg-cg   -ddump-stg-final
81              -ddump-stg-from-core     -ddump-stg-tags     -ddump-stg-unarised
82              -ddump-str-signatures   -ddump-stranal  -ddump-tc  -ddump-tc-ast
83              -ddump-tc-trace  -ddump-ticked   -ddump-timings   -ddump-to-file
84              -ddump-types  -ddump-verbose-inlinings  -ddump-view-pattern-com‐
85              moning -ddump-worker-wrapper -dfaststring-stats  -dhex-word-lit‐
86              erals   -dinitial-unique=⟨s⟩   -dinline-check=⟨str⟩  -dipe-stats
87              -dkeep-comments  -dlinear-core-lint   -dlint   -dno-debug-output
88              -ddebug-output       -dno-typeable-binds       -dppr-case-as-let
89              -dppr-cols=⟨n⟩ -dppr-debug -dppr-user-length  -drule-check=⟨str⟩
90              -dshow-passes    -dstg-lint    -dsuppress-all   -dsuppress-coer‐
91              cion-types  -dsuppress-coercions  -dsuppress-core-sizes   -dsup‐
92              press-idinfo -dsuppress-module-prefixes -dsuppress-stg-free-vars
93              -dsuppress-stg-reps    -dsuppress-ticks    -dsuppress-timestamps
94              -dsuppress-type-applications  -dsuppress-type-signatures  -dsup‐
95              press-unfoldings     -dsuppress-uniques     -dsuppress-var-kinds
96              -dtag-inference-checks    -dth-dec-file   -dunique-increment=⟨i⟩
97              -dverbose-core2core  -dverbose-stg2stg  -falignment-sanitisation
98              -fcatch-nonexhaustive-cases                  -fcheck-prim-bounds
99              -fcmm-thread-sanitizer             -fdistinct-constructor-tables
100              -fdump-with-ways -finfo-table-map -finfo-table-map-with-fallback
101              -fno-info-table-map-with-fallback    -finfo-table-map-with-stack
102              -fno-info-table-map-with-stack    -fllvm-fill-undef-with-garbage
103              -fno-info-table-map-with-fallback -finfo-table-map-with-fallback
104              -fno-info-table-map-with-stack       -finfo-table-map-with-stack
105              -fproc-alignment -g -g⟨n⟩
106
107       C pre-processor
108              -cpp -D⟨symbol⟩[=⟨value⟩] -U⟨symbol⟩ -I⟨dir⟩ -U⟨symbol⟩
109
110       Finding imports
111              -i -i⟨dir⟩[:⟨dir⟩]*
112
113       Interactive mode
114              -fbreak-on-error    -fno-break-on-error     -fbreak-on-exception
115              -fno-break-on-exception  -fghci-hist-size=⟨n⟩  -fghci-leak-check
116              -fno-ghci-leak-check    -fimplicit-import-qualified     -fno-im‐
117              plicit-import-qualified       -flocal-ghci-history      -fno-lo‐
118              cal-ghci-history    -fno-it    -fno-no-it    -fprint-bind-result
119              -fno-print-bind-result -fprint-evld-with-show -fshow-loaded-mod‐
120              ules -ghci-script -ignore-dot-ghci -no-ignore-dot-ghci -interac‐
121              tive-print ⟨name⟩
122
123       Interface files
124              --show-iface ⟨file⟩ -ddump-hi -ddump-hi-diffs -ddump-minimal-im‐
125              ports
126
127       Keeping intermediate files
128              -keep-hc-file  -keep-hc-files  -keep-hi-files  -no-keep-hi-files
129              -keep-hscpp-file        -keep-hscpp-files        -keep-llvm-file
130              -keep-llvm-files  -keep-o-files  -no-keep-o-files   -keep-s-file
131              -keep-s-files -keep-tmp-files
132
133       Language options
134              -XAllowAmbiguousTypes  -XApplicativeDo  -XArrows  -XBangPatterns
135              -XBinaryLiterals -XBlockArguments -XCApiFFI  -XConstrainedClass‐
136              Methods  -XConstraintKinds -XCPP -XCUSKs -XDataKinds -XDatatype‐
137              Contexts -XDeepSubsumption -XDefaultSignatures  -XDeriveAnyClass
138              -XDeriveDataTypeable -XDeriveFoldable -XDeriveFunctor -XDeriveG‐
139              eneric  -XDeriveLift  -XDeriveTraversable   -XDerivingStrategies
140              -XDerivingVia -XDisambiguateRecordFields -XDuplicateRecordFields
141              -XEmptyCase  -XEmptyDataDecls   -XEmptyDataDeriving   -XExisten‐
142              tialQuantification  -XExplicitForAll  -XExplicitNamespaces -XEx‐
143              tendedDefaultRules -XFieldSelectors -XFlexibleContexts  -XFlexi‐
144              bleInstances -XForeignFunctionInterface -XFunctionalDependencies
145              -XGADTs -XGADTSyntax -XGeneralisedNewtypeDeriving -XGeneralized‐
146              NewtypeDeriving  -XGHC2021  -XGHCForeignImportPrim -XHaskell2010
147              -XHaskell98 -XHexFloatLiterals  -XImplicitParams  -XImportQuali‐
148              fiedPost  -XImpredicativeTypes -XIncoherentInstances -XInstance‐
149              Sigs -XInterruptibleFFI -XKindSignatures -XLambdaCase -XLexical‐
150              Negation  -XLiberalTypeSynonyms -XLinearTypes -XMagicHash -XMon‐
151              adComprehensions -XMonoLocalBinds -XMultiParamTypeClasses -XMul‐
152              tiWayIf   -XNamedFieldPuns  -XNamedWildCards  -XNegativeLiterals
153              -XNoImplicitPrelude     -XNoMonomorphismRestriction     -XNonde‐
154              creasingIndentation  -XNoPatternGuards -XNoTraditionalRecordSyn‐
155              tax -XNPlusKPatterns -XNullaryTypeClasses -XNumDecimals -XNumer‐
156              icUnderscores  -XOverlappingInstances -XOverloadedLabels -XOver‐
157              loadedLists    -XOverloadedRecordDot    -XOverloadedRecordUpdate
158              -XOverloadedStrings  -XPackageImports  -XParallelListComp -XPar‐
159              tialTypeSignatures -XPatternSynonyms -XPolyKinds -XPostfixOpera‐
160              tors    -XQualifiedDo    -XQuantifiedConstraints   -XQuasiQuotes
161              -XRank2Types -XRankNTypes  -XRebindableSyntax  -XRecordWildCards
162              -XRecursiveDo   -XRoleAnnotations  -XSafe  -XScopedTypeVariables
163              -XStandaloneDeriving   -XStandaloneKindSignatures   -XStarIsType
164              -XStaticPointers  -XStrict -XStrictData -XTemplateHaskell -XTem‐
165              plateHaskellQuotes -XTransformListComp -XTrustworthy -XTupleSec‐
166              tions -XTypeApplications -XTypeData -XTypeFamilies -XTypeFamily‐
167              Dependencies -XTypeInType -XTypeOperators -XTypeSynonymInstances
168              -XUnboxedSums  -XUnboxedTuples -XUndecidableInstances -XUndecid‐
169              ableSuperClasses -XUnicodeSyntax  -XUnliftedDatatypes  -XUnlift‐
170              edFFITypes -XUnliftedNewtypes -XUnsafe -XViewPatterns
171
172       Linking options
173              -c -debug -dylib-install-name ⟨path⟩ -dynamic -dynload -eventlog
174              -fcompact-unwind  -fkeep-cafs   -flink-rts   -fno-embed-manifest
175              -fno-gen-manifest  -fno-shared-implib  -framework ⟨name⟩ -frame‐
176              work-path ⟨dir⟩ -fsplit-sections -split-sections -fno-split-sec‐
177              tions  -fuse-rpaths  -fwhole-archive-hs-libs  -L  ⟨dir⟩ -l ⟨lib⟩
178              -main-is ⟨thing⟩ -no-hs-main  -no-pie  -pie  -no-rtsopts-sugges‐
179              tions    -package    ⟨name⟩    -pie   -no-pie   -rdynamic   -rt‐
180              sopts[=⟨none|some|all|ignore|ignoreAll⟩] -shared -static -stati‐
181              clib -threaded -with-rtsopts=⟨opts⟩
182
183       Miscellaneous options
184              -ddump-mod-cycles    -fexternal-interpreter    -ffamily-applica‐
185              tion-cache     -fno-family-application-cache      -fglasgow-exts
186              -fno-glasgow-exts  -fno-safe-haskell  -ghcversion-file  ⟨path to
187              ghcversion.h⟩ -H ⟨size⟩  -hidden-module  ⟨module  name⟩  -j[⟨n⟩]
188              -reexported-module  ⟨module  name⟩  -this-package-name ⟨unit-id⟩
189              -unit @⟨filename⟩ -working-dir ⟨dir⟩
190
191       Modes of operation
192              --frontend ⟨module⟩ --help -? --info --interactive --make  --nu‐
193              meric-version    --print-booter-version   --print-build-platform
194              --print-c-compiler-flags           --print-c-compiler-link-flags
195              --print-debug-on  --print-global-package-db  --print-have-inter‐
196              preter --print-have-native-code-generator  --print-host-platform
197              --print-ld-flags    --print-leading-underscore    --print-libdir
198              --print-object-splitting-supported --print-project-git-commit-id
199              --print-project-version      --print-rts-ways      --print-stage
200              --print-support-smp   --print-tables-next-to-code   --print-tar‐
201              get-platform  --print-unregisterised  --run  ⟨file⟩ --show-iface
202              ⟨file⟩  --show-options  --supported-extensions  --supported-lan‐
203              guages --version -V -e ⟨expr⟩ -M -shared
204
205       Individual optimizations
206              -fasm-shortcutting  -fno-asm-shortcutting  -fbinary-blob-thresh‐
207              old=⟨n⟩  -fblock-layout-cfg  -fno-block-layout-cfg  -fblock-lay‐
208              out-weightless     -fno-block-layout-weightless     -fblock-lay‐
209              out-weights    -fcall-arity    -fno-call-arity    -fcase-folding
210              -fno-case-folding    -fcase-merge   -fno-case-merge   -fcmm-con‐
211              trol-flow     -fno-cmm-control-flow     -fcmm-elim-common-blocks
212              -fno-cmm-elim-common-blocks       -fcmm-sink       -fno-cmm-sink
213              -fcmm-static-pred  -fno-cmm-static-pred  -fcore-constant-folding
214              -fno-core-constant-folding -fcpr-anal -fno-cpr-anal -fcross-mod‐
215              ule-specialise   -fno-cross-module-specialise   -fcse   -fno-cse
216              -fdicts-cheap  -fno-dicts-cheap -fdicts-strict -fno-dicts-strict
217              -fdmd-tx-dict-sel   -fno-dmd-tx-dict-sel   -fdmd-unbox-width=⟨n⟩
218              -fdo-eta-reduction  -fno-do-eta-reduction -fdo-lambda-eta-expan‐
219              sion  -fno-do-lambda-eta-expansion   -feager-blackholing   -fen‐
220              able-rewrite-rules  -fno-enable-rewrite-rules -fexcess-precision
221              -fno-excess-precision -fexitification  -fno-exitification  -fex‐
222              pose-all-unfoldings     -fno-expose-all-unfoldings    -ffloat-in
223              -fno-float-in -ffull-laziness -fno-full-laziness  -ffun-to-thunk
224              -fno-fun-to-thunk   -fignore-asserts  -fno-ignore-asserts  -fig‐
225              nore-interface-pragmas    -fno-ignore-interface-pragmas    -fin‐
226              line-generics   -fno-inline-generics   -finline-generics-aggres‐
227              sively     -fno-inline-generics-aggressively     -flate-dmd-anal
228              -fno-late-dmd-anal -flate-specialise -fno-late-specialise -flib‐
229              erate-case   -fno-liberate-case    -fliberate-case-threshold=⟨n⟩
230              -fno-liberate-case-threshold  -fllvm-pass-vectors-in-regs  -flo‐
231              cal-float-out  -fno-local-float-out  -flocal-float-out-top-level
232              -fno-local-float-out-top-level  -floopification  -fno-loopifica‐
233              tion  -fmax-inline-alloc-size=⟨n⟩  -fmax-inline-memcpy-insns=⟨n⟩
234              -fmax-inline-memset-insns=⟨n⟩    -fmax-simplifier-iterations=⟨n⟩
235              -fmax-uncovered-patterns=⟨n⟩ -fmax-worker-args=⟨n⟩  -fno-opt-co‐
236              ercion  -fno-pre-inlining -fno-state-hack -fomit-interface-prag‐
237              mas -fno-omit-interface-pragmas  -fomit-yields  -fno-omit-yields
238              -foptimal-applicative-do   -fno-optimal-applicative-do  -fpedan‐
239              tic-bottoms  -fno-pedantic-bottoms  -fpolymorphic-specialisation
240              -fno-polymorphic-specialisation   -fregs-graph   -fno-regs-graph
241              -fregs-iterative   -fno-regs-iterative   -fsimpl-tick-factor=⟨n⟩
242              -fsimplifier-phases=⟨n⟩  -fsolve-constant-dicts  -fno-solve-con‐
243              stant-dicts    -fspec-constr    -fno-spec-constr     -fspec-con‐
244              str-count=⟨n⟩      -fno-spec-constr-count     -fspec-constr-keen
245              -fno-spec-constr-keen -fspec-constr-threshold=⟨n⟩ -fno-spec-con‐
246              str-threshold  -fspecialise -fno-specialise -fspecialise-aggres‐
247              sively -fno-specialise-aggressively  -fstatic-argument-transfor‐
248              mation       -fno-static-argument-transformation       -fstg-cse
249              -fno-stg-cse         -fstg-lift-lams          -fno-stg-lift-lams
250              -fstg-lift-lams-known                   -fno-stg-lift-lams-known
251              -fstg-lift-lams-non-rec-args    -fstg-lift-lams-non-rec-args-any
252              -fstg-lift-lams-rec-args  -fstg-lift-lams-rec-args-any -fstrict‐
253              ness     -fno-strictness      -fstrictness-before=⟨n⟩      -fun‐
254              box-small-strict-fields   -fno-unbox-small-strict-fields   -fun‐
255              box-strict-fields       -fno-unbox-strict-fields       -funfold‐
256              ing-case-scaling=⟨n⟩   -funfolding-case-threshold=⟨n⟩  -funfold‐
257              ing-creation-threshold=⟨n⟩  -funfolding-dict-discount=⟨n⟩  -fun‐
258              folding-fun-discount=⟨n⟩   -funfolding-keeness-factor=⟨n⟩  -fun‐
259              folding-use-threshold=⟨n⟩ -fworker-wrapper -fworker-wrapper-cbv
260
261       Optimization levels
262              -O -O1 -O0 -O0 -O2 -O0 -O⟨n⟩ -O0
263
264       Package options
265              -clear-package-db -distrust ⟨pkg⟩ -distrust-all-packages -fpack‐
266              age-trust  -global-package-db  -hide-all-packages  -hide-package
267              ⟨pkg⟩     -ignore-package      ⟨pkg⟩      -no-auto-link-packages
268              -no-global-package-db  -no-user-package-db -package ⟨pkg⟩ -pack‐
269              age-db ⟨file⟩ -package-env ⟨file⟩|⟨name⟩  -package-id  ⟨unit-id⟩
270              -this-unit-id ⟨unit-id⟩ -trust ⟨pkg⟩ -user-package-db
271
272       Phases of compilation
273              --merge-objs -C -c -E -F -S -x ⟨suffix⟩
274
275       Overriding external programs
276              -pgma  ⟨cmd⟩ -pgmc ⟨cmd⟩ -pgmcxx ⟨cmd⟩ -pgmdll ⟨cmd⟩ -pgmF ⟨cmd⟩
277              -pgmi ⟨cmd⟩ -pgminstall_name_tool ⟨cmd⟩ -pgmL ⟨cmd⟩ -pgml  ⟨cmd⟩
278              -pgmlc  ⟨cmd⟩  -pgmlm  ⟨cmd⟩  -pgmlo ⟨cmd⟩ -pgmotool ⟨cmd⟩ -pgmP
279              ⟨cmd⟩ -pgms ⟨cmd⟩ -pgmwindres ⟨cmd⟩
280
281       Phase-specific options
282              -opta ⟨option⟩ -optc ⟨option⟩ -optcxx ⟨option⟩ -optdll  ⟨option⟩
283              -optF  ⟨option⟩  -opti  ⟨option⟩  -optL  ⟨option⟩ -optl ⟨option⟩
284              -optlc ⟨option⟩ -optlm ⟨option⟩ -optlo ⟨option⟩  -optP  ⟨option⟩
285              -optwindres ⟨option⟩ -pgmc-supports-no-pie -pgml-supports-no-pie
286
287       Platform-specific options
288              -mavx  -mavx2  -mavx512cd  -mavx512er -mavx512f -mavx512pf -mbmi
289              -mbmi2 -msse -msse2 -msse3 -msse4 -msse4.2
290
291       Compiler plugins
292              -fclear-plugins     -fplugin-library=⟨file-path⟩;⟨unit-id⟩;⟨mod‐
293              ule⟩;⟨args⟩   -fplugin-opt=⟨module⟩:⟨args⟩  -fplugin-trustworthy
294              -fplugin=⟨module⟩   -hide-all-plugin-packages    -plugin-package
295              ⟨pkg⟩ -plugin-package-id ⟨pkg-id⟩
296
297       Profiling
298              -auto       -auto-all      -caf-all      -fno-prof-count-entries
299              -fprof-count-entries         -fprof-auto          -fno-prof-auto
300              -fprof-auto-calls       -fno-prof-auto      -fprof-auto-exported
301              -fno-prof-auto   -fprof-auto-top   -fno-prof-auto    -fprof-cafs
302              -fno-prof-cafs  -fprof-callers=⟨name⟩ -fprof-late -fno-prof-late
303              -fprof-late-inline      -fno-prof-late-inline      -fprof-manual
304              -fno-prof-manual  -no-auto -no-auto-all -no-caf-all -prof -ticky
305              -ticky-allocd   -ticky-ap-thunk   -ticky-dyn-thunk    -ticky-LNE
306              -ticky-tag-checks
307
308       Program coverage
309              -fhpc -hpcdir⟨dir⟩
310
311       Recompilation checking
312              -exclude-module=⟨file⟩  -fforce-recomp  -fno-force-recomp  -fig‐
313              nore-hpc-changes -fno-ignore-hpc-changes  -fignore-optim-changes
314              -fno-ignore-optim-changes -include-cpp-deps -include-pkg-deps
315
316       Redirecting output
317              -dep-makefile  ⟨file⟩  -dep-suffix ⟨suffix⟩ -dumpdir ⟨dir⟩ -dyn‐
318              hisuf ⟨suffix⟩ -dyno ⟨file⟩  -dynohi  ⟨file⟩  -dynosuf  ⟨suffix⟩
319              -hcsuf  ⟨suffix⟩  -hidir  ⟨dir⟩  -hiedir  ⟨dir⟩ -hiesuf ⟨suffix⟩
320              -hisuf ⟨suffix⟩ -o ⟨file⟩ -odir ⟨dir⟩ -ohi ⟨file⟩ -osuf ⟨suffix⟩
321              -outputdir ⟨dir⟩ -stubdir ⟨dir⟩
322
323       Temporary files
324              -tmpdir ⟨dir⟩
325
326       Verbosity options
327              -fabstract-refinement-hole-fits            -fno-abstract-refine‐
328              ment-hole-fits   -fdefer-diagnostics    -fdiagnostics-color=⟨al‐
329              ways|auto|never⟩      -fdiagnostics-show-caret     -fno-diagnos‐
330              tics-show-caret -ferror-spans  -fhide-source-paths  -fkeep-going
331              -fmax-refinement-hole-fits=⟨n⟩     -fno-max-refinement-hole-fits
332              -fmax-relevant-binds=⟨n⟩                 -fno-max-relevant-binds
333              -fmax-valid-hole-fits=⟨n⟩               -fno-max-valid-hole-fits
334              -fno-show-valid-hole-fits              -fno-sort-valid-hole-fits
335              -fsort-valid-hole-fits    -fprint-axiom-incomps   -fno-print-ax‐
336              iom-incomps -fprint-equality-relations -fno-print-equality-rela‐
337              tions   -fprint-expanded-synonyms   -fno-print-expanded-synonyms
338              -fprint-explicit-coercions         -fno-print-explicit-coercions
339              -fprint-explicit-foralls -fno-print-explicit-foralls -fprint-ex‐
340              plicit-kinds   -fno-print-explicit-kinds   -fprint-explicit-run‐
341              time-reps -fno-print-explicit-runtime-reps -fprint-potential-in‐
342              stances -fno-print-potential-instances  -fprint-redundant-promo‐
343              tion-ticks   -fno-print-redundant-promotion-ticks  -fprint-type‐
344              checker-elaboration           -fno-print-typechecker-elaboration
345              -fprint-unicode-syntax    -fno-print-unicode-syntax    -frefine‐
346              ment-level-hole-fits=⟨n⟩  -fno-refinement-level-hole-fits  -fre‐
347              verse-errors     -fno-reverse-errors    -fshow-docs-of-hole-fits
348              -fno-show-docs-of-hole-fits  -fshow-error-context  -fno-show-er‐
349              ror-context                              -fshow-hole-constraints
350              -fshow-hole-matches-of-hole-fits
351              -fno-show-hole-matches-of-hole-fits                -fshow-prove‐
352              nance-of-hole-fits             -fno-show-provenance-of-hole-fits
353              -fshow-type-app-of-hole-fits     -fno-show-type-app-of-hole-fits
354              -fshow-type-app-vars-of-hole-fits
355              -fno-show-type-app-vars-of-hole-fits    -fshow-type-of-hole-fits
356              -fno-show-type-of-hole-fits             -fsort-by-size-hole-fits
357              -fno-sort-by-size-hole-fits      -fsort-by-subsumption-hole-fits
358              -fno-sort-by-subsumption-hole-fits   -funclutter-valid-hole-fits
359              -Rghc-timing -v -v⟨n⟩
360
361       Warnings
362              -fdefer-out-of-scope-variables -fno-defer-out-of-scope-variables
363              -fdefer-type-errors  -fno-defer-type-errors  -fdefer-typed-holes
364              -fno-defer-typed-holes    -fenable-th-splice-warnings   -fno-en‐
365              able-th-splice-warnings   -fhelpful-errors   -fno-helpful-errors
366              -fmax-pmcheck-models=⟨n⟩  -fshow-warning-groups  -fno-show-warn‐
367              ing-groups -fvia-C -W -w -w  -Wall  -w  -Wall-missed-specialisa‐
368              tions  -Wno-all-missed-specialisations  -Wall-missed-specializa‐
369              tions     -Wno-all-missed-specializations     -Wambiguous-fields
370              -Wauto-orphans -Wcompat -Wno-compat -Wcompat-unqualified-imports
371              -Wno-compat-unqualified-imports  -Wcpp-undef   -Wdefault   -Wde‐
372              ferred-out-of-scope-variables   -Wno-deferred-out-of-scope-vari‐
373              ables -Wdeferred-type-errors -Wno-deferred-type-errors  -Wdepre‐
374              cated-flags  -Wno-deprecated-flags  -Wdeprecations -Wno-depreca‐
375              tions -Wderiving-defaults -Wno-deriving-defaults  -Wderiving-ty‐
376              peable -Wno-deriving-typeable -Wdodgy-exports -Wno-dodgy-exports
377              -Wdodgy-foreign-imports  -Wno-dodgy-foreign-imports  -Wdodgy-im‐
378              ports   -Wno-dodgy-imports  -Wduplicate-constraints  -Wno-dupli‐
379              cate-constraints   -Wduplicate-exports    -Wno-duplicate-exports
380              -Wempty-enumerations   -Wno-empty-enumerations   -Werror  -Wwarn
381              -Weverything -Wextra -w -Wforall-identifier  -Wno-forall-identi‐
382              fier      -Wgadt-mono-local-binds     -Wno-gadt-mono-local-binds
383              -Whi-shadowing  -Wno-hi-shadowing  -Widentities  -Wno-identities
384              -Wimplicit-kind-vars   -Wno-implicit-kind-vars   -Wimplicit-lift
385              -Wno-implicit-lift   -Wimplicit-prelude    -Wno-implicit-prelude
386              -Winaccessible-code -Wno-inaccessible-code -Wincomplete-patterns
387              -Wno-incomplete-patterns -Wincomplete-record-updates -Wno-incom‐
388              plete-record-updates    -Wincomplete-uni-patterns    -Wno-incom‐
389              plete-uni-patterns       -Winferred-safe-imports        -Wno-in‐
390              ferred-safe-imports       -Winline-rule-shadowing       -Wno-in‐
391              line-rule-shadowing    -Winvalid-haddock    -Wno-invalid-haddock
392              -Wloopy-superclass-solve    -Wno-loopy-superclass-solve   -Wmis‐
393              placed-pragmas -Wno-misplaced-pragmas  -Wmissed-extra-shared-lib
394              -Wno-missed-extra-shared-lib            -Wmissed-specialisations
395              -Wno-missed-specialisations             -Wmissed-specializations
396              -Wno-missed-specializations        -Wmissing-deriving-strategies
397              -Wno-missing-deriving-strategies          -Wmissing-export-lists
398              -Wno-missing-export-lists        -Wmissing-exported-pattern-syn‐
399              onym-signatures -Wno-missing-exported-pattern-synonym-signatures
400              -Wmissing-exported-signatures   -Wno-missing-exported-signatures
401              -Wmissing-exported-sigs    -Wno-missing-exported-sigs    -Wmiss‐
402              ing-fields -Wno-missing-fields -Wmissing-home-modules -Wno-miss‐
403              ing-home-modules     -Wmissing-import-lists     -Wno-missing-im‐
404              port-lists   -Wmissing-kind-signatures  -Wno-missing-kind-signa‐
405              tures  -Wmissing-local-signatures  -Wno-missing-local-signatures
406              -Wmissing-local-sigs  -Wno-missing-local-sigs  -Wmissing-methods
407              -Wno-missing-methods  -Wmissing-monadfail-instances   -Wno-miss‐
408              ing-monadfail-instances     -Wmissing-pattern-synonym-signatures
409              -Wno-missing-pattern-synonym-signatures                  -Wmiss‐
410              ing-safe-haskell-mode   -Wno-missing-safe-haskell-mode   -Wmiss‐
411              ing-signatures    -Wno-missing-signatures    -Wmissing-space-af‐
412              ter-bang  -Wmonomorphism-restriction  -Wno-monomorphism-restric‐
413              tion -Wname-shadowing -Wno-name-shadowing  -Wno-compat  -Wcompat
414              -Wnoncanonical-monad-instances -Wno-noncanonical-monad-instances
415              -Wnoncanonical-monadfail-instances      -Wno-noncanonical-monad‐
416              fail-instances  -Wnoncanonical-monoid-instances  -Wno-noncanoni‐
417              cal-monoid-instances  -Wnot  -Woperator-whitespace   -Wno-opera‐
418              tor-whitespace   -Woperator-whitespace-ext-conflict  -Wno-opera‐
419              tor-whitespace-ext-conflict   -Worphans   -Wno-orphans   -Wover‐
420              flowed-literals  -Wno-overflowed-literals -Woverlapping-patterns
421              -Wno-overlapping-patterns  -Wpartial-fields  -Wno-partial-fields
422              -Wpartial-type-signatures -Wno-partial-type-signatures -Wprepos‐
423              itive-qualified-module  -Wno-prepositive-qualified-module  -Wre‐
424              dundant-bang-patterns    -Wno-redundant-bang-patterns   -Wredun‐
425              dant-constraints       -Wno-redundant-constraints       -Wredun‐
426              dant-record-wildcards  -Wno-redundant-record-wildcards  -Wredun‐
427              dant-strictness-flags   -Wno-redundant-strictness-flags   -Wsafe
428              -Wno-safe  -Wsemigroup  -Wno-semigroup -Wsimplifiable-class-con‐
429              straints    -Wno-simplifiable-class-constraints    -Wstar-binder
430              -Wno-star-binder    -Wstar-is-type    -Wno-star-is-type   -Wtabs
431              -Wno-tabs    -Wtrustworthy-safe    -Wno-safe     -Wtype-defaults
432              -Wno-type-defaults -Wtype-equality-out-of-scope -Wno-type-equal‐
433              ity-out-of-scope              -Wtype-equality-requires-operators
434              -Wno-type-equality-requires-operators              -Wtyped-holes
435              -Wno-typed-holes       -Wunbanged-strict-patterns       -Wno-un‐
436              banged-strict-patterns -Wunicode-bidirectional-format-characters
437              -Wunrecognised-pragmas   -Wno-unrecognised-pragmas    -Wunrecog‐
438              nised-warning-flags   -Wno-unrecognised-warning-flags   -Wunsafe
439              -Wno-unsafe    -Wunsupported-calling-conventions     -Wno-unsup‐
440              ported-calling-conventions            -Wunsupported-llvm-version
441              -Wno-monomorphism-restriction   -Wunticked-promoted-constructors
442              -Wno-unticked-promoted-constructors    -Wunused-binds   -Wno-un‐
443              used-binds -Wunused-do-bind -Wno-unused-do-bind -Wunused-foralls
444              -Wno-unused-foralls     -Wunused-imports     -Wno-unused-imports
445              -Wunused-local-binds  -Wno-unused-local-binds   -Wunused-matches
446              -Wno-unused-matches    -Wunused-packages    -Wno-unused-packages
447              -Wunused-pattern-binds                 -Wno-unused-pattern-binds
448              -Wunused-record-wildcards           -Wno-unused-record-wildcards
449              -Wunused-top-binds -Wno-unused-top-binds  -Wunused-type-patterns
450              -Wno-unused-type-patterns -Wwarn -Werror -Wwarnings-deprecations
451              -Wno-warnings-deprecations -Wwrong-do-bind -Wno-wrong-do-bind
452
453   Code generation
454       -dynamic-too
455              Build dynamic object files as well as static object files during
456              compilation
457
458       -fasm  Use the native code generator
459
460       -fbyte-code
461              Generate byte-code
462
463       -fbyte-code-and-object-code
464              Generate object code and byte-code
465
466       -fexpose-internal-symbols
467              Produce symbols for all functions, including internal functions.
468
469       -fexternal-dynamic-refs
470              Generate code for linking against dynamic libraries
471
472       -fllvm Compile using the LLVM code generator
473
474       -fno-code
475              Omit code generation
476
477       -fobject-code
478              Generate object code
479
480       -fPIC  Generate position-independent code (where available)
481
482       -fPIE  Generate  code  for  a  position-independent  executable  (where
483              available)
484
485       -fprefer-byte-code
486              Use byte-code if it is available to evaluate TH splices
487
488       -fwrite-if-simplified-core
489              Write an interface file containing the simplified  core  of  the
490              module.
491
492       -fwrite-interface
493              Always write interface files
494
495       -split-objs
496              Split generated object files into smaller files
497
498   Debugging the compiler
499       -dasm-lint
500              ASM pass sanity checking
501
502       -dcmm-lint
503              C-\- pass sanity checking
504
505       -dcore-lint
506              Turn on internal sanity checking
507
508       -ddump-asm
509              Dump final assembly
510
511       -ddump-asm-conflicts
512              Dump register conflicts from the register allocator.
513
514       -ddump-asm-liveness
515              Dump assembly augmented with register liveness
516
517       -ddump-asm-native
518              Dump initial assembly
519
520       -ddump-asm-regalloc
521              Dump the result of register allocation
522
523       -ddump-asm-regalloc-stages
524              Dump the build/spill stages of the -fregs-graph register alloca‐
525              tor.
526
527       -ddump-asm-stats
528              Dump statistics from the register allocator.
529
530       -ddump-bcos
531              Dump interpreter byte code
532
533       -ddump-c-backend
534              Dump C code produced by the C (unregisterised) backend.
535
536       -ddump-call-arity
537              Dump output of the call arity analysis pass.
538
539       -ddump-cfg-weights
540              Dump the assumed weights of the CFG.
541
542       -ddump-cmm
543              Dump the final C-\- output
544
545       -ddump-cmm-caf
546              Dump the results of the C-\- CAF analysis pass.
547
548       -ddump-cmm-cbe
549              Dump the results of common block elimination
550
551       -ddump-cmm-cfg
552              Dump the results of the C-\- control flow optimisation pass.
553
554       -ddump-cmm-cps
555              Dump the results of the CPS pass
556
557       -ddump-cmm-from-stg
558              Dump STG-to-C-\- output
559
560       -ddump-cmm-info
561              Dump the results of the C-\- info table augmentation pass.
562
563       -ddump-cmm-opt
564              Dump the results of C-\- to C-\- optimising passes
565
566       -ddump-cmm-proc
567              Dump the results of proc-point analysis
568
569       -ddump-cmm-procmap
570              Dump the results of the C-\- proc-point map pass.
571
572       -ddump-cmm-raw
573              Dump raw C-\-
574
575       -ddump-cmm-sink
576              Dump the results of the C-\- sinking pass.
577
578       -ddump-cmm-sp
579              Dump the results of the C-\- stack layout pass.
580
581       -ddump-cmm-split
582              Dump the results of the C-\- proc-point splitting pass.
583
584       -ddump-cmm-switch
585              Dump the results of switch lowering passes
586
587       -ddump-cmm-thread-sanitizer
588              Dump the results of the C-\- ThreadSanitizer elaboration pass.
589
590       -ddump-cmm-verbose
591              Write output from main C-\- pipeline passes to files
592
593       -ddump-cmm-verbose-by-proc
594              Show output from main C-\- pipeline passes (grouped by proc)
595
596       -ddump-core-stats
597              Print a one-line summary of the size of the Core program at  the
598              end of the optimisation pipeline
599
600       -ddump-cpr-signatures
601              Dump CPR signatures
602
603       -ddump-cpranal
604              Dump CPR analysis output
605
606       -ddump-cs-trace
607              Trace constraint solver
608
609       -ddump-cse
610              Dump CSE output
611
612       -ddump-debug
613              Dump generated DWARF debug information
614
615       -ddump-deriv
616              Dump deriving output
617
618       -ddump-ds
619              Dump desugarer output.
620
621       -ddump-ec-trace
622              Trace exhaustiveness checker
623
624       -ddump-exitify
625              Dump output of the exitification pass.
626
627       -ddump-faststrings
628              Dump the whole FastString table when finished
629
630       -ddump-file-prefix=⟨str⟩
631              Set the prefix of the filenames used for debugging output.
632
633       -ddump-foreign
634              Dump foreign export stubs
635
636       -ddump-hie
637              Dump the hie file syntax tree
638
639       -ddump-hpc
640              An alias for -ddump-ticked.
641
642       -ddump-if-trace
643              Trace interface files
644
645       -ddump-inlinings
646              Dump inlinings performed by the simplifier.
647
648       -ddump-js
649              Dump final JavaScript code
650
651       -ddump-json
652              Dump error messages as JSON documents
653
654       -ddump-late-cc
655              Dump core with late cost centres added
656
657       -ddump-llvm
658              Dump LLVM intermediate code.
659
660       -ddump-mod-map
661              Dump the state of the module mapping database.
662
663       -ddump-occur-anal
664              Dump occurrence analysis output
665
666       -ddump-opt-cmm
667              Dump the results of C-\- to C-\- optimising passes
668
669       -ddump-parsed
670              Dump parse tree
671
672       -ddump-parsed-ast
673              Dump parser output as a syntax tree
674
675       -ddump-prep
676              Dump prepared core
677
678       -ddump-rn
679              Dump renamer output
680
681       -ddump-rn-ast
682              Dump renamer output as a syntax tree
683
684       -ddump-rn-stats
685              Renamer stats
686
687       -ddump-rn-trace
688              Trace renamer
689
690       -ddump-rtti
691              Trace runtime type inference
692
693       -ddump-rule-firings
694              Dump rule firing info
695
696       -ddump-rule-rewrites
697              Dump detailed rule firing info
698
699       -ddump-rules
700              Dump rewrite rules
701
702       -ddump-simpl
703              Dump final simplifier output
704
705       -ddump-simpl-iterations
706              Dump output from each simplifier iteration
707
708       -ddump-simpl-stats
709              Dump simplifier stats
710
711       -ddump-simpl-trace
712              Dump trace messages in simplifier
713
714       -ddump-spec
715              Dump specialiser output
716
717       -ddump-splices
718              Dump TH spliced expressions, and what they evaluate to
719
720       -ddump-stg
721              (deprecated) Alias for -ddump-stg-from-core
722
723       -ddump-stg-cg
724              Show output after Stg2Stg
725
726       -ddump-stg-final
727              Show output of last STG pass.
728
729       -ddump-stg-from-core
730              Show CoreToStg output
731
732       -ddump-stg-tags
733              Show output of the tag inference pass.
734
735       -ddump-stg-unarised
736              Show unarised STG
737
738       -ddump-str-signatures
739              Dump top-level demand signatures
740
741       -ddump-stranal
742              Dump demand analysis output
743
744       -ddump-tc
745              Dump typechecker output
746
747       -ddump-tc-ast
748              Dump typechecker output as a syntax tree
749
750       -ddump-tc-trace
751              Trace typechecker
752
753       -ddump-ticked
754              Dump the code instrumented by HPC (Observing Code Coverage).
755
756       -ddump-timings
757              Dump per-pass timing and allocation statistics
758
759       -ddump-to-file
760              Dump to files instead of stdout
761
762       -ddump-types
763              Dump type signatures
764
765       -ddump-verbose-inlinings
766              Dump all considered inlinings
767
768       -ddump-view-pattern-commoning
769              Dump commoned view patterns
770
771       -ddump-worker-wrapper
772              Dump worker-wrapper output
773
774       -dfaststring-stats
775              Show statistics for fast string usage when finished
776
777       -dhex-word-literals
778              Print values of type Word# in hexadecimal.
779
780       -dinitial-unique=⟨s⟩
781              Start UniqSupply allocation from ⟨s⟩.
782
783       -dinline-check=⟨str⟩
784              Dump information about inlining decisions
785
786       -dipe-stats
787              Show statistics about IPE information
788
789       -dkeep-comments
790              Include  comments  in  the  parser.   Useful in combination with
791              -ddump-parsed-ast.
792
793       -dlinear-core-lint
794              Turn on internal sanity checking
795
796       -dlint Enable several common internal sanity checkers
797
798       -dno-debug-output
799              Suppress unsolicited debugging output
800
801       -dno-typeable-binds
802              Don't generate bindings for Typeable methods
803
804       -dppr-case-as-let
805              Print single alternative case expressions as strict lets.
806
807       -dppr-cols=⟨n⟩
808              Set the width of debugging output. For example -dppr-cols200
809
810       -dppr-debug
811              Turn on debug printing (more verbose)
812
813       -dppr-user-length
814              Set the depth for printing expressions in error msgs
815
816       -drule-check=⟨str⟩
817              Dump information about potential rule application
818
819       -dshow-passes
820              Print out each pass name as it happens
821
822       -dstg-lint
823              STG pass sanity checking
824
825       -dsuppress-all
826              In dumps, suppress everything (except for uniques) that is  sup‐
827              pressible.
828
829       -dsuppress-coercion-types
830              Suppress  the  printing  of coercion types in Core dumps to make
831              them shorter
832
833       -dsuppress-coercions
834              Suppress the printing of coercions in Core dumps  to  make  them
835              shorter
836
837       -dsuppress-core-sizes
838              Suppress the printing of core size stats per binding (since 9.4)
839
840       -dsuppress-idinfo
841              Suppress  extended  information about identifiers where they are
842              bound
843
844       -dsuppress-module-prefixes
845              Suppress the printing of module qualification prefixes
846
847       -dsuppress-stg-free-vars
848              Suppress the printing of closure free variable lists in STG out‐
849              put
850
851       -dsuppress-stg-reps
852              Suppress rep annotations on STG args.
853
854       -dsuppress-ticks
855              Suppress "ticks" in the pretty-printer output.
856
857       -dsuppress-timestamps
858              Suppress timestamps in dumps
859
860       -dsuppress-type-applications
861              Suppress type applications
862
863       -dsuppress-type-signatures
864              Suppress type signatures
865
866       -dsuppress-unfoldings
867              Suppress  the  printing of the stable unfolding of a variable at
868              its binding site
869
870       -dsuppress-uniques
871              Suppress the printing of uniques in debug output (easier to  use
872              diff)
873
874       -dsuppress-var-kinds
875              Suppress the printing of variable kinds
876
877       -dtag-inference-checks
878              Affirm tag inference results are correct at runtime.
879
880       -dth-dec-file
881              Dump evaluated TH declarations into *.th.hs files
882
883       -dunique-increment=⟨i⟩
884              Set the increment for the generated Unique's to ⟨i⟩.
885
886       -dverbose-core2core
887              Show output from each core-to-core pass
888
889       -dverbose-stg2stg
890              Show output from each STG-to-STG pass
891
892       -falignment-sanitisation
893              Compile with alignment checks for all info table dereferences.
894
895       -fcatch-nonexhaustive-cases
896              Add  a  default  error alternative to case expressions without a
897              default alternative.
898
899       -fcheck-prim-bounds
900              Instrument array primops with bounds checks.
901
902       -fcmm-thread-sanitizer
903              Enable ThreadSanitizer instrumentation of memory accesses.
904
905       -fdistinct-constructor-tables
906              Generate a fresh info table for each usage of a  data  construc‐
907              tor.
908
909       -fdump-with-ways
910              Include  the  tag  of  the enabled ways in the extension of dump
911              files.
912
913       -finfo-table-map
914              Embed a lookup table in the generated binary which maps the  ad‐
915              dress of an info table to the source position the closure origi‐
916              nated from.
917
918       -finfo-table-map-with-fallback
919              Include info tables with no source location information  in  the
920              info table map.
921
922       -finfo-table-map-with-stack
923              Include info tables for STACK closures in the info table map.
924
925       -fllvm-fill-undef-with-garbage
926              Intruct LLVM to fill dead STG registers with garbage
927
928       -fno-info-table-map-with-fallback
929              Omit  info  tables  with no source location information from the
930              info table map.
931
932       -fno-info-table-map-with-stack
933              Omit info tables for STACK closures from the info table map.
934
935       -fproc-alignment
936              Align functions at given boundary.
937
938       -g     Produce DWARF debug information in compiled object  files.   ⟨n⟩
939              can  be 0, 1, or 2, with higher numbers producing richer output.
940              If ⟨n⟩ is omitted, level 2 is assumed.
941
942   C pre-processor
943       -cpp   Run the C pre-processor on Haskell source files
944
945       -D⟨symbol⟩[=⟨value⟩]
946              Define a symbol in the C pre-processor
947
948       -I⟨dir⟩
949              Add ⟨dir⟩ to the directory search list for #include files
950
951       -U⟨symbol⟩
952              Undefine a symbol in the C pre-processor
953
954   Finding imports
955       -i     Empty the import directory list
956
957       -i⟨dir⟩[:⟨dir⟩]*
958              add ⟨dir⟩, ⟨dir2⟩, etc. to import path
959
960   Interactive mode
961       -fbreak-on-error
962              Break on uncaught exceptions and errors
963
964       -fbreak-on-exception
965              Break on any exception thrown
966
967       -fghci-hist-size=⟨n⟩
968              Set the number of entries GHCi keeps for :history.  See The GHCi
969              Debugger.
970
971       -fghci-leak-check
972              (Debugging  only) check for space leaks when loading new modules
973              in GHCi.
974
975       -fimplicit-import-qualified
976              Put in scope qualified identifiers for every loaded module
977
978       -flocal-ghci-history
979              Use  current  directory  for  the  GHCi  command  history   file
980              .ghci-history.
981
982       -fno-it
983              No longer set the special variable it.
984
985       -fprint-bind-result
986              Turn on printing of binding results in GHCi
987
988       -fprint-evld-with-show
989              Instruct :print to use Show instances where possible.
990
991       -fshow-loaded-modules
992              Show  the  names  of modules that GHCi loaded after a :load com‐
993              mand.
994
995       -ghci-script
996              Read additional .ghci files
997
998       -ignore-dot-ghci
999              Disable reading of .ghci files
1000
1001       -interactive-print ⟨name⟩
1002              Select the function to use for printing evaluated expressions in
1003              GHCi
1004
1005   Interface files
1006       --show-iface ⟨file⟩
1007              See Modes of operation.
1008
1009       -ddump-hi
1010              Dump the new interface to stdout
1011
1012       -ddump-hi-diffs
1013              Show the differences vs. the old interface
1014
1015       -ddump-minimal-imports
1016              Dump a minimal set of imports
1017
1018   Keeping intermediate files
1019       -keep-hc-file
1020              Retain intermediate .hc files.
1021
1022       -keep-hi-files
1023              Retain intermediate .hi files (the default).
1024
1025       -keep-hscpp-file
1026              Retain intermediate .hscpp files.
1027
1028       -keep-llvm-file
1029              Retain intermediate LLVM .ll files.  Implies -fllvm.
1030
1031       -keep-o-files
1032              Retain intermediate .o files (the default).
1033
1034       -keep-s-file
1035              Retain intermediate .s files.
1036
1037       -keep-tmp-files
1038              Retain all intermediate temporary files.
1039
1040   Language options
1041       -XAllowAmbiguousTypes
1042              Allow  the user to write ambiguous types, and the type inference
1043              engine to infer them.
1044
1045       -XApplicativeDo
1046              Enable Applicative do-notation desugaring
1047
1048       -XArrows
1049              Enable arrow notation extension
1050
1051       -XBangPatterns
1052              Enable bang patterns.
1053
1054       -XBinaryLiterals
1055              Enable support for binary literals.
1056
1057       -XBlockArguments
1058              Allow do blocks and other constructs as function arguments.
1059
1060       -XCApiFFI
1061              Enable the CAPI calling convention.
1062
1063       -XConstrainedClassMethods
1064              Enable constrained class methods.
1065
1066       -XConstraintKinds
1067              Enable a kind of constraints.
1068
1069       -XCPP  Enable the C preprocessor.
1070
1071       -XCUSKs
1072              Enable detection of complete user-supplied kind signatures.
1073
1074       -XDataKinds
1075              Enable datatype promotion.
1076
1077       -XDatatypeContexts
1078              Allow contexts on data types.
1079
1080       -XDeepSubsumption
1081              Enable deep subsumption
1082
1083       -XDefaultSignatures
1084              Enable default signatures.
1085
1086       -XDeriveAnyClass
1087              Enable deriving for any class.
1088
1089       -XDeriveDataTypeable
1090              Enable deriving for the Data class.
1091
1092       -XDeriveFoldable
1093              Enable  deriving   for   the   Foldable   class.    Implied   by
1094              DeriveTraversable.
1095
1096       -XDeriveFunctor
1097              Enable   deriving   for   the   Functor   class.    Implied   by
1098              DeriveTraversable.
1099
1100       -XDeriveGeneric
1101              Enable deriving for the Generic class.
1102
1103       -XDeriveLift
1104              Enable deriving for the Lift class
1105
1106       -XDeriveTraversable
1107              Enable   deriving   for   the   Traversable   class.     Implies
1108              DeriveFunctor and DeriveFoldable.
1109
1110       -XDerivingStrategies
1111              Enables deriving strategies.
1112
1113       -XDerivingVia
1114              Enable  deriving  instances via types of the same runtime repre‐
1115              sentation.  Implies DerivingStrategies.
1116
1117       -XDisambiguateRecordFields
1118              Enable record field disambiguation.  Implied by RecordWildCards.
1119
1120       -XDuplicateRecordFields
1121              Allow definition of record types with identically-named fields.
1122
1123       -XEmptyCase
1124              Allow empty case alternatives.
1125
1126       -XEmptyDataDecls
1127              Allow definition of empty data types.
1128
1129       -XEmptyDataDeriving
1130              Allow deriving instances of standard type classes for empty data
1131              types.
1132
1133       -XExistentialQuantification
1134              Enable liberalised type synonyms.
1135
1136       -XExplicitForAll
1137              Enable    explicit   universal   quantification.    Implied   by
1138              ScopedTypeVariables,   LiberalTypeSynonyms,    RankNTypes    and
1139              ExistentialQuantification.
1140
1141       -XExplicitNamespaces
1142              Enable  using  the  keyword type to specify the namespace of en‐
1143              tries in imports and exports (Explicit namespaces in  import/ex‐
1144              port).  Implied by TypeOperators and TypeFamilies.
1145
1146       -XExtendedDefaultRules
1147              Use GHCi's extended default rules in a normal module.
1148
1149       -XFieldSelectors
1150              Control visibility of field selector functions.
1151
1152       -XFlexibleContexts
1153              Remove some restrictions on class contexts
1154
1155       -XFlexibleInstances
1156              Enable flexible instances.  Implies TypeSynonymInstances.
1157
1158       -XForeignFunctionInterface
1159              Enable foreign function interface.
1160
1161       -XFunctionalDependencies
1162              Enable functional dependencies.  Implies MultiParamTypeClasses.
1163
1164       -XGADTs
1165              Enable generalised algebraic data types.  Implies GADTSyntax and
1166              MonoLocalBinds.
1167
1168       -XGADTSyntax
1169              Enable generalised algebraic data type syntax.
1170
1171       -XGeneralisedNewtypeDeriving
1172              Enable newtype deriving.
1173
1174       -XGeneralizedNewtypeDeriving
1175              Enable newtype deriving.
1176
1177       -XGHC2021
1178              Use GHC’s set of default language extensions from 2021
1179
1180       -XGHCForeignImportPrim
1181              Enable prim calling convention. Intended for internal use only.
1182
1183       -XHaskell2010
1184              Use the Haskell 2010 language variant.
1185
1186       -XHaskell98
1187              Use the Haskell 98 language variant.
1188
1189       -XHexFloatLiterals
1190              Enable support for hexadecimal floating point literals.
1191
1192       -XImplicitParams
1193              Enable Implicit Parameters.
1194
1195       -XImportQualifiedPost
1196              ImportQualifiedPost allows the syntax import M qualified
1197
1198       -XImpredicativeTypes
1199              Enable impredicative types.  Implies RankNTypes.
1200
1201       -XIncoherentInstances
1202              Enable incoherent instances.  Implies OverlappingInstances.
1203
1204       -XInstanceSigs
1205              Enable instance signatures.
1206
1207       -XInterruptibleFFI
1208              Enable interruptible FFI.
1209
1210       -XKindSignatures
1211              Enable kind signatures.  Implied by TypeFamilies and PolyKinds.
1212
1213       -XLambdaCase
1214              Enable lambda-case expressions.
1215
1216       -XLexicalNegation
1217              Use whitespace to determine whether the minus  sign  stands  for
1218              negation or subtraction.
1219
1220       -XLiberalTypeSynonyms
1221              Enable liberalised type synonyms.
1222
1223       -XLinearTypes
1224              Enable linear types.
1225
1226       -XMagicHash
1227              Allow # as a postfix modifier on identifiers.
1228
1229       -XMonadComprehensions
1230              Enable monad comprehensions.
1231
1232       -XMonoLocalBinds
1233              Enable   do   not   generalise   local   bindings.   Implied  by
1234              TypeFamilies and GADTs.
1235
1236       -XMultiParamTypeClasses
1237              Enable   multi   parameter    type    classes.     Implied    by
1238              FunctionalDependencies.
1239
1240       -XMultiWayIf
1241              Enable multi-way if-expressions.
1242
1243       -XNamedFieldPuns
1244              Enable record puns.
1245
1246       -XNamedWildCards
1247              Enable named wildcards.
1248
1249       -XNegativeLiterals
1250              Enable support for negative literals.
1251
1252       -XNoImplicitPrelude
1253              Don't implicitly import Prelude.  Implied by RebindableSyntax.
1254
1255       -XNoMonomorphismRestriction
1256              Disable the monomorphism restriction.
1257
1258       -XNondecreasingIndentation
1259              Allow nested contexts to be at the same indentation level as its
1260              enclosing context.
1261
1262       -XNoPatternGuards
1263              Disable pattern guards.  Implied by Haskell98.
1264
1265       -XNoTraditionalRecordSyntax
1266              Disable support for traditional record syntax (as  supported  by
1267              Haskell 98) C {f = x}
1268
1269       -XNPlusKPatterns
1270              Enable support for n+k patterns.  Implied by Haskell98.
1271
1272       -XNullaryTypeClasses
1273              Deprecated,  does  nothing.  nullary (no parameter) type classes
1274              are now enabled using MultiParamTypeClasses.
1275
1276       -XNumDecimals
1277              Enable support for 'fractional' integer literals.
1278
1279       -XNumericUnderscores
1280              Enable support for numeric underscores.
1281
1282       -XOverlappingInstances
1283              Enable overlapping instances.
1284
1285       -XOverloadedLabels
1286              Enable overloaded labels.
1287
1288       -XOverloadedLists
1289              Enable overloaded lists.
1290
1291       -XOverloadedRecordDot
1292              Record '.' syntax
1293
1294       -XOverloadedRecordUpdate
1295              Record '.' syntax record updates
1296
1297       -XOverloadedStrings
1298              Enable overloaded string literals.
1299
1300       -XPackageImports
1301              Enable package-qualified imports.
1302
1303       -XParallelListComp
1304              Enable parallel list comprehensions.
1305
1306       -XPartialTypeSignatures
1307              Enable partial type signatures.
1308
1309       -XPatternSynonyms
1310              Enable pattern synonyms.
1311
1312       -XPolyKinds
1313              Enable kind polymorphism.  Implies KindSignatures.
1314
1315       -XPostfixOperators
1316              Enable postfix operators.
1317
1318       -XQualifiedDo
1319              Enable qualified do-notation desugaring.
1320
1321       -XQuantifiedConstraints
1322              Allow forall quantifiers in constraints.
1323
1324       -XQuasiQuotes
1325              Enable quasiquotation.
1326
1327       -XRank2Types
1328              Enable rank-2 types.  Synonym for RankNTypes.
1329
1330       -XRankNTypes
1331              Enable rank-N types.  Implied by ImpredicativeTypes.
1332
1333       -XRebindableSyntax
1334              Employ rebindable syntax.  Implies NoImplicitPrelude.
1335
1336       -XRecordWildCards
1337              Enable record wildcards.  Implies DisambiguateRecordFields.
1338
1339       -XRecursiveDo
1340              Enable recursive do (mdo) notation.
1341
1342       -XRoleAnnotations
1343              Enable role annotations.
1344
1345       -XSafe Enable the Safe Haskell Safe mode.
1346
1347       -XScopedTypeVariables
1348              Enable lexically-scoped type variables.
1349
1350       -XStandaloneDeriving
1351              Enable standalone deriving.
1352
1353       -XStandaloneKindSignatures
1354              Allow the use of standalone kind signatures.
1355
1356       -XStarIsType
1357              Treat * as Data.Kind.Type.
1358
1359       -XStaticPointers
1360              Enable static pointers.
1361
1362       -XStrict
1363              Make bindings in the current module strict by default.
1364
1365       -XStrictData
1366              Enable default strict datatype fields.
1367
1368       -XTemplateHaskell
1369              Enable Template Haskell.
1370
1371       -XTemplateHaskellQuotes
1372              Enable quotation subset of Template Haskell.
1373
1374       -XTransformListComp
1375              Enable generalised list comprehensions.
1376
1377       -XTrustworthy
1378              Enable the Safe Haskell Trustworthy mode.
1379
1380       -XTupleSections
1381              Enable tuple sections.
1382
1383       -XTypeApplications
1384              Enable type application syntax in terms, patterns and types.
1385
1386       -XTypeData
1387              Enable type data declarations.
1388
1389       -XTypeFamilies
1390              Enable    type    families.      Implies     ExplicitNamespaces,
1391              KindSignatures, and MonoLocalBinds.
1392
1393       -XTypeFamilyDependencies
1394              Enable injective type families.  Implies TypeFamilies.
1395
1396       -XTypeInType
1397              Deprecated. Enable kind polymorphism and datatype promotion.
1398
1399       -XTypeOperators
1400              Enable type operators.  Implies ExplicitNamespaces.
1401
1402       -XTypeSynonymInstances
1403              Enable   type   synonyms   in   instance   heads.    Implied  by
1404              FlexibleInstances.
1405
1406       -XUnboxedSums
1407              Enable unboxed sums.
1408
1409       -XUnboxedTuples
1410              Enable the use of unboxed tuple syntax.
1411
1412       -XUndecidableInstances
1413              Enable undecidable instances.
1414
1415       -XUndecidableSuperClasses
1416              Allow all superclass constraints, including those that  may  re‐
1417              sult in non-termination of the typechecker.
1418
1419       -XUnicodeSyntax
1420              Enable unicode syntax.
1421
1422       -XUnliftedDatatypes
1423              Enable unlifted data types.
1424
1425       -XUnliftedFFITypes
1426              Enable unlifted FFI types
1427
1428       -XUnliftedNewtypes
1429              Enable unlifted newtypes.
1430
1431       -XUnsafe
1432              Enable Safe Haskell Unsafe mode.
1433
1434       -XViewPatterns
1435              Enable view patterns.
1436
1437   Linking options
1438       -c     Stop after generating object (.o) file
1439
1440       -debug Use the debugging runtime
1441
1442       -dylib-install-name ⟨path⟩
1443              Set  the  install  name  (via  -install_name  passed  to Apple's
1444              linker), specifying the full install path of the  library  file.
1445              Any  libraries  or executables that link with it later will pick
1446              up that path as their runtime search  location  for  it.   (Dar‐
1447              win/OS X only)
1448
1449       -dynamic
1450              Build dynamically-linked object files and executables
1451
1452       -dynload
1453              Selects one of a number of modes for finding shared libraries at
1454              runtime.
1455
1456       -eventlog
1457              Enable runtime event tracing
1458
1459       -fcompact-unwind
1460              Instruct the linker to produce a __compact_unwind section.
1461
1462       -fkeep-cafs
1463              Do not garbage-collect CAFs (top-level expressions) at runtime
1464
1465       -flink-rts
1466              Link the runtime when generating a shared or static library
1467
1468       -fno-embed-manifest
1469              Do not embed the manifest in the executable (Windows only)
1470
1471       -fno-gen-manifest
1472              Do not generate a manifest file (Windows only)
1473
1474       -fno-shared-implib
1475              Don't generate an import library for a DLL (Windows only)
1476
1477       -framework ⟨name⟩
1478              On Darwin/OS X/iOS only, link in the framework ⟨name⟩. This  op‐
1479              tion corresponds to the -framework option for Apple's Linker.
1480
1481       -framework-path ⟨dir⟩
1482              On  Darwin/OS  X/iOS  only, add ⟨dir⟩ to the list of directories
1483              searched for frameworks. This option corresponds to the  -F  op‐
1484              tion for Apple's Linker.
1485
1486       -fsplit-sections
1487              Split sections for link-time dead-code stripping
1488
1489       -fuse-rpaths
1490              Set the rpath based on -L flags
1491
1492       -fwhole-archive-hs-libs
1493              When   linking  a  binary  executable,  this  inserts  the  flag
1494              -Wl,--whole-archive before any -l flags for  Haskell  libraries,
1495              and -Wl,--no-whole-archive afterwards
1496
1497       -L ⟨dir⟩
1498              Add ⟨dir⟩ to the list of directories searched for libraries
1499
1500       -l ⟨lib⟩
1501              Link in library ⟨lib⟩
1502
1503       -main-is ⟨thing⟩
1504              Set main module and function
1505
1506       -no-hs-main
1507              Don't assume this program contains main
1508
1509       -no-pie
1510              Don't instruct the linker to produce a position-independent exe‐
1511              cutable.
1512
1513       -no-rtsopts-suggestions
1514              Don't    print    RTS    suggestions    about    linking    with
1515              -rtsopts[=⟨none|some|all|ignore|ignoreAll⟩].
1516
1517       -package ⟨name⟩
1518              Expose package ⟨pkg⟩
1519
1520       -pie   Instruct  the  linker  to  produce  a  position-independent exe‐
1521              cutable.
1522
1523       -rdynamic
1524              This instructs the linker to add  all  symbols,  not  only  used
1525              ones,  to  the  dynamic  symbol  table. Currently Linux and Win‐
1526              dows/MinGW32 only. This is equivalent to using  -optl  -rdynamic
1527              on Linux, and -optl -export-all-symbols on Windows.
1528
1529       -rtsopts[=⟨none|some|all|ignore|ignoreAll⟩]
1530              Control  whether  the  RTS  behaviour  can  be  tweaked via com‐
1531              mand-line flags and the GHCRTS environment variable. Using  none
1532              means  no  RTS  flags can be given; some means only a minimum of
1533              safe options can be given (the default); all (or no argument  at
1534              all)  means  that  all RTS flags are permitted; ignore means RTS
1535              flags can be given, but are treated  as  regular  arguments  and
1536              passed  to  the  Haskell  program as arguments; ignoreAll is the
1537              same as ignore, but GHCRTS is also ignored.  -rtsopts  does  not
1538              affect  -with-rtsopts  behavior;  flags passed via -with-rtsopts
1539              are used regardless of -rtsopts.
1540
1541       -shared
1542              Generate a shared library (as opposed to an executable)
1543
1544       -static
1545              Use static Haskell libraries
1546
1547       -staticlib
1548              Generate a standalone static library  (as  opposed  to  an  exe‐
1549              cutable).  This  is useful when cross compiling. The library to‐
1550              gether with all its dependencies ends up in in a  single  static
1551              library that can be linked against.
1552
1553       -threaded
1554              Use the threaded runtime
1555
1556       -with-rtsopts=⟨opts⟩
1557              Set the default RTS options to ⟨opts⟩.
1558
1559   Miscellaneous options
1560       -ddump-mod-cycles
1561              Dump module cycles
1562
1563       -fexternal-interpreter
1564              Run interpreted code in a separate process
1565
1566       -ffamily-application-cache
1567              Use a cache when reducing type family applications
1568
1569       -fglasgow-exts
1570              Deprecated. Enable most language extensions; see Controlling ex‐
1571              tensions for exactly which ones.
1572
1573       -fno-safe-haskell
1574              Disable Safe Haskell
1575
1576       -ghcversion-file ⟨path to ghcversion.h⟩
1577              (GHC as a C compiler only) Use this ghcversion.h file
1578
1579       -H ⟨size⟩
1580              Set the minimum size of the heap to ⟨size⟩
1581
1582       -hidden-module ⟨module name⟩
1583              A module which should not be visible outside its unit.
1584
1585       -j[⟨n⟩]
1586              When compiling with --make, compile ⟨n⟩ modules in parallel.
1587
1588       -reexported-module ⟨module name⟩
1589              A module which should be reexported from this unit.
1590
1591       -this-package-name ⟨unit-id⟩
1592              The name of the package which this module would be part of  when
1593              installed.
1594
1595       -unit @⟨filename⟩
1596              Specify the options to build a specific unit.
1597
1598       -working-dir ⟨dir⟩
1599              Specify the directory a unit is expected to be compiled in.
1600
1601   Modes of operation
1602       --frontend ⟨module⟩
1603              run GHC with the given frontend plugin; see Frontend plugins for
1604              details.
1605
1606       --help Display help
1607
1608       --info display information about the compiler
1609
1610       --interactive
1611              Interactive mode - normally used by just running ghci; see Using
1612              GHCi for details.
1613
1614       --make Build a multi-module Haskell program, automatically figuring out
1615              dependencies. Likely to be much easier, and faster,  than  using
1616              make; see Using ghc --make for details.
1617
1618       --numeric-version
1619              display GHC version (numeric only)
1620
1621       --print-booter-version
1622              display bootstrap compiler version
1623
1624       --print-build-platform
1625              display platform on which GHC was built
1626
1627       --print-c-compiler-flags
1628              C compiler flags used to build GHC
1629
1630       --print-c-compiler-link-flags
1631              C linker flags used to build GHC
1632
1633       --print-debug-on
1634              print whether GHC was built with -DDEBUG
1635
1636       --print-global-package-db
1637              display GHC's global package database directory
1638
1639       --print-have-interpreter
1640              display whether GHC was built with interactive support
1641
1642       --print-have-native-code-generator
1643              display whether target platform has NCG support
1644
1645       --print-host-platform
1646              display host platform of GHC
1647
1648       --print-ld-flags
1649              display linker flags used to compile GHC
1650
1651       --print-leading-underscore
1652              display use of leading underscores on symbol names
1653
1654       --print-libdir
1655              display GHC library directory
1656
1657       --print-object-splitting-supported
1658              display whether GHC supports object splitting
1659
1660       --print-project-git-commit-id
1661              display Git commit id GHC is built from
1662
1663       --print-project-version
1664              display GHC version
1665
1666       --print-rts-ways
1667              display which way RTS was built
1668
1669       --print-stage
1670              display stage number of GHC
1671
1672       --print-support-smp
1673              display whether GHC was compiled with SMP support
1674
1675       --print-tables-next-to-code
1676              display    whether    GHC   was   compiled   with   --enable-ta‐
1677              bles-next-to-code
1678
1679       --print-target-platform
1680              display target platform of GHC
1681
1682       --print-unregisterised
1683              display whether this GHC was built in unregisterised mode
1684
1685       --run ⟨file⟩
1686              Run a Haskell program.
1687
1688       --show-iface ⟨file⟩
1689              display the contents of an interface file.
1690
1691       --show-options
1692              display the supported command line options
1693
1694       --supported-extensions
1695              display the supported language extensions
1696
1697       --version
1698              display GHC version
1699
1700       -e ⟨expr⟩
1701              Evaluate expr; see Expression evaluation mode for details.
1702
1703       -M     generate dependency information suitable for use in a  Makefile;
1704              see Dependency generation for details.
1705
1706       -shared
1707              Create a shared object.
1708
1709   Individual optimizations
1710       -fasm-shortcutting
1711              Enable shortcutting on assembly. Implied by -O2.
1712
1713       -fbinary-blob-threshold=⟨n⟩
1714              default: 500K. Tweak assembly generator for binary blobs.
1715
1716       -fblock-layout-cfg
1717              Use the new cfg based block layout algorithm.
1718
1719       -fblock-layout-weightless
1720              Ignore cfg weights for code layout.
1721
1722       -fblock-layout-weights
1723              Sets edge weights used by the new code layout algorithm.
1724
1725       -fcall-arity
1726              Enable call-arity optimisation. Implied by -O.
1727
1728       -fcase-folding
1729              Enable constant folding in case expressions. Implied by -O.
1730
1731       -fcase-merge
1732              Enable case-merging. Implied by -O.
1733
1734       -fcmm-control-flow
1735              Enable  control flow optimisation in the Cmm backend. Implied by
1736              -O.
1737
1738       -fcmm-elim-common-blocks
1739              Enable Cmm common block elimination. Implied by -O.
1740
1741       -fcmm-sink
1742              Enable Cmm sinking. Implied by -O.
1743
1744       -fcmm-static-pred
1745              Enable static control flow prediction. Implied by -O.
1746
1747       -fcore-constant-folding
1748              Enable constant folding in Core. Implied by -O.
1749
1750       -fcpr-anal
1751              Turn on Constructed Product Result analysis. Implied by -O.
1752
1753       -fcross-module-specialise
1754              Turn on specialisation of  overloaded  functions  imported  from
1755              other modules.
1756
1757       -fcse  Enable common sub-expression elimination. Implied by -O.
1758
1759       -fdicts-cheap
1760              Make dictionary-valued expressions seem cheap to the optimiser.
1761
1762       -fdicts-strict
1763              Make dictionaries strict. Implied by -O2.
1764
1765       -fdmd-tx-dict-sel
1766              (deprecated) Use a special demand transformer for dictionary se‐
1767              lectors.
1768
1769       -fdmd-unbox-width=⟨n⟩
1770              default: 3. Boxity analysis pretends that returned records  with
1771              this many fields can be unboxed.
1772
1773       -fdo-eta-reduction
1774              Enable eta-reduction. Implied by -O.
1775
1776       -fdo-lambda-eta-expansion
1777              Enable lambda eta-expansion. Always enabled by default.
1778
1779       -feager-blackholing
1780              Turn on eager blackholing
1781
1782       -fenable-rewrite-rules
1783              Switch  on all rewrite rules (including rules generated by auto‐
1784              matic specialisation of overloaded functions). Implied by -O.
1785
1786       -fexcess-precision
1787              Enable excess intermediate precision
1788
1789       -fexitification
1790              Enables exitification optimisation. Implied by -O.
1791
1792       -fexpose-all-unfoldings
1793              Expose all unfoldings, even for very large  or  recursive  func‐
1794              tions.
1795
1796       -ffloat-in
1797              Turn on the float-in transformation. Implied by -O.
1798
1799       -ffull-laziness
1800              Turn  on full laziness (floating bindings outwards).  Implied by
1801              -O.
1802
1803       -ffun-to-thunk
1804              (deprecated) superseded by -ffull-laziness.
1805
1806       -fignore-asserts
1807              Ignore assertions in the source. Implied by -O.
1808
1809       -fignore-interface-pragmas
1810              Ignore pragmas in interface files. Implied by -O0 only.
1811
1812       -finline-generics
1813              Annotate methods of derived Generic and Generic1 instances  with
1814              INLINE[1] pragmas based on heuristics. Implied by -O.
1815
1816       -finline-generics-aggressively
1817              Annotate  methods  of all derived Generic and Generic1 instances
1818              with INLINE[1] pragmas.
1819
1820       -flate-dmd-anal
1821              Run demand analysis again, at  the  end  of  the  simplification
1822              pipeline
1823
1824       -flate-specialise
1825              Run a late specialisation pass
1826
1827       -fliberate-case
1828              Turn on the liberate-case transformation. Implied by -O2.
1829
1830       -fliberate-case-threshold=⟨n⟩
1831              default:  2000.  Set  the  size  threshold for the liberate-case
1832              transformation to ⟨n⟩
1833
1834       -fllvm-pass-vectors-in-regs
1835              (deprecated) Does nothing
1836
1837       -flocal-float-out
1838              Enable local floating definitions out of let-binds.
1839
1840       -flocal-float-out-top-level
1841              Enable local floating to float top-level bindings
1842
1843       -floopification
1844              Turn saturated self-recursive tail-calls into local jumps in the
1845              generated assembly. Implied by -O.
1846
1847       -fmax-inline-alloc-size=⟨n⟩
1848              default:  128.  Set the maximum size of inline array allocations
1849              to ⟨n⟩ bytes (default: 128).
1850
1851       -fmax-inline-memcpy-insns=⟨n⟩
1852              default: 32. Inline memcpy calls if they would generate no  more
1853              than ⟨n⟩ pseudo instructions.
1854
1855       -fmax-inline-memset-insns=⟨n⟩
1856              default:  32. Inline memset calls if they would generate no more
1857              than ⟨n⟩ pseudo instructions
1858
1859       -fmax-simplifier-iterations=⟨n⟩
1860              default: 4. Set the max iterations for the simplifier.
1861
1862       -fmax-uncovered-patterns=⟨n⟩
1863              default: 4. Set the maximum number of  patterns  to  display  in
1864              warnings about non-exhaustive ones.
1865
1866       -fmax-worker-args=⟨n⟩
1867              default: 10. Maximum number of value arguments for a worker.
1868
1869       -fno-opt-coercion
1870              Turn off the coercion optimiser
1871
1872       -fno-pre-inlining
1873              Turn off pre-inlining
1874
1875       -fno-state-hack
1876              Turn  off  the  state  hackwhereby  any lambda with a real-world
1877              state token as argument is considered to be single-entry.  Hence
1878              OK to inline things inside it.
1879
1880       -fomit-interface-pragmas
1881              Don't generate interface pragmas. Implied by -O0 only.
1882
1883       -fomit-yields
1884              Omit heap checks when no allocation is being performed.
1885
1886       -foptimal-applicative-do
1887              Use a slower but better algorithm for ApplicativeDo
1888
1889       -fpedantic-bottoms
1890              Make  GHC be more precise about its treatment of bottom (but see
1891              also -fno-state-hack). In particular, GHC  will  not  eta-expand
1892              through a case expression.
1893
1894       -fpolymorphic-specialisation
1895              Allow specialisation to abstract over free type variables
1896
1897       -fregs-graph
1898              Use  the graph colouring register allocator for register alloca‐
1899              tion in the native code generator.
1900
1901       -fregs-iterative
1902              Use the iterative coalescing graph colouring register  allocator
1903              in the native code generator.
1904
1905       -fsimpl-tick-factor=⟨n⟩
1906              default: 100. Set the percentage factor for simplifier ticks.
1907
1908       -fsimplifier-phases=⟨n⟩
1909              default:  2.  Set  the number of phases for the simplifier.  Ig‐
1910              nored with -O0.
1911
1912       -fsolve-constant-dicts
1913              When solving constraints, try to eagerly solve super classes us‐
1914              ing available dictionaries.
1915
1916       -fspec-constr
1917              Turn on the SpecConstr transformation. Implied by -O2.
1918
1919       -fspec-constr-count=⟨n⟩
1920              default:  3.*  Set  to ⟨n⟩ the maximum number of specialisations
1921              that will be created for any  one  function  by  the  SpecConstr
1922              transformation.
1923
1924       -fspec-constr-keen
1925              Specialize a call with an explicit constructor argument, even if
1926              the argument is not scrutinised in the body of the function
1927
1928       -fspec-constr-threshold=⟨n⟩
1929              default: 2000. Set the size threshold for the SpecConstr  trans‐
1930              formation to ⟨n⟩.
1931
1932       -fspecialise
1933              Turn on specialisation of overloaded functions. Implied by -O.
1934
1935       -fspecialise-aggressively
1936              Turn  on  specialisation  of  overloaded functions regardless of
1937              size, if unfolding is available
1938
1939       -fstatic-argument-transformation
1940              Turn on the static argument transformation.
1941
1942       -fstg-cse
1943              Enable common sub-expression elimination on the STG intermediate
1944              language
1945
1946       -fstg-lift-lams
1947              Enable late lambda lifting on the STG intermediate language. Im‐
1948              plied by -O2.
1949
1950       -fstg-lift-lams-known
1951              Allow turning known into unknown  calls  while  performing  late
1952              lambda lifting.
1953
1954       -fstg-lift-lams-non-rec-args
1955              Create top-level non-recursive functions with at most <n> param‐
1956              eters while performing late lambda lifting.
1957
1958       -fstg-lift-lams-rec-args
1959              Create top-level recursive functions with at most <n> parameters
1960              while performing late lambda lifting.
1961
1962       -fstrictness
1963              Turn    on    demand   analysis.    Implied   by   -O.   Implies
1964              -fworker-wrapper
1965
1966       -fstrictness-before=⟨n⟩
1967              Run an additional demand analysis before simplifier phase ⟨n⟩
1968
1969       -funbox-small-strict-fields
1970              Flatten strict constructor fields with a pointer-sized represen‐
1971              tation. Implied by -O.
1972
1973       -funbox-strict-fields
1974              Flatten strict constructor fields
1975
1976       -funfolding-case-scaling=⟨n⟩
1977              default:  30.  Apply a penalty of (inlining_cost * 1/n) for each
1978              level of case nesting.
1979
1980       -funfolding-case-threshold=⟨n⟩
1981              default: 2. Reduce inlining for cases nested deeper than n.
1982
1983       -funfolding-creation-threshold=⟨n⟩
1984              default: 750. Tweak unfolding settings.
1985
1986       -funfolding-dict-discount=⟨n⟩
1987              default: 30. Tweak unfolding settings.
1988
1989       -funfolding-fun-discount=⟨n⟩
1990              default: 60. Tweak unfolding settings.
1991
1992       -funfolding-keeness-factor=⟨n⟩
1993              This has been deprecated in GHC 9.0.1.
1994
1995       -funfolding-use-threshold=⟨n⟩
1996              default: 80. Tweak unfolding settings.
1997
1998       -fworker-wrapper
1999              Enable the worker/wrapper transformation.
2000
2001       -fworker-wrapper-cbv
2002              Enable w/w splits for wrappers whos sole purpose  is  evaluating
2003              arguments.
2004
2005   Optimization levels
2006       -O     Enable level 1 optimisations
2007
2008       -O0    Disable optimisations (default)
2009
2010       -O2    Enable level 2 optimisations
2011
2012       -O⟨n⟩  Any -On where n > 2 is the same as -O2.
2013
2014   Package options
2015       -clear-package-db
2016              Clear the package db stack.
2017
2018       -distrust ⟨pkg⟩
2019              Expose  package  ⟨pkg⟩  and  set  it  to be distrusted. See Safe
2020              Haskell.
2021
2022       -distrust-all-packages
2023              Distrust all packages by default. See Safe Haskell.
2024
2025       -fpackage-trust
2026              Enable Safe Haskell trusted package requirement for  trustworthy
2027              modules.
2028
2029       -global-package-db
2030              Add the global package db to the stack.
2031
2032       -hide-all-packages
2033              Hide all packages by default
2034
2035       -hide-package ⟨pkg⟩
2036              Hide package ⟨pkg⟩
2037
2038       -ignore-package ⟨pkg⟩
2039              Ignore package ⟨pkg⟩
2040
2041       -no-auto-link-packages
2042              Don't automatically link in the base and rts packages.
2043
2044       -no-global-package-db
2045              Remove the global package db from the stack.
2046
2047       -no-user-package-db
2048              Remove the user's package db from the stack.
2049
2050       -package ⟨pkg⟩
2051              Expose package ⟨pkg⟩
2052
2053       -package-db ⟨file⟩
2054              Add ⟨file⟩ to the package db stack.
2055
2056       -package-env ⟨file⟩|⟨name⟩
2057              Use the specified package environment.
2058
2059       -package-id ⟨unit-id⟩
2060              Expose package by id ⟨unit-id⟩
2061
2062       -this-unit-id ⟨unit-id⟩
2063              Compile to be part of unit (i.e. package) ⟨unit-id⟩
2064
2065       -trust ⟨pkg⟩
2066              Expose package ⟨pkg⟩ and set it to be trusted. See Safe Haskell.
2067
2068       -user-package-db
2069              Add the user's package db to the stack.
2070
2071   Phases of compilation
2072       --merge-objs
2073              Merge a set of objects into a GHCi library.
2074
2075       -C     Stop after generating C (.hc file)
2076
2077       -c     Stop after generating object (.o) file
2078
2079       -E     Stop after preprocessing (.hspp file)
2080
2081       -F     Enable the use of a pre-processor (set with -pgmF ⟨cmd⟩)
2082
2083       -S     Stop after generating assembly (.s file)
2084
2085       -x ⟨suffix⟩
2086              Override default behaviour for source files
2087
2088   Overriding external programs
2089       -pgma ⟨cmd⟩
2090              Use ⟨cmd⟩ as the assembler
2091
2092       -pgmc ⟨cmd⟩
2093              Use ⟨cmd⟩ as the C compiler
2094
2095       -pgmcxx ⟨cmd⟩
2096              Use ⟨cmd⟩ as the C++ compiler
2097
2098       -pgmdll ⟨cmd⟩
2099              Use ⟨cmd⟩ as the DLL generator
2100
2101       -pgmF ⟨cmd⟩
2102              Use ⟨cmd⟩ as the pre-processor (with -F only)
2103
2104       -pgmi ⟨cmd⟩
2105              Use ⟨cmd⟩ as the external interpreter command.
2106
2107       -pgminstall_name_tool ⟨cmd⟩
2108              Use ⟨cmd⟩ as the program to inject runpath into mach-o dylibs on
2109              macOS
2110
2111       -pgmL ⟨cmd⟩
2112              Use ⟨cmd⟩ as the literate pre-processor
2113
2114       -pgml ⟨cmd⟩
2115              Use ⟨cmd⟩ as the linker
2116
2117       -pgmlc ⟨cmd⟩
2118              Use ⟨cmd⟩ as the LLVM compiler
2119
2120       -pgmlm ⟨cmd⟩
2121              Use ⟨cmd⟩ as the linker when merging object files
2122
2123       -pgmlo ⟨cmd⟩
2124              Use ⟨cmd⟩ as the LLVM optimiser
2125
2126       -pgmotool ⟨cmd⟩
2127              Use ⟨cmd⟩ as the program to inspect mach-o dylibs on macOS
2128
2129       -pgmP ⟨cmd⟩
2130              Use ⟨cmd⟩ as the C pre-processor (with -cpp only)
2131
2132       -pgms ⟨cmd⟩
2133              Use ⟨cmd⟩ as the splitter
2134
2135       -pgmwindres ⟨cmd⟩
2136              Use ⟨cmd⟩ as the program for embedding manifests on Windows.
2137
2138   Phase-specific options
2139       -opta ⟨option⟩
2140              pass ⟨option⟩ to the assembler
2141
2142       -optc ⟨option⟩
2143              pass ⟨option⟩ to the C compiler
2144
2145       -optcxx ⟨option⟩
2146              pass ⟨option⟩ to the C++ compiler
2147
2148       -optdll ⟨option⟩
2149              pass ⟨option⟩ to the DLL generator
2150
2151       -optF ⟨option⟩
2152              pass ⟨option⟩ to the custom pre-processor
2153
2154       -opti ⟨option⟩
2155              pass ⟨option⟩ to the interpreter sub-process.
2156
2157       -optL ⟨option⟩
2158              pass ⟨option⟩ to the literate pre-processor
2159
2160       -optl ⟨option⟩
2161              pass ⟨option⟩ to the linker
2162
2163       -optlc ⟨option⟩
2164              pass ⟨option⟩ to the LLVM compiler
2165
2166       -optlm ⟨option⟩
2167              pass ⟨option⟩ to the linker when merging object files.
2168
2169       -optlo ⟨option⟩
2170              pass ⟨option⟩ to the LLVM optimiser
2171
2172       -optP ⟨option⟩
2173              pass ⟨option⟩ to cpp (with -cpp only)
2174
2175       -optwindres ⟨option⟩
2176              pass ⟨option⟩ to windres.
2177
2178       -pgmc-supports-no-pie
2179              (deprecated) Indicate that the linker supports -no-pie
2180
2181       -pgml-supports-no-pie
2182              Indicate that the linker supports -no-pie
2183
2184   Platform-specific options
2185       -mavx  (x86 only) Enable support for AVX SIMD extensions
2186
2187       -mavx2 (x86 only) Enable support for AVX2 SIMD extensions
2188
2189       -mavx512cd
2190              (x86 only) Enable support for AVX512-CD SIMD extensions
2191
2192       -mavx512er
2193              (x86 only) Enable support for AVX512-ER SIMD extensions
2194
2195       -mavx512f
2196              (x86 only) Enable support for AVX512-F SIMD extensions
2197
2198       -mavx512pf
2199              (x86 only) Enable support for AVX512-PF SIMD extensions
2200
2201       -mbmi  (x86 only) Use BMI1 for bit manipulation operations
2202
2203       -mbmi2 (x86 only) Use BMI2 for bit manipulation operations
2204
2205       -msse  (x86 only) Use SSE for floating-point operations
2206
2207       -msse2 (x86 only) Use SSE2 for floating-point operations
2208
2209       -msse3 (x86 only) Use SSE3 for floating-point operations
2210
2211       -msse4 (x86 only) Use SSE4 for floating-point operations
2212
2213       -msse4.2
2214              (x86 only) Use SSE4.2 for floating-point operations
2215
2216   Compiler plugins
2217       -fclear-plugins
2218              Clear the list of active plugins
2219
2220       -fplugin-library=⟨file-path⟩;⟨unit-id⟩;⟨module⟩;⟨args⟩
2221              Load a pre-compiled static plugin from an external library
2222
2223       -fplugin-opt=⟨module⟩:⟨args⟩
2224              Give arguments to a plugin module; module must be specified with
2225              -fplugin=⟨module⟩
2226
2227       -fplugin-trustworthy
2228              Trust the used plugins and no longer mark the compiled module as
2229              unsafe
2230
2231       -fplugin=⟨module⟩
2232              Load a plugin exported by a given module
2233
2234       -hide-all-plugin-packages
2235              Hide all packages for plugins by default
2236
2237       -plugin-package ⟨pkg⟩
2238              Expose ⟨pkg⟩ for plugins
2239
2240       -plugin-package-id ⟨pkg-id⟩
2241              Expose ⟨pkg-id⟩ for plugins
2242
2243   Profiling
2244       -auto  (deprecated) Alias for -fprof-auto-exported
2245
2246       -auto-all
2247              (deprecated) Alias for -fprof-auto
2248
2249       -caf-all
2250              (deprecated) Alias for -fprof-cafs
2251
2252       -fno-prof-count-entries
2253              Do not collect entry counts
2254
2255       -fprof-auto
2256              Auto-add SCC\ s to all bindings not marked INLINE
2257
2258       -fprof-auto-calls
2259              Auto-add SCC\ s to all call sites
2260
2261       -fprof-auto-exported
2262              Auto-add SCC\ s to all exported bindings not marked INLINE
2263
2264       -fprof-auto-top
2265              Auto-add SCC\ s to all top-level bindings not marked INLINE
2266
2267       -fprof-cafs
2268              Auto-add SCC\ s to all CAFs
2269
2270       -fprof-callers=⟨name⟩
2271              Auto-add SCC\ s to all call-sites of the named function.
2272
2273       -fprof-late
2274              Auto-add SCC\ s to all top level bindings after the  core  pipe‐
2275              line has run.
2276
2277       -fprof-late-inline
2278              Auto-add  SCC\  s  to all top level bindings after the optimizer
2279              has run and retain them when inlining.
2280
2281       -fprof-manual
2282              Process manual SCC annotations.
2283
2284       -no-auto
2285              (deprecated) Alias for -fno-prof-auto
2286
2287       -no-auto-all
2288              (deprecated) Alias for -fno-prof-auto
2289
2290       -no-caf-all
2291              (deprecated) Alias for -fno-prof-cafs
2292
2293       -prof  Turn on profiling
2294
2295       -ticky Turn on ticky-ticky profiling
2296
2297       -ticky-allocd
2298              Track the number of times each closure type is allocated.
2299
2300       -ticky-ap-thunk
2301              Don't use standard AP thunks on order to get more reliable entry
2302              counters.
2303
2304       -ticky-dyn-thunk
2305              Track allocations of dynamic thunks
2306
2307       -ticky-LNE
2308              Treat join point binders similar to thunks/functions.
2309
2310       -ticky-tag-checks
2311              Emit  dummy  ticky  counters  to  record  how many tag-inference
2312              checks tag inference avoided.
2313
2314   Program coverage
2315       -fhpc  Turn on Haskell program coverage instrumentation
2316
2317       -hpcdir⟨dir⟩
2318              Set the directory where GHC places .mix files.
2319
2320   Recompilation checking
2321       -exclude-module=⟨file⟩
2322              Regard ⟨file⟩ as "stable"; i.e., exclude it from  having  depen‐
2323              dencies on it.
2324
2325       -fforce-recomp
2326              Turn off recompilation checking. This is implied by any -ddump-X
2327              option when compiling a single file (i.e. when using -c).
2328
2329       -fignore-hpc-changes
2330              Do not recompile modules just to match  changes  to  HPC  flags.
2331              This  is especially useful for avoiding recompilation when using
2332              GHCi, and is enabled by default for GHCi.
2333
2334       -fignore-optim-changes
2335              Do not recompile modules just to match changes  to  optimisation
2336              flags. This is especially useful for avoiding recompilation when
2337              using GHCi, and is enabled by default for GHCi.
2338
2339       -include-cpp-deps
2340              Include preprocessor dependencies
2341
2342       -include-pkg-deps
2343              Regard modules imported from packages as unstable
2344
2345   Redirecting output
2346       -dep-makefile ⟨file⟩
2347              Use ⟨file⟩ as the makefile
2348
2349       -dep-suffix ⟨suffix⟩
2350              Make  dependencies  that  declare   that   files   with   suffix
2351              .⟨suf⟩⟨osuf⟩ depend on interface files with suffix .⟨suf⟩hi
2352
2353       -dumpdir ⟨dir⟩
2354              redirect dump files
2355
2356       -dynhisuf ⟨suffix⟩
2357              set the suffix to use for dynamic interface files
2358
2359       -dyno ⟨file⟩
2360              set dynamic output filename
2361
2362       -dynohi ⟨file⟩
2363              set the filename in which to put the dynamic interface
2364
2365       -dynosuf ⟨suffix⟩
2366              set the dynamic output file suffix
2367
2368       -hcsuf ⟨suffix⟩
2369              set the suffix to use for intermediate C files
2370
2371       -hidir ⟨dir⟩
2372              set directory for interface files
2373
2374       -hiedir ⟨dir⟩
2375              set directory for extended interface files
2376
2377       -hiesuf ⟨suffix⟩
2378              set the suffix to use for extended interface files
2379
2380       -hisuf ⟨suffix⟩
2381              set the suffix to use for interface files
2382
2383       -o ⟨file⟩
2384              set output filename
2385
2386       -odir ⟨dir⟩
2387              set directory for object files
2388
2389       -ohi ⟨file⟩
2390              set the filename in which to put the interface
2391
2392       -osuf ⟨suffix⟩
2393              set the output file suffix
2394
2395       -outputdir ⟨dir⟩
2396              set output directory
2397
2398       -stubdir ⟨dir⟩
2399              redirect FFI stub files
2400
2401   Temporary files
2402       -tmpdir ⟨dir⟩
2403              set the directory for temporary files
2404
2405   Verbosity options
2406       -fabstract-refinement-hole-fits
2407              default:  off.  Toggles whether refinements where one or more of
2408              the holes are abstract are reported.
2409
2410       -fdefer-diagnostics
2411              Defer and group diagnostic messages by severity
2412
2413       -fdiagnostics-color=⟨always|auto|never⟩
2414              Use colors in error messages
2415
2416       -fdiagnostics-show-caret
2417              Whether to show snippets of original source code
2418
2419       -ferror-spans
2420              Output full span in error messages
2421
2422       -fhide-source-paths
2423              hide module source and object paths
2424
2425       -fkeep-going
2426              Continue compilation as far as possible on errors
2427
2428       -fmax-refinement-hole-fits=⟨n⟩
2429              default: 6. Set the maximum number of refinement hole  fits  for
2430              typed holes to display in type error messages.
2431
2432       -fmax-relevant-binds=⟨n⟩
2433              default:  6.  Set  the  maximum number of bindings to display in
2434              type error messages.
2435
2436       -fmax-valid-hole-fits=⟨n⟩
2437              default: 6. Set the maximum number of valid hole fits for  typed
2438              holes to display in type error messages.
2439
2440       -fno-show-valid-hole-fits
2441              Disables  showing  a  list of valid hole fits for typed holes in
2442              type error messages.
2443
2444       -fno-sort-valid-hole-fits
2445              Disables the sorting of the list of valid hole  fits  for  typed
2446              holes in type error messages.
2447
2448       -fprint-axiom-incomps
2449              Display equation incompatibilities in closed type families
2450
2451       -fprint-equality-relations
2452              Distinguish between equality relations when printing
2453
2454       -fprint-expanded-synonyms
2455              In type errors, also print type-synonym-expanded types.
2456
2457       -fprint-explicit-coercions
2458              Print coercions in types
2459
2460       -fprint-explicit-foralls
2461              Print   explicit  forall  quantification  in  types.   See  also
2462              ExplicitForAll
2463
2464       -fprint-explicit-kinds
2465              Print explicit kind foralls and kind arguments  in  types.   See
2466              also KindSignatures
2467
2468       -fprint-explicit-runtime-reps
2469              Print  RuntimeRep  and  Levity variables in types which are run‐
2470              time-representation polymorphic.
2471
2472       -fprint-potential-instances
2473              display all available instances in type error messages
2474
2475       -fprint-redundant-promotion-ticks
2476              Print redundant DataKinds promotion ticks
2477
2478       -fprint-typechecker-elaboration
2479              Print extra information from typechecker.
2480
2481       -fprint-unicode-syntax
2482              Use unicode syntax when printing expressions, types  and  kinds.
2483              See also UnicodeSyntax
2484
2485       -frefinement-level-hole-fits=⟨n⟩
2486              default:  off.  Sets  the  level of refinement of the refinement
2487              hole fits, where level n means that hole fits of up to  n  holes
2488              will be considered.
2489
2490       -freverse-errors
2491              Output errors in reverse order
2492
2493       -fshow-docs-of-hole-fits
2494              Toggles whether to show the documentation of the valid hole fits
2495              in the output.
2496
2497       -fshow-error-context
2498              Whether to show textual information about error context
2499
2500       -fshow-hole-constraints
2501              Show constraints when reporting typed holes.
2502
2503       -fshow-hole-matches-of-hole-fits
2504              Toggles whether to show the type of the additional holes in  re‐
2505              finement hole fits.
2506
2507       -fshow-provenance-of-hole-fits
2508              Toggles whether to show the provenance of the valid hole fits in
2509              the output.
2510
2511       -fshow-type-app-of-hole-fits
2512              Toggles whether to show the type application of the  valid  hole
2513              fits in the output.
2514
2515       -fshow-type-app-vars-of-hole-fits
2516              Toggles whether to show what type each quantified variable takes
2517              in a valid hole fit.
2518
2519       -fshow-type-of-hole-fits
2520              Toggles whether to show the type of the valid hole fits  in  the
2521              output.
2522
2523       -fsort-by-size-hole-fits
2524              Sort valid hole fits by size.
2525
2526       -fsort-by-subsumption-hole-fits
2527              Sort valid hole fits by subsumption.
2528
2529       -funclutter-valid-hole-fits
2530              Unclutter  the list of valid hole fits by not showing provenance
2531              nor type applications of suggestions.
2532
2533       -Rghc-timing
2534              Summarise timing stats for GHC (same as +RTS -tstderr).
2535
2536       -v     verbose mode (equivalent to -v3)
2537
2538       -v⟨n⟩  set verbosity level
2539
2540   Warnings
2541       -fdefer-out-of-scope-variables
2542              Convert variable out of scope variables  errors  into  warnings.
2543              Implied       by       -fdefer-type-errors.        See      also
2544              -Wdeferred-out-of-scope-variables.
2545
2546       -fdefer-type-errors
2547              Turn type errors into warnings, deferring the error  until  run‐
2548              time.          Implies          -fdefer-typed-holes          and
2549              -fdefer-out-of-scope-variables.  See also -Wdeferred-type-errors
2550
2551       -fdefer-typed-holes
2552              Convert typed hole errors into warnings, deferring the error un‐
2553              til   runtime.    Implied   by  -fdefer-type-errors.   See  also
2554              -Wtyped-holes.
2555
2556       -fenable-th-splice-warnings
2557              Generate warnings for Template Haskell splices
2558
2559       -fhelpful-errors
2560              Make suggestions for mis-spelled names.
2561
2562       -fmax-pmcheck-models=⟨n⟩
2563              soft limit on the number of parallel models  the  pattern  match
2564              checker should check a pattern match clause against
2565
2566       -fshow-warning-groups
2567              show which group an emitted warning belongs to.
2568
2569       -fvia-C
2570              use the C code generator
2571
2572       -W     enable normal warnings
2573
2574       -w     disable all warnings
2575
2576       -Wall  enable  almost  all  warnings  (details  in  Warnings  and  san‐
2577              ity-checking)
2578
2579       -Wall-missed-specialisations
2580              warn when specialisation of any overloaded function fails.
2581
2582       -Wall-missed-specializations
2583              alias for -Wall-missed-specialisations
2584
2585       -Wambiguous-fields
2586              warn about ambiguous field selectors or updates
2587
2588       -Wauto-orphans
2589              (deprecated) Does nothing
2590
2591       -Wcompat
2592              enable future compatibility warnings (details  in  Warnings  and
2593              sanity-checking)
2594
2595       -Wcompat-unqualified-imports
2596              Report  unqualified imports of core libraries which are expected
2597              to cause compatibility problems in future releases.
2598
2599       -Wcpp-undef
2600              warn on uses of the #if directive on undefined identifiers
2601
2602       -Wdefault
2603              enable default flags
2604
2605       -Wdeferred-out-of-scope-variables
2606              Report warnings when variable out-of-scope errors  are  deferred
2607              until runtime.  See -fdefer-out-of-scope-variables.
2608
2609       -Wdeferred-type-errors
2610              Report  warnings when deferred type errors are enabled. This op‐
2611              tion is enabled by default. See -fdefer-type-errors.
2612
2613       -Wdeprecated-flags
2614              warn about uses of commandline flags that are deprecated
2615
2616       -Wdeprecations
2617              warn about uses of functions & types that have warnings or  dep‐
2618              recated pragmas. Alias for -Wwarnings-deprecations
2619
2620       -Wderiving-defaults
2621              warn  about  default deriving when using both DeriveAnyClass and
2622              GeneralizedNewtypeDeriving
2623
2624       -Wderiving-typeable
2625              warn when Typeable is derived
2626
2627       -Wdodgy-exports
2628              warn about dodgy exports
2629
2630       -Wdodgy-foreign-imports
2631              warn about dodgy foreign imports
2632
2633       -Wdodgy-imports
2634              warn about dodgy imports
2635
2636       -Wduplicate-constraints
2637              warn when a constraint appears duplicated in a type signature
2638
2639       -Wduplicate-exports
2640              warn when an entity is exported multiple times
2641
2642       -Wempty-enumerations
2643              warn about enumerations that are empty
2644
2645       -Werror
2646              make warnings fatal
2647
2648       -Weverything
2649              enable all warnings supported by GHC
2650
2651       -Wextra
2652              alias for -W
2653
2654       -Wforall-identifier
2655              warn when forall is used as an identifier (at definition sites)
2656
2657       -Wgadt-mono-local-binds
2658              warn when pattern matching on a GADT without MonoLocalBinds
2659
2660       -Whi-shadowing
2661              (deprecated) warn when a .hi file in the current directory shad‐
2662              ows a library
2663
2664       -Widentities
2665              warn about uses of Prelude numeric conversions that are probably
2666              the identity (and hence could be omitted)
2667
2668       -Wimplicit-kind-vars
2669              (deprecated) warn when kind variables are implicitly  quantified
2670              over.
2671
2672       -Wimplicit-lift
2673              warn about implicit lift in Template Haskell quotes
2674
2675       -Wimplicit-prelude
2676              warn when the Prelude is implicitly imported
2677
2678       -Winaccessible-code
2679              warn about inaccessible code
2680
2681       -Wincomplete-patterns
2682              warn when a pattern match could fail
2683
2684       -Wincomplete-record-updates
2685              warn when a record update could fail
2686
2687       -Wincomplete-uni-patterns
2688              warn  when a pattern match in a lambda expression, pattern bind‐
2689              ing or a lazy pattern could fail
2690
2691       -Winferred-safe-imports
2692              warn when an explicitly Safe Haskell module imports  a  Safe-In‐
2693              ferred one
2694
2695       -Winline-rule-shadowing
2696              Warn  if  a rewrite RULE might fail to fire because the function
2697              might be inlined before the rule has a chance to fire.  See  How
2698              rules interact with INLINE/NOINLINE pragmas.
2699
2700       -Winvalid-haddock
2701              warn when a Haddock comment occurs in an invalid position
2702
2703       -Wloopy-superclass-solve
2704              warn  when creating potentially-loopy superclass constraint evi‐
2705              dence
2706
2707       -Wmisplaced-pragmas
2708              warn about uses of file header pragmas in the module body
2709
2710       -Wmissed-extra-shared-lib
2711              Warn when GHCi can't load a shared lib.
2712
2713       -Wmissed-specialisations
2714              warn when specialisation of  an  imported,  overloaded  function
2715              fails.
2716
2717       -Wmissed-specializations
2718              alias for -Wmissed-specialisations
2719
2720       -Wmissing-deriving-strategies
2721              warn when a deriving clause is missing a deriving strategy
2722
2723       -Wmissing-export-lists
2724              warn  when a module declaration does not explicitly list all ex‐
2725              ports
2726
2727       -Wmissing-exported-pattern-synonym-signatures
2728              warn about pattern synonyms without signatures, only if they are
2729              exported
2730
2731       -Wmissing-exported-signatures
2732              warn  about top-level functions without signatures, only if they
2733              are exported
2734
2735       -Wmissing-exported-sigs
2736              (deprecated) warn about top-level functions without  signatures,
2737              only  if they are exported. takes precedence over -Wmissing-sig‐
2738              natures
2739
2740       -Wmissing-fields
2741              warn when fields of a record are uninitialised
2742
2743       -Wmissing-home-modules
2744              warn when encountering a home module imported, but not listed on
2745              the  command  line. Useful for cabal to ensure GHC won't pick up
2746              modules,  not  listed  neither  in   exposed-modules,   nor   in
2747              other-modules.
2748
2749       -Wmissing-import-lists
2750              warn when an import declaration does not explicitly list all the
2751              names brought into scope
2752
2753       -Wmissing-kind-signatures
2754              warn when type declarations don't have kind signatures nor CUSKs
2755
2756       -Wmissing-local-signatures
2757              warn about polymorphic local bindings without signatures
2758
2759       -Wmissing-local-sigs
2760              (deprecated) warn about polymorphic local bindings without  sig‐
2761              natures
2762
2763       -Wmissing-methods
2764              warn when class methods are undefined
2765
2766       -Wmissing-monadfail-instances
2767              (deprecated)  Warn when a failable pattern is used in a do-block
2768              that does not have a MonadFail instance.
2769
2770       -Wmissing-pattern-synonym-signatures
2771              warn when pattern synonyms do not have type signatures
2772
2773       -Wmissing-safe-haskell-mode
2774              warn when the Safe Haskell mode is not explicitly specified.
2775
2776       -Wmissing-signatures
2777              warn about top-level functions without signatures
2778
2779       -Wmissing-space-after-bang
2780              (deprecated) Does nothing
2781
2782       -Wmonomorphism-restriction
2783              warn when the Monomorphism Restriction is applied
2784
2785       -Wname-shadowing
2786              warn when names are shadowed
2787
2788       -Wno-compat
2789              Disables all warnings enabled by -Wcompat.
2790
2791       -Wnoncanonical-monad-instances
2792              warn when Applicative or Monad instances have noncanonical defi‐
2793              nitions of return, pure, (>>), or (*>).  See flag description in
2794              Warnings and sanity-checking for more details.
2795
2796       -Wnoncanonical-monadfail-instances
2797              (deprecated) warn when Monad or MonadFail  instances  have  non‐
2798              canonical definitions of fail.
2799
2800       -Wnoncanonical-monoid-instances
2801              warn  when Semigroup or Monoid instances have noncanonical defi‐
2802              nitions of (<>) or mappend.  See flag  description  in  Warnings
2803              and sanity-checking for more details.
2804
2805       -Wnot  (deprecated) Alias for -w
2806
2807       -Woperator-whitespace
2808              warn on prefix, suffix, and tight infix uses of infix operators
2809
2810       -Woperator-whitespace-ext-conflict
2811              warn on uses of infix operators that would be parsed differently
2812              were a particular GHC extension enabled
2813
2814       -Worphans
2815              warn when the module contains orphan  instance  declarations  or
2816              rewrite rules
2817
2818       -Woverflowed-literals
2819              warn about literals that will overflow their type
2820
2821       -Woverlapping-patterns
2822              warn about overlapping patterns
2823
2824       -Wpartial-fields
2825              warn when defining a partial record field.
2826
2827       -Wpartial-type-signatures
2828              warn    about    holes   in   partial   type   signatures   when
2829              PartialTypeSignatures   is   enabled.   Not   applicable    when
2830              PartialTypeSignatures  is  not enabled, in which case errors are
2831              generated for such holes.
2832
2833       -Wprepositive-qualified-module
2834              Report imports with a leading/prepositive "qualified"
2835
2836       -Wredundant-bang-patterns
2837              Warn about redundant bang patterns.
2838
2839       -Wredundant-constraints
2840              Have the compiler warn about redundant constraints in type  sig‐
2841              natures.
2842
2843       -Wredundant-record-wildcards
2844              Warn  about  record  wildcard matches when the wildcard binds no
2845              patterns.
2846
2847       -Wredundant-strictness-flags
2848              Warn about redundant strictness flags.
2849
2850       -Wsafe warn if the module being compiled is regarded to be safe.
2851
2852       -Wsemigroup
2853              warn when a Monoid is not Semigroup, and on non- Semigroup defi‐
2854              nitions of (<>)?
2855
2856       -Wsimplifiable-class-constraints
2857              Warn  about  class  constraints  in a type signature that can be
2858              simplified using a top-level instance declaration.
2859
2860       -Wstar-binder
2861              warn about binding the (*) type operator despite StarIsType
2862
2863       -Wstar-is-type
2864              warn when * is used to mean Data.Kind.Type
2865
2866       -Wtabs warn if there are tabs in the source file
2867
2868       -Wtrustworthy-safe
2869              warn if the module being compiled is marked as  Trustworthy  but
2870              it could instead be marked as Safe, a more informative bound.
2871
2872       -Wtype-defaults
2873              warn when defaulting happens
2874
2875       -Wtype-equality-out-of-scope
2876              warn when type equality a ~ b is used despite being out of scope
2877
2878       -Wtype-equality-requires-operators
2879              warn when type equality a ~ b is used despite being out of scope
2880
2881       -Wtyped-holes
2882              Report  warnings  when typed hole errors are deferred until run‐
2883              time. See -fdefer-typed-holes.
2884
2885       -Wunbanged-strict-patterns
2886              warn on pattern bind of unlifted variable that is  neither  bare
2887              nor banged
2888
2889       -Wunicode-bidirectional-format-characters
2890              warn  about  the  usage of unicode bidirectional layout override
2891              characters
2892
2893       -Wunrecognised-pragmas
2894              warn about uses of pragmas that GHC doesn't recognise
2895
2896       -Wunrecognised-warning-flags
2897              throw a warning when an unrecognised -W... flag  is  encountered
2898              on the command line.
2899
2900       -Wunsafe
2901              warn if the module being compiled is regarded to be unsafe.  See
2902              Safe Haskell
2903
2904       -Wunsupported-calling-conventions
2905              warn about use of an unsupported calling convention
2906
2907       -Wunsupported-llvm-version
2908              Warn when using -fllvm with an unsupported version of LLVM.
2909
2910       -Wunticked-promoted-constructors
2911              warn if promoted constructors are not ticked
2912
2913       -Wunused-binds
2914              warn   about   bindings   that    are    unused.    Alias    for
2915              -Wunused-top-binds,           -Wunused-local-binds           and
2916              -Wunused-pattern-binds
2917
2918       -Wunused-do-bind
2919              warn about do bindings that appear to throw away values of types
2920              other than ()
2921
2922       -Wunused-foralls
2923              warn  about type variables in user-written forall\s that are un‐
2924              used
2925
2926       -Wunused-imports
2927              warn about unnecessary imports
2928
2929       -Wunused-local-binds
2930              warn about local bindings that are unused
2931
2932       -Wunused-matches
2933              warn about variables in patterns that aren't used
2934
2935       -Wunused-packages
2936              warn when package is requested on command line, but not needed.
2937
2938       -Wunused-pattern-binds
2939              warn about pattern match bindings that are unused
2940
2941       -Wunused-record-wildcards
2942              Warn about record wildcard matches when none of the bound  vari‐
2943              ables are used.
2944
2945       -Wunused-top-binds
2946              warn about top-level bindings that are unused
2947
2948       -Wunused-type-patterns
2949              warn about unused type variables which arise from patterns in in
2950              type family and data family instances
2951
2952       -Wwarn make warnings non-fatal
2953
2954       -Wwarnings-deprecations
2955              warn about uses of functions & types that have warnings or  dep‐
2956              recated pragmas
2957
2958       -Wwrong-do-bind
2959              warn  about do bindings that appear to throw away monadic values
2960              that you should have bound instead
2961
2963       Copyright 2015. The University Court of the University of Glasgow.  All
2964       rights reserved.
2965

SEE ALSO

2967       https://www.haskell.org/ghc     the GHC homepage
2968

AUTHOR

2970       The GHC Team
2971
2973       2023, GHC Team
2974
2975
2976
2977
29789.6.3                            Sep 25, 2023                           GHC(1)
Impressum