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 and HTML; see be‐
16       low.
17
18       Each of GHC's command line options is classified as  either  static  or
19       dynamic.  A  static  flag  may  only  be specified on the command line,
20       whereas a dynamic flag may also be given in  an  OPTIONS  pragma  in  a
21       source file or set from the GHCi command-line with :set .
22
23       As  a  rule  of thumb, all the language options are dynamic, as are the
24       warning options and the debugging options.
25
26       The rest are static, with the notable exceptions of  -v,  -cpp,  -fasm,
27       -fvia-C,  -fllvm, and -#include.  The OPTIONS sections lists the status
28       of each flag.
29
30       Common suffixes of file names for Haskell are:
31
32       .hs    Haskell source code; preprocess, compile
33
34       .lhs   literate Haskell source; unlit, preprocess, compile
35
36       .hi    Interface file; contains information about exported symbols
37
38       .hc    intermediate C files
39
40       .⟨way⟩_o
41              object files for "way" ⟨way⟩; common ways are:
42
43              dyn    dynamically-linked
44
45              p      built with profiling
46
47       .⟨way⟩_hi
48              interface files for "way" ⟨way⟩; common ways are:
49

OPTIONS

51       Code generation
52              -dynamic-too -fasm  -fbyte-code  -fexternal-dynamic-refs  -fllvm
53              -fno-code -fobject-code -fPIC -fPIE -fwrite-interface
54
55       Debugging the compiler
56              -dcmm-lint     -dcore-lint     -ddump-asm    -ddump-asm-expanded
57              -ddump-asm-liveness    -ddump-asm-native     -ddump-asm-regalloc
58              -ddump-asm-regalloc-stages      -ddump-asm-stats     -ddump-bcos
59              -ddump-cfg-weights  -ddump-cmm   -ddump-cmm-caf   -ddump-cmm-cbe
60              -ddump-cmm-cfg         -ddump-cmm-cps        -ddump-cmm-from-stg
61              -ddump-cmm-info        -ddump-cmm-proc        -ddump-cmm-procmap
62              -ddump-cmm-raw  -ddump-cmm-sink  -ddump-cmm-sp  -ddump-cmm-split
63              -ddump-cmm-switch      -ddump-cmm-verbose      -ddump-core-stats
64              -ddump-cse      -ddump-deriv      -ddump-ds     -ddump-ds-preopt
65              -ddump-ec-trace     -ddump-file-prefix=⟨str⟩      -ddump-foreign
66              -ddump-hpc    -ddump-if-trace    -ddump-inlinings    -ddump-json
67              -ddump-llvm  -ddump-mod-map   -ddump-occur-anal   -ddump-opt-cmm
68              -ddump-parsed     -ddump-parsed-ast     -ddump-prep    -ddump-rn
69              -ddump-rn-ast   -ddump-rn-stats   -ddump-rn-trace    -ddump-rtti
70              -ddump-rule-firings       -ddump-rule-rewrites      -ddump-rules
71              -ddump-simpl     -ddump-simpl-iterations      -ddump-simpl-stats
72              -ddump-spec   -ddump-splices   -ddump-stg  -ddump-str-signatures
73              -ddump-stranal    -ddump-tc    -ddump-tc-ast     -ddump-tc-trace
74              -ddump-ticked    -ddump-timings    -ddump-to-file   -ddump-types
75              -ddump-worker-wrapper   -dfaststring-stats   -dhex-word-literals
76              -dinitial-unique=⟨s⟩    -dinline-check=⟨str⟩   -dno-debug-output
77              -dppr-case-as-let -dppr-cols=⟨n⟩  -dppr-debug  -dppr-user-length
78              -drule-check=⟨str⟩   -dshow-passes   -dstg-lint   -dsuppress-all
79              -dsuppress-coercions  -dsuppress-idinfo   -dsuppress-module-pre‐
80              fixes -dsuppress-stg-free-vars -dsuppress-ticks -dsuppress-time‐
81              stamps  -dsuppress-type-applications  -dsuppress-type-signatures
82              -dsuppress-unfoldings   -dsuppress-uniques  -dsuppress-var-kinds
83              -dth-dec-file -dunique-increment=⟨i⟩ -dverbose-core2core  -dver‐
84              bose-stg2stg       -falignment-sanitisation      -fcatch-bottoms
85              -fllvm-fill-undef-with-garbage -fproc-alignment -g -g⟨n⟩
86
87       C pre-processor
88              -cpp -D⟨symbol⟩[=⟨value⟩] -I⟨dir⟩ -U⟨symbol⟩
89
90       Finding imports
91              -i -i⟨dir⟩[:⟨dir⟩]*
92
93       Interactive mode
94              -fbreak-on-error    -fbreak-on-exception    -fghci-hist-size=⟨n⟩
95              -fghci-leak-check  -flocal-ghci-history -fno-it -fprint-bind-re‐
96              sult -fshow-loaded-modules -ghci-script -ignore-dot-ghci -inter‐
97              active-print ⟨expr⟩
98
99       Interface files
100              --show-iface ⟨file⟩ -ddump-hi -ddump-hi-diffs -ddump-minimal-im‐
101              ports
102
103       Keeping intermediate files
104              -keep-hc-file  -keep-hc-files  -keep-hi-files   -keep-hscpp-file
105              -keep-hscpp-files -keep-llvm-file -keep-llvm-files -keep-o-files
106              -keep-s-file -keep-s-files -keep-tmp-files
107
108       Language options
109              -fno-safe-haskell  -fsort-by-size-hole-fits   -fsort-by-subsump‐
110              tion-hole-fits  -XAllowAmbiguousTypes  -XApplicativeDo  -XArrows
111              -XBangPatterns   -XBinaryLiterals   -XBlockArguments   -XCApiFFI
112              -XConstrainedClassMethods  -XConstraintKinds  -XCPP  -XDataKinds
113              -XDatatypeContexts     -XDefaultSignatures      -XDeriveAnyClass
114              -XDeriveDataTypeable -XDeriveFoldable -XDeriveFunctor -XDeriveG‐
115              eneric  -XDeriveLift  -XDeriveTraversable   -XDerivingStrategies
116              -XDerivingVia -XDisambiguateRecordFields -XDuplicateRecordFields
117              -XEmptyCase  -XEmptyDataDecls   -XEmptyDataDeriving   -XExisten‐
118              tialQuantification  -XExplicitForAll  -XExplicitNamespaces -XEx‐
119              tendedDefaultRules -XFlexibleContexts -XFlexibleInstances -XFor‐
120              eignFunctionInterface  -XFunctionalDependencies  -XGADTs -XGADT‐
121              Syntax -XGeneralisedNewtypeDeriving -XGeneralizedNewtypeDeriving
122              -XHexFloatLiterals -XImplicitParams -XImpredicativeTypes -XInco‐
123              herentInstances -XInstanceSigs  -XInterruptibleFFI  -XKindSigna‐
124              tures -XLambdaCase -XLiberalTypeSynonyms -XMagicHash -XMonadCom‐
125              prehensions -XMonadFailDesugaring -XMonoLocalBinds -XMultiParam‐
126              TypeClasses   -XMultiWayIf   -XNamedFieldPuns   -XNamedWildCards
127              -XNegativeLiterals -XNoImplicitPrelude  -XNoMonomorphismRestric‐
128              tion  -XNoPatternGuards -XNoTraditionalRecordSyntax -XNPlusKPat‐
129              terns  -XNullaryTypeClasses  -XNumDecimals  -XNumericUnderscores
130              -XOverlappingInstances    -XOverloadedLabels   -XOverloadedLists
131              -XOverloadedStrings -XPackageImports  -XParallelListComp  -XPar‐
132              tialTypeSignatures -XPatternSynonyms -XPolyKinds -XPostfixOpera‐
133              tors -XQuantifiedConstraints -XQuasiQuotes -XRank2Types -XRankN‐
134              Types    -XRebindableSyntax    -XRecordWildCards   -XRecursiveDo
135              -XRoleAnnotations  -XSafe  -XScopedTypeVariables  -XStandaloneD‐
136              eriving   -XStarIsType  -XStaticPointers  -XStrict  -XStrictData
137              -XTemplateHaskell  -XTemplateHaskellQuotes   -XTransformListComp
138              -XTrustworthy  -XTupleSections -XTypeApplications -XTypeFamilies
139              -XTypeFamilyDependencies -XTypeInType -XTypeOperators -XTypeSyn‐
140              onymInstances   -XUnboxedSums  -XUnboxedTuples  -XUndecidableIn‐
141              stances   -XUndecidableSuperClasses   -XUnicodeSyntax   -XUnsafe
142              -XViewPatterns
143
144       Linking options
145              -c -debug -dylib-install-name ⟨path⟩ -dynamic -dynload -eventlog
146              -fno-embed-manifest -fno-gen-manifest -fno-shared-implib -frame‐
147              work   ⟨name⟩   -framework-path   ⟨dir⟩  -fwhole-archive-hs-libs
148              -keep-cafs  -L  ⟨dir⟩  -l  ⟨lib⟩  -main-is  ⟨thing⟩  -no-hs-main
149              -no-rtsopts-suggestions  -package  ⟨name⟩  -pie  -rdynamic  -rt‐
150              sopts[=⟨none|some|all|ignore|ignoreAll⟩]   -shared   -split-objs
151              -split-sections    -static    -staticlib   -threaded   -with-rt‐
152              sopts=⟨opts⟩
153
154       Miscellaneous options
155              -fexternal-interpreter -fglasgow-exts -ghcversion-file ⟨path  to
156              ghcversion.h⟩ -H ⟨size⟩ -j[⟨n⟩]
157
158       Modes of operation
159              --frontend   ⟨module⟩  --help  -?  --info  --interactive  --make
160              --mk-dll --numeric-version  --print-libdir  --show-iface  ⟨file⟩
161              --show-options    --supported-extensions   --supported-languages
162              --version -V -e ⟨expr⟩ -M
163
164       Individual optimizations
165              -fasm-shortcutting -fblock-layout-cfg  -fblock-layout-weightless
166              -fblock-layout-weights  -fcall-arity -fcase-folding -fcase-merge
167              -fcmm-elim-common-blocks  -fcmm-sink   -fcpr-anal   -fcross-mod‐
168              ule-specialise      -fcse      -fdicts-cheap      -fdicts-strict
169              -fdmd-tx-dict-sel  -fdo-eta-reduction  -fdo-lambda-eta-expansion
170              -feager-blackholing   -fenable-rewrite-rules  -fexcess-precision
171              -fexitification -fexpose-all-unfoldings -ffloat-in  -ffull-lazi‐
172              ness  -ffun-to-thunk -fignore-asserts -fignore-interface-pragmas
173              -flate-dmd-anal   -flate-specialise   -fliberate-case   -fliber‐
174              ate-case-threshold=⟨n⟩  -fllvm-pass-vectors-in-regs -floopifica‐
175              tion  -fmax-inline-alloc-size=⟨n⟩  -fmax-inline-memcpy-insns=⟨n⟩
176              -fmax-inline-memset-insns=⟨n⟩    -fmax-simplifier-iterations=⟨n⟩
177              -fmax-uncovered-patterns=⟨n⟩ -fmax-worker-args=⟨n⟩  -fno-opt-co‐
178              ercion  -fno-pre-inlining -fno-state-hack -fomit-interface-prag‐
179              mas  -fomit-yields  -foptimal-applicative-do  -fpedantic-bottoms
180              -fregs-graph  -fregs-iterative -fsimpl-tick-factor=⟨n⟩ -fsimpli‐
181              fier-phases=⟨n⟩ -fsolve-constant-dicts -fspec-constr -fspec-con‐
182              str-count=⟨n⟩   -fspec-constr-keen   -fspec-constr-threshold=⟨n⟩
183              -fspecialise -fspecialise-aggressively  -fstatic-argument-trans‐
184              formation    -fstg-cse   -fstg-lift-lams   -fstg-lift-lams-known
185              -fstg-lift-lams-non-rec-args -fstg-lift-lams-rec-args  -fstrict‐
186              ness  -fstrictness-before=⟨n⟩  -funbox-small-strict-fields -fun‐
187              box-strict-fields  -funfolding-creation-threshold=⟨n⟩  -funfold‐
188              ing-dict-discount=⟨n⟩   -funfolding-fun-discount=⟨n⟩   -funfold‐
189              ing-keeness-factor=⟨n⟩ -funfolding-use-threshold=⟨n⟩
190
191       Optimization levels
192              -O -O1 -O0 -O2
193
194       Package options
195              -clear-package-db -distrust ⟨pkg⟩ -distrust-all-packages -fpack‐
196              age-trust  -global-package-db  -hide-all-packages  -hide-package
197              ⟨pkg⟩     -ignore-package      ⟨pkg⟩      -no-auto-link-packages
198              -no-global-package-db  -no-user-package-db -package ⟨pkg⟩ -pack‐
199              age-db ⟨file⟩ -package-env ⟨file⟩|⟨name⟩  -package-id  ⟨unit-id⟩
200              -this-unit-id ⟨unit-id⟩ -trust ⟨pkg⟩ -user-package-db
201
202       Phases of compilation
203              -C -c -E -F -S -x ⟨suffix⟩
204
205       Overriding external programs
206              -pgma  ⟨cmd⟩  -pgmc  ⟨cmd⟩ -pgmdll ⟨cmd⟩ -pgmF ⟨cmd⟩ -pgmi ⟨cmd⟩
207              -pgmL ⟨cmd⟩ -pgml ⟨cmd⟩ -pgmlc ⟨cmd⟩  -pgmlibtool  ⟨cmd⟩  -pgmlo
208              ⟨cmd⟩ -pgmP ⟨cmd⟩ -pgms ⟨cmd⟩ -pgmwindres ⟨cmd⟩
209
210       Phase-specific options
211              -opta  ⟨option⟩  -optc  ⟨option⟩ -optdll ⟨option⟩ -optF ⟨option⟩
212              -opti ⟨option⟩ -optL ⟨option⟩  -optl  ⟨option⟩  -optlc  ⟨option⟩
213              -optlo ⟨option⟩ -optP ⟨option⟩ -optwindres ⟨option⟩
214
215       Platform-specific options
216              -msse2 -msse4.2
217
218       Compiler plugins
219              -fclear-plugins  -fplugin-opt=⟨module⟩:⟨args⟩  -fplugin=⟨module⟩
220              -hide-all-plugin-packages  -plugin-package  ⟨pkg⟩  -plugin-pack‐
221              age-id ⟨pkg-id⟩
222
223       Profiling
224              -fno-prof-auto       -fno-prof-cafs      -fno-prof-count-entries
225              -fprof-auto        -fprof-auto-calls        -fprof-auto-exported
226              -fprof-auto-top -fprof-cafs -prof -ticky
227
228       Program coverage
229              -fhpc
230
231       Recompilation checking
232              -fforce-recomp -fignore-hpc-changes -fignore-optim-changes
233
234       Redirecting output
235              --exclude-module=⟨file⟩  -ddump-mod-cycles  -dep-makefile ⟨file⟩
236              -dep-suffix ⟨suffix⟩ -dumpdir ⟨dir⟩ -hcsuf ⟨suffix⟩ -hidir ⟨dir⟩
237              -hiedir ⟨dir⟩ -hiesuf ⟨suffix⟩ -hisuf ⟨suffix⟩ -include-pkg-deps
238              -o ⟨file⟩ -odir ⟨dir⟩  -ohi  ⟨file⟩  -osuf  ⟨suffix⟩  -outputdir
239              ⟨dir⟩ -stubdir ⟨dir⟩
240
241       Temporary files
242              -tmpdir ⟨dir⟩
243
244       Verbosity options
245              -fabstract-refinement-hole-fits         -fdiagnostics-color=⟨al‐
246              ways|auto|never⟩     -fdiagnostics-show-caret      -ferror-spans
247              -fhide-source-paths  -fmax-refinement-hole-fits=⟨n⟩  -fmax-rele‐
248              vant-binds=⟨n⟩                         -fmax-valid-hole-fits=⟨n⟩
249              -fno-show-valid-hole-fits              -fno-sort-valid-hole-fits
250              -fprint-equality-relations -fprint-expanded-synonyms -fprint-ex‐
251              plicit-coercions -fprint-explicit-foralls -fprint-explicit-kinds
252              -fprint-explicit-runtime-reps      -fprint-explicit-runtime-reps
253              -fprint-potential-instances      -fprint-typechecker-elaboration
254              -fprint-unicode-syntax  -frefinement-level-hole-fits=⟨n⟩   -fre‐
255              verse-errors   -fshow-docs-of-hole-fits  -fshow-hole-constraints
256              -fshow-hole-matches-of-hole-fits  -fshow-provenance-of-hole-fits
257              -fshow-type-app-of-hole-fits   -fshow-type-app-vars-of-hole-fits
258              -fshow-type-of-hole-fits -funclutter-valid-hole-fits  -Rghc-tim‐
259              ing -v -v⟨n⟩
260
261       Warnings
262              -fdefer-out-of-scope-variables     -fdefer-type-errors     -fde‐
263              fer-typed-holes  -fhelpful-errors   -fmax-pmcheck-iterations=⟨n⟩
264              -fshow-warning-groups  -W  -w -Wall -Wall-missed-specialisations
265              -Wcompat  -Wcpp-undef  -Wdeferred-out-of-scope-variables   -Wde‐
266              ferred-type-errors -Wdeprecated-flags -Wdeprecations -Wdodgy-ex‐
267              ports -Wdodgy-foreign-imports  -Wdodgy-imports  -Wduplicate-con‐
268              straints  -Wduplicate-exports -Wempty-enumerations -Werror -Wev‐
269              erything -Whi-shadowing -Widentities -Wimplicit-kind-vars  -Wim‐
270              plicit-prelude  -Winaccessible-code  -Wincomplete-patterns -Win‐
271              complete-record-updates     -Wincomplete-uni-patterns      -Win‐
272              line-rule-shadowing -Wmissed-extra-shared-lib -Wmissed-speciali‐
273              sations   -Wmissing-deriving-strategies   -Wmissing-export-lists
274              -Wmissing-exported-signatures   -Wmissing-exported-sigs  -Wmiss‐
275              ing-fields -Wmissing-home-modules -Wmissing-import-lists -Wmiss‐
276              ing-local-signatures    -Wmissing-local-sigs   -Wmissing-methods
277              -Wmissing-monadfail-instances   -Wmissing-pattern-synonym-signa‐
278              tures       -Wmissing-signatures      -Wmonomorphism-restriction
279              -Wname-shadowing   -Wno-compat    -Wnoncanonical-monad-instances
280              -Wnoncanonical-monadfail-instances     -Wnoncanonical-monoid-in‐
281              stances -Worphans  -Woverflowed-literals  -Woverlapping-patterns
282              -Wpartial-fields    -Wpartial-type-signatures   -Wredundant-con‐
283              straints  -Wsafe  -Wsemigroup   -Wsimplifiable-class-constraints
284              -Wspace-after-bang  -Wstar-binder -Wstar-is-type -Wtabs -Wtrust‐
285              worthy-safe -Wtype-defaults -Wtyped-holes -Wunbanged-strict-pat‐
286              terns  -Wunrecognised-pragmas -Wunrecognised-warning-flags -Wun‐
287              safe  -Wunsupported-calling-conventions  -Wunsupported-llvm-ver‐
288              sion       -Wunticked-promoted-constructors       -Wunused-binds
289              -Wunused-do-bind -Wunused-foralls -Wunused-imports  -Wunused-lo‐
290              cal-binds         -Wunused-matches        -Wunused-pattern-binds
291              -Wunused-top-binds -Wunused-type-patterns -Wwarn -Wwarnings-dep‐
292              recations -Wwrong-do-bind
293
294   Code generation
295       -dynamic-too
296              Build dynamic object files as well as static object files during
297              compilation
298
299       -fasm  Use the native code generator
300
301       -fbyte-code
302              Generate byte-code
303
304       -fexternal-dynamic-refs
305              Generate code for linking against dynamic libraries
306
307       -fllvm Compile using the LLVM code generator
308
309       -fno-code
310              Omit code generation
311
312       -fobject-code
313              Generate object code
314
315       -fPIC  Generate position-independent code (where available)
316
317       -fPIE  Generate  code  for  a  position-independent  executable  (where
318              available)
319
320       -fwrite-interface
321              Always write interface files
322
323   Debugging the compiler
324       -dcmm-lint
325              C-\- pass sanity checking
326
327       -dcore-lint
328              Turn on internal sanity checking
329
330       -ddump-asm
331              Dump final assembly
332
333       -ddump-asm-expanded
334              Dump the result of the synthetic instruction expansion pass.
335
336       -ddump-asm-liveness
337              Dump assembly augmented with register liveness
338
339       -ddump-asm-native
340              Dump initial assembly
341
342       -ddump-asm-regalloc
343              Dump the result of register allocation
344
345       -ddump-asm-regalloc-stages
346              Dump the build/spill stages of the -fregs-graph register alloca‐
347              tor.
348
349       -ddump-asm-stats
350              Dump statistics from the register allocator.
351
352       -ddump-bcos
353              Dump interpreter byte code
354
355       -ddump-cfg-weights
356              Dump the assumed weights of the CFG.
357
358       -ddump-cmm
359              Dump the final C-\- output
360
361       -ddump-cmm-caf
362              Dump the results of the C-\- CAF analysis pass.
363
364       -ddump-cmm-cbe
365              Dump the results of common block elimination
366
367       -ddump-cmm-cfg
368              Dump the results of the C-\- control flow optimisation pass.
369
370       -ddump-cmm-cps
371              Dump the results of the CPS pass
372
373       -ddump-cmm-from-stg
374              Dump STG-to-C-\- output
375
376       -ddump-cmm-info
377              Dump the results of the C-\- info table augmentation pass.
378
379       -ddump-cmm-proc
380              Dump the results of proc-point analysis
381
382       -ddump-cmm-procmap
383              Dump the results of the C-\- proc-point map pass.
384
385       -ddump-cmm-raw
386              Dump raw C-\-
387
388       -ddump-cmm-sink
389              Dump the results of the C-\- sinking pass.
390
391       -ddump-cmm-sp
392              Dump the results of the C-\- stack layout pass.
393
394       -ddump-cmm-split
395              Dump the results of the C-\- proc-point splitting pass.
396
397       -ddump-cmm-switch
398              Dump the results of switch lowering passes
399
400       -ddump-cmm-verbose
401              Show output from main C-\- pipeline passes
402
403       -ddump-core-stats
404              Print a one-line summary of the size of the Core program at  the
405              end of the optimisation pipeline
406
407       -ddump-cse
408              Dump CSE output
409
410       -ddump-deriv
411              Dump deriving output
412
413       -ddump-ds
414              Dump desugarer output.
415
416       -ddump-ec-trace
417              Trace exhaustiveness checker
418
419       -ddump-file-prefix=⟨str⟩
420              Set the prefix of the filenames used for debugging output.
421
422       -ddump-foreign
423              Dump foreign export stubs
424
425       -ddump-hpc
426              An alias for -ddump-ticked.
427
428       -ddump-if-trace
429              Trace interface files
430
431       -ddump-inlinings
432              Dump inlining info
433
434       -ddump-json
435              Dump error messages as JSON documents
436
437       -ddump-llvm
438              Dump LLVM intermediate code.
439
440       -ddump-mod-map
441              Dump the state of the module mapping database.
442
443       -ddump-occur-anal
444              Dump occurrence analysis output
445
446       -ddump-opt-cmm
447              Dump the results of C-\- to C-\- optimising passes
448
449       -ddump-parsed
450              Dump parse tree
451
452       -ddump-parsed-ast
453              Dump parser output as a syntax tree
454
455       -ddump-prep
456              Dump prepared core
457
458       -ddump-rn
459              Dump renamer output
460
461       -ddump-rn-ast
462              Dump renamer output as a syntax tree
463
464       -ddump-rn-stats
465              Renamer stats
466
467       -ddump-rn-trace
468              Trace renamer
469
470       -ddump-rtti
471              Trace runtime type inference
472
473       -ddump-rule-firings
474              Dump rule firing info
475
476       -ddump-rule-rewrites
477              Dump detailed rule firing info
478
479       -ddump-rules
480              Dump rewrite rules
481
482       -ddump-simpl
483              Dump final simplifier output
484
485       -ddump-simpl-iterations
486              Dump output from each simplifier iteration
487
488       -ddump-simpl-stats
489              Dump simplifier stats
490
491       -ddump-spec
492              Dump specialiser output
493
494       -ddump-splices
495              Dump TH spliced expressions, and what they evaluate to
496
497       -ddump-stg
498              Dump final STG
499
500       -ddump-str-signatures
501              Dump strictness signatures
502
503       -ddump-stranal
504              Dump strictness analyser output
505
506       -ddump-tc
507              Dump typechecker output
508
509       -ddump-tc-ast
510              Dump typechecker output as a syntax tree
511
512       -ddump-tc-trace
513              Trace typechecker
514
515       -ddump-ticked
516              Dump the code instrumented by HPC (hpc).
517
518       -ddump-timings
519              Dump per-pass timing and allocation statistics
520
521       -ddump-to-file
522              Dump to files instead of stdout
523
524       -ddump-types
525              Dump type signatures
526
527       -ddump-worker-wrapper
528              Dump worker-wrapper output
529
530       -dfaststring-stats
531              Show statistics for fast string usage when finished
532
533       -dhex-word-literals
534              Print values of type Word# in hexadecimal.
535
536       -dinitial-unique=⟨s⟩
537              Start UniqSupply allocation from ⟨s⟩.
538
539       -dinline-check=⟨str⟩
540              Dump information about inlining decisions
541
542       -dno-debug-output
543              Suppress unsolicited debugging output
544
545       -dppr-case-as-let
546              Print single alternative case expressions as strict lets.
547
548       -dppr-cols=⟨n⟩
549              Set the width of debugging output. For example -dppr-cols200
550
551       -dppr-debug
552              Turn on debug printing (more verbose)
553
554       -dppr-user-length
555              Set the depth for printing expressions in error msgs
556
557       -drule-check=⟨str⟩
558              Dump information about potential rule application
559
560       -dshow-passes
561              Print out each pass name as it happens
562
563       -dstg-lint
564              STG pass sanity checking
565
566       -dsuppress-all
567              In  dumps, suppress everything (except for uniques) that is sup‐
568              pressible.
569
570       -dsuppress-coercions
571              Suppress the printing of coercions in Core dumps  to  make  them
572              shorter
573
574       -dsuppress-idinfo
575              Suppress  extended  information about identifiers where they are
576              bound
577
578       -dsuppress-module-prefixes
579              Suppress the printing of module qualification prefixes
580
581       -dsuppress-stg-free-vars
582              Suppress the printing of closure free variable lists in STG out‐
583              put
584
585       -dsuppress-ticks
586              Suppress "ticks" in the pretty-printer output.
587
588       -dsuppress-timestamps
589              Suppress timestamps in dumps
590
591       -dsuppress-type-applications
592              Suppress type applications
593
594       -dsuppress-type-signatures
595              Suppress type signatures
596
597       -dsuppress-unfoldings
598              Suppress  the  printing of the stable unfolding of a variable at
599              its binding site
600
601       -dsuppress-uniques
602              Suppress the printing of uniques in debug output (easier to  use
603              diff)
604
605       -dsuppress-var-kinds
606              Suppress the printing of variable kinds
607
608       -dth-dec-file
609              Dump evaluated TH declarations into *.th.hs files
610
611       -dunique-increment=⟨i⟩
612              Set the increment for the generated Unique's to ⟨i⟩.
613
614       -dverbose-core2core
615              Show output from each core-to-core pass
616
617       -dverbose-stg2stg
618              Show output from each STG-to-STG pass
619
620       -falignment-sanitisation
621              Compile with alignment checks for all info table dereferences.
622
623       -fcatch-bottoms
624              Insert  error  expressions  after  bottoming expressions; useful
625              when debugging the compiler.
626
627       -fllvm-fill-undef-with-garbage
628              Intruct LLVM to fill dead STG registers with garbage
629
630       -fproc-alignment
631              Align functions at given boundary.
632
633       -g     Produce DWARF debug information in compiled object  files.   ⟨n⟩
634              can  be 0, 1, or 2, with higher numbers producing richer output.
635              If ⟨n⟩ is omitted, level 2 is assumed.
636
637   C pre-processor
638       -cpp   Run the C pre-processor on Haskell source files
639
640       -D⟨symbol⟩[=⟨value⟩]
641              Define a symbol in the C pre-processor
642
643       -I⟨dir⟩
644              Add ⟨dir⟩ to the directory search list for #include files
645
646       -U⟨symbol⟩
647              Undefine a symbol in the C pre-processor
648
649   Finding imports
650       -i     Empty the import directory list
651
652       -i⟨dir⟩[:⟨dir⟩]*
653              add ⟨dir⟩, ⟨dir2⟩, etc. to import path
654
655   Interactive mode
656       -fbreak-on-error
657              Break on uncaught exceptions and errors
658
659       -fbreak-on-exception
660              Break on any exception thrown
661
662       -fghci-hist-size=⟨n⟩
663              Set the number of entries GHCi keeps for :history.  See ghci-de‐
664              bugger.
665
666       -fghci-leak-check
667              (Debugging  only) check for space leaks when loading new modules
668              in GHCi.
669
670       -flocal-ghci-history
671              Use  current  directory  for  the  GHCi  command  history   file
672              .ghci-history.
673
674       -fno-it
675              No longer set the special variable it.
676
677       -fprint-bind-result
678              Turn on printing of binding results in GHCi
679
680       -fshow-loaded-modules
681              Show  the  names  of modules that GHCi loaded after a :load com‐
682              mand.
683
684       -ghci-script
685              Read additional .ghci files
686
687       -ignore-dot-ghci
688              Disable reading of .ghci files
689
690       -interactive-print ⟨expr⟩
691              Select the function to use for printing evaluated expressions in
692              GHCi
693
694   Interface files
695       --show-iface ⟨file⟩
696              See modes.
697
698       -ddump-hi
699              Dump the new interface to stdout
700
701       -ddump-hi-diffs
702              Show the differences vs. the old interface
703
704       -ddump-minimal-imports
705              Dump a minimal set of imports
706
707   Keeping intermediate files
708       -keep-hc-file
709              Retain intermediate .hc files.
710
711       -keep-hi-files
712              Retain intermediate .hi files (the default).
713
714       -keep-hscpp-file
715              Retain intermediate .hscpp files.
716
717       -keep-llvm-file
718              Retain intermediate LLVM .ll files.  Implies -fllvm.
719
720       -keep-o-files
721              Retain intermediate .o files (the default).
722
723       -keep-s-file
724              Retain intermediate .s files.
725
726       -keep-tmp-files
727              Retain all intermediate temporary files.
728
729   Language options
730       -fno-safe-haskell
731              Disable Safe Haskell
732
733       -fsort-by-size-hole-fits
734              Sort valid hole fits by size.
735
736       -fsort-by-subsumption-hole-fits
737              Sort valid hole fits by subsumption.
738
739       -XAllowAmbiguousTypes
740              Allow  the user to write ambiguous types, and the type inference
741              engine to infer them.
742
743       -XApplicativeDo
744              Enable Applicative do-notation desugaring
745
746       -XArrows
747              Enable arrow notation extension
748
749       -XBangPatterns
750              Enable bang patterns.
751
752       -XBinaryLiterals
753              Enable support for binary literals.
754
755       -XBlockArguments
756              Allow do blocks and other constructs as function arguments.
757
758       -XCApiFFI
759              Enable the CAPI calling convention.
760
761       -XConstrainedClassMethods
762              Enable constrained class methods.
763
764       -XConstraintKinds
765              Enable a kind of constraints.
766
767       -XCPP  Enable the C preprocessor.
768
769       -XDataKinds
770              Enable datatype promotion.
771
772       -XDatatypeContexts
773              Allow contexts on data types.
774
775       -XDefaultSignatures
776              Enable default signatures.
777
778       -XDeriveAnyClass
779              Enable deriving for any class.
780
781       -XDeriveDataTypeable
782              Enable deriving for the Data class.  Implied by (deprecated) Au‐
783              toDeriveTypeable.
784
785       -XDeriveFoldable
786              Enable  deriving  for  the  Foldable  class.  Implied by Derive‐
787              Traversable.
788
789       -XDeriveFunctor
790              Enable deriving for  the  Functor  class.   Implied  by  Derive‐
791              Traversable.
792
793       -XDeriveGeneric
794              Enable deriving for the Generic class.
795
796       -XDeriveLift
797              Enable deriving for the Lift class
798
799       -XDeriveTraversable
800              Enable  deriving for the Traversable class.  Implies DeriveFunc‐
801              tor and DeriveFoldable.
802
803       -XDerivingStrategies
804              Enables deriving strategies.
805
806       -XDerivingVia
807              Enable deriving instances via types of the same  runtime  repre‐
808              sentation.  Implies DerivingStrategies.
809
810       -XDisambiguateRecordFields
811              Enable record field disambiguation.  Implied by RecordWildCards.
812
813       -XDuplicateRecordFields
814              Allow definition of record types with identically-named fields.
815
816       -XEmptyCase
817              Allow empty case alternatives.
818
819       -XEmptyDataDecls
820              Allow definition of empty data types.
821
822       -XEmptyDataDeriving
823              Allow deriving instances of standard type classes for empty data
824              types.
825
826       -XExistentialQuantification
827              Enable liberalised type synonyms.
828
829       -XExplicitForAll
830              Enable explicit universal quantification.   Implied  by  Scoped‐
831              TypeVariables,   LiberalTypeSynonyms,  RankNTypes  and  Existen‐
832              tialQuantification.
833
834       -XExplicitNamespaces
835              Enable using the keyword type to specify the  namespace  of  en‐
836              tries  in imports and exports (explicit-namespaces).  Implied by
837              TypeOperators and TypeFamilies.
838
839       -XExtendedDefaultRules
840              Use GHCi's extended default rules in a normal module.
841
842       -XFlexibleContexts
843              Enable flexible contexts. Implied by ImplicitParams.
844
845       -XFlexibleInstances
846              Enable flexible instances.  Implies  TypeSynonymInstances.   Im‐
847              plied by ImplicitParams.
848
849       -XForeignFunctionInterface
850              Enable foreign function interface.
851
852       -XFunctionalDependencies
853              Enable functional dependencies.  Implies MultiParamTypeClasses.
854
855       -XGADTs
856              Enable generalised algebraic data types.  Implies GADTSyntax and
857              MonoLocalBinds.
858
859       -XGADTSyntax
860              Enable generalised algebraic data type syntax.
861
862       -XGeneralisedNewtypeDeriving
863              Enable newtype deriving.
864
865       -XGeneralizedNewtypeDeriving
866              Enable newtype deriving.
867
868       -XHexFloatLiterals
869              Enable support for hexadecimal floating point literals.
870
871       -XImplicitParams
872              Enable Implicit Parameters.  Implies FlexibleContexts and Flexi‐
873              bleInstances.
874
875       -XImpredicativeTypes
876              Enable impredicative types.  Implies RankNTypes.
877
878       -XIncoherentInstances
879              Enable incoherent instances.  Implies OverlappingInstances.
880
881       -XInstanceSigs
882              Enable instance signatures.
883
884       -XInterruptibleFFI
885              Enable interruptible FFI.
886
887       -XKindSignatures
888              Enable kind signatures.  Implied by TypeFamilies and PolyKinds.
889
890       -XLambdaCase
891              Enable lambda-case expressions.
892
893       -XLiberalTypeSynonyms
894              Enable liberalised type synonyms.
895
896       -XMagicHash
897              Allow # as a postfix modifier on identifiers.
898
899       -XMonadComprehensions
900              Enable monad comprehensions.
901
902       -XMonadFailDesugaring
903              Enable monadfail desugaring.
904
905       -XMonoLocalBinds
906              Enable  do  not generalise local bindings.  Implied by TypeFami‐
907              lies and GADTs.
908
909       -XMultiParamTypeClasses
910              Enable multi parameter type classes.  Implied  by  FunctionalDe‐
911              pendencies.
912
913       -XMultiWayIf
914              Enable multi-way if-expressions.
915
916       -XNamedFieldPuns
917              Enable record puns.
918
919       -XNamedWildCards
920              Enable named wildcards.
921
922       -XNegativeLiterals
923              Enable support for negative literals.
924
925       -XNoImplicitPrelude
926              Don't implicitly import Prelude.  Implied by RebindableSyntax.
927
928       -XNoMonomorphismRestriction
929              Disable the monomorphism restriction.
930
931       -XNoPatternGuards
932              Disable pattern guards.  Implied by Haskell98.
933
934       -XNoTraditionalRecordSyntax
935              Disable  support  for traditional record syntax (as supported by
936              Haskell 98) C {f = x}
937
938       -XNPlusKPatterns
939              Enable support for n+k patterns.  Implied by Haskell98.
940
941       -XNullaryTypeClasses
942              Deprecated, does nothing. nullary (no  parameter)  type  classes
943              are now enabled using MultiParamTypeClasses.
944
945       -XNumDecimals
946              Enable support for 'fractional' integer literals.
947
948       -XNumericUnderscores
949              Enable support for numeric underscores.
950
951       -XOverlappingInstances
952              Enable overlapping instances.
953
954       -XOverloadedLabels
955              Enable overloaded labels.
956
957       -XOverloadedLists
958              Enable overloaded lists.
959
960       -XOverloadedStrings
961              Enable overloaded string literals.
962
963       -XPackageImports
964              Enable package-qualified imports.
965
966       -XParallelListComp
967              Enable parallel list comprehensions.
968
969       -XPartialTypeSignatures
970              Enable partial type signatures.
971
972       -XPatternSynonyms
973              Enable pattern synonyms.
974
975       -XPolyKinds
976              Enable kind polymorphism.  Implies KindSignatures.
977
978       -XPostfixOperators
979              Enable postfix operators.
980
981       -XQuantifiedConstraints
982              Allow forall quantifiers in constraints.
983
984       -XQuasiQuotes
985              Enable quasiquotation.
986
987       -XRank2Types
988              Enable rank-2 types.  Synonym for RankNTypes.
989
990       -XRankNTypes
991              Enable rank-N types.  Implied by ImpredicativeTypes.
992
993       -XRebindableSyntax
994              Employ rebindable syntax.  Implies NoImplicitPrelude.
995
996       -XRecordWildCards
997              Enable record wildcards.  Implies DisambiguateRecordFields.
998
999       -XRecursiveDo
1000              Enable recursive do (mdo) notation.
1001
1002       -XRoleAnnotations
1003              Enable role annotations.
1004
1005       -XSafe Enable the Safe Haskell Safe mode.
1006
1007       -XScopedTypeVariables
1008              Enable lexically-scoped type variables.
1009
1010       -XStandaloneDeriving
1011              Enable standalone deriving.
1012
1013       -XStarIsType
1014              Treat * as Data.Kind.Type.
1015
1016       -XStaticPointers
1017              Enable static pointers.
1018
1019       -XStrict
1020              Make bindings in the current module strict by default.
1021
1022       -XStrictData
1023              Enable default strict datatype fields.
1024
1025       -XTemplateHaskell
1026              Enable Template Haskell.
1027
1028       -XTemplateHaskellQuotes
1029              Enable quotation subset of Template Haskell.
1030
1031       -XTransformListComp
1032              Enable generalised list comprehensions.
1033
1034       -XTrustworthy
1035              Enable the Safe Haskell Trustworthy mode.
1036
1037       -XTupleSections
1038              Enable tuple sections.
1039
1040       -XTypeApplications
1041              Enable type application syntax in terms and types.
1042
1043       -XTypeFamilies
1044              Enable  type  families.   Implies ExplicitNamespaces, KindSigna‐
1045              tures, and MonoLocalBinds.
1046
1047       -XTypeFamilyDependencies
1048              Enable injective type families.  Implies TypeFamilies.
1049
1050       -XTypeInType
1051              Deprecated. Enable kind polymorphism and datatype promotion.
1052
1053       -XTypeOperators
1054              Enable type operators.  Implies ExplicitNamespaces.
1055
1056       -XTypeSynonymInstances
1057              Enable type synonyms in instance heads.  Implied by  FlexibleIn‐
1058              stances.
1059
1060       -XUnboxedSums
1061              Enable unboxed sums.
1062
1063       -XUnboxedTuples
1064              Enable the use of unboxed tuple syntax.
1065
1066       -XUndecidableInstances
1067              Enable undecidable instances.
1068
1069       -XUndecidableSuperClasses
1070              Allow  all  superclass constraints, including those that may re‐
1071              sult in non-termination of the typechecker.
1072
1073       -XUnicodeSyntax
1074              Enable unicode syntax.
1075
1076       -XUnsafe
1077              Enable Safe Haskell Unsafe mode.
1078
1079       -XViewPatterns
1080              Enable view patterns.
1081
1082   Linking options
1083       -c     Stop after generating object (.o) file
1084
1085       -debug Use the debugging runtime
1086
1087       -dylib-install-name ⟨path⟩
1088              Set the  install  name  (via  -install_name  passed  to  Apple's
1089              linker),  specifying  the full install path of the library file.
1090              Any libraries or executables that link with it later  will  pick
1091              up  that  path  as  their runtime search location for it.  (Dar‐
1092              win/OS X only)
1093
1094       -dynamic
1095              Build dynamically-linked object files and executables
1096
1097       -dynload
1098              Selects one of a number of modes for finding shared libraries at
1099              runtime.
1100
1101       -eventlog
1102              Enable runtime event tracing
1103
1104       -fno-embed-manifest
1105              Do not embed the manifest in the executable (Windows only)
1106
1107       -fno-gen-manifest
1108              Do not generate a manifest file (Windows only)
1109
1110       -fno-shared-implib
1111              Don't generate an import library for a DLL (Windows only)
1112
1113       -framework ⟨name⟩
1114              On  Darwin/OS X/iOS only, link in the framework ⟨name⟩. This op‐
1115              tion corresponds to the -framework option for Apple's Linker.
1116
1117       -framework-path ⟨dir⟩
1118              On Darwin/OS X/iOS only, add ⟨dir⟩ to the  list  of  directories
1119              searched  for  frameworks. This option corresponds to the -F op‐
1120              tion for Apple's Linker.
1121
1122       -fwhole-archive-hs-libs
1123              When  linking  a  binary  executable,  this  inserts  the   flag
1124              -Wl,--whole-archive  before  any -l flags for Haskell libraries,
1125              and -Wl,--no-whole-archive afterwards
1126
1127       -keep-cafs
1128              Do not garbage-collect CAFs (top-level expressions) at runtime
1129
1130       -L ⟨dir⟩
1131              Add ⟨dir⟩ to the list of directories searched for libraries
1132
1133       -l ⟨lib⟩
1134              Link in library ⟨lib⟩
1135
1136       -main-is ⟨thing⟩
1137              Set main module and function
1138
1139       -no-hs-main
1140              Don't assume this program contains main
1141
1142       -no-rtsopts-suggestions
1143              Don't  print   RTS   suggestions   about   linking   with   -rt‐
1144              sopts[=⟨none|some|all|ignore|ignoreAll⟩].
1145
1146       -package ⟨name⟩
1147              Expose package ⟨pkg⟩
1148
1149       -pie   Instruct  the  linker  to  produce  a  position-independent exe‐
1150              cutable.
1151
1152       -rdynamic
1153              This instructs the linker to add  all  symbols,  not  only  used
1154              ones,  to  the  dynamic  symbol  table. Currently Linux and Win‐
1155              dows/MinGW32 only. This is equivalent to using  -optl  -rdynamic
1156              on Linux, and -optl -export-all-symbols on Windows.
1157
1158       -rtsopts[=⟨none|some|all|ignore|ignoreAll⟩]
1159              Control  whether  the  RTS  behaviour  can  be  tweaked via com‐
1160              mand-line flags and the GHCRTS environment variable. Using  none
1161              means  no  RTS  flags can be given; some means only a minimum of
1162              safe options can be given (the default); all (or no argument  at
1163              all)  means  that  all RTS flags are permitted; ignore means RTS
1164              flags can be given, but are treated  as  regular  arguments  and
1165              passed  to  the  Haskell  program as arguments; ignoreAll is the
1166              same as ignore, but GHCRTS is also ignored.  -rtsopts  does  not
1167              affect  -with-rtsopts  behavior;  flags passed via -with-rtsopts
1168              are used regardless of -rtsopts.
1169
1170       -shared
1171              Generate a shared library (as opposed to an executable)
1172
1173       -split-objs
1174              Split objects (for libraries)
1175
1176       -split-sections
1177              Split sections for link-time dead-code stripping
1178
1179       -static
1180              Use static Haskell libraries
1181
1182       -staticlib
1183              Generate a standalone static library  (as  opposed  to  an  exe‐
1184              cutable).  This  is useful when cross compiling. The library to‐
1185              gether with all its dependencies ends up in in a  single  static
1186              library that can be linked against.
1187
1188       -threaded
1189              Use the threaded runtime
1190
1191       -with-rtsopts=⟨opts⟩
1192              Set the default RTS options to ⟨opts⟩.
1193
1194   Miscellaneous options
1195       -fexternal-interpreter
1196              Run interpreted code in a separate process
1197
1198       -fglasgow-exts
1199              Deprecated.  Enable  most  language extensions; see options-lan‐
1200              guage for exactly which ones.
1201
1202       -ghcversion-file ⟨path to ghcversion.h⟩
1203              (GHC as a C compiler only) Use this ghcversion.h file
1204
1205       -H ⟨size⟩
1206              Set the minimum size of the heap to ⟨size⟩
1207
1208       -j[⟨n⟩]
1209              When compiling with --make, compile ⟨n⟩ modules in parallel.
1210
1211   Modes of operation
1212       --frontend ⟨module⟩
1213              run GHC with the given frontend plugin; see frontend_plugins for
1214              details.
1215
1216       --help Display help
1217
1218       --info display information about the compiler
1219
1220       --interactive
1221              Interactive  mode - normally used by just running ghci; see ghci
1222              for details.
1223
1224       --make Build a multi-module Haskell program, automatically figuring out
1225              dependencies.  Likely  to be much easier, and faster, than using
1226              make; see make-mode for details.
1227
1228       --mk-dll
1229              DLL-creation mode (Windows only)
1230
1231       --numeric-version
1232              display GHC version (numeric only)
1233
1234       --print-libdir
1235              display GHC library directory
1236
1237       --show-iface ⟨file⟩
1238              display the contents of an interface file.
1239
1240       --show-options
1241              display the supported command line options
1242
1243       --supported-extensions
1244              display the supported language extensions
1245
1246       --version
1247              display GHC version
1248
1249       -e ⟨expr⟩
1250              Evaluate expr; see eval-mode for details.
1251
1252       -M     generate dependency information suitable for use in a  Makefile;
1253              see makefile-dependencies for details.
1254
1255   Individual optimizations
1256       -fasm-shortcutting
1257              Enable shortcutting on assembly. Implied by -O2.
1258
1259       -fblock-layout-cfg
1260              Use the new cfg based block layout algorithm.
1261
1262       -fblock-layout-weightless
1263              Ignore cfg weights for code layout.
1264
1265       -fblock-layout-weights
1266              Sets edge weights used by the new code layout algorithm.
1267
1268       -fcall-arity
1269              Enable call-arity optimisation. Implied by -O.
1270
1271       -fcase-folding
1272              Enable constant folding in case expressions. Implied by -O.
1273
1274       -fcase-merge
1275              Enable case-merging. Implied by -O.
1276
1277       -fcmm-elim-common-blocks
1278              Enable Cmm common block elimination. Implied by -O.
1279
1280       -fcmm-sink
1281              Enable Cmm sinking. Implied by -O.
1282
1283       -fcpr-anal
1284              Turn on CPR analysis in the demand analyser. Implied by -O.
1285
1286       -fcross-module-specialise
1287              Turn  on  specialisation  of  overloaded functions imported from
1288              other modules.
1289
1290       -fcse  Enable common sub-expression elimination. Implied by -O.
1291
1292       -fdicts-cheap
1293              Make dictionary-valued expressions seem cheap to the optimiser.
1294
1295       -fdicts-strict
1296              Make dictionaries strict
1297
1298       -fdmd-tx-dict-sel
1299              Use a special demand transformer for dictionary selectors.   Al‐
1300              ways enabled by default.
1301
1302       -fdo-eta-reduction
1303              Enable eta-reduction. Implied by -O.
1304
1305       -fdo-lambda-eta-expansion
1306              Enable lambda eta-expansion. Always enabled by default.
1307
1308       -feager-blackholing
1309              Turn on eager blackholing
1310
1311       -fenable-rewrite-rules
1312              Switch  on all rewrite rules (including rules generated by auto‐
1313              matic specialisation of overloaded functions). Implied by -O.
1314
1315       -fexcess-precision
1316              Enable excess intermediate precision
1317
1318       -fexitification
1319              Enables exitification optimisation. Implied by -O.
1320
1321       -fexpose-all-unfoldings
1322              Expose all unfoldings, even for very large  or  recursive  func‐
1323              tions.
1324
1325       -ffloat-in
1326              Turn on the float-in transformation. Implied by -O.
1327
1328       -ffull-laziness
1329              Turn  on full laziness (floating bindings outwards).  Implied by
1330              -O.
1331
1332       -ffun-to-thunk
1333              Allow worker-wrapper to convert a function closure into a  thunk
1334              if  the  function  does not use any of its arguments. Off by de‐
1335              fault.
1336
1337       -fignore-asserts
1338              Ignore assertions in the source. Implied by -O.
1339
1340       -fignore-interface-pragmas
1341              Ignore pragmas in interface files. Implied by -O0 only.
1342
1343       -flate-dmd-anal
1344              Run demand analysis again, at  the  end  of  the  simplification
1345              pipeline
1346
1347       -flate-specialise
1348              Run a late specialisation pass
1349
1350       -fliberate-case
1351              Turn on the liberate-case transformation. Implied by -O2.
1352
1353       -fliberate-case-threshold=⟨n⟩
1354              default:  2000.  Set  the  size  threshold for the liberate-case
1355              transformation to ⟨n⟩
1356
1357       -fllvm-pass-vectors-in-regs
1358              Pass vector value in vector registers for function calls
1359
1360       -floopification
1361              Turn saturated self-recursive tail-calls into local jumps in the
1362              generated assembly. Implied by -O.
1363
1364       -fmax-inline-alloc-size=⟨n⟩
1365              default:  128.  Set the maximum size of inline array allocations
1366              to ⟨n⟩ bytes (default: 128).
1367
1368       -fmax-inline-memcpy-insns=⟨n⟩
1369              default: 32. Inline memcpy calls if they would generate no  more
1370              than ⟨n⟩ pseudo instructions.
1371
1372       -fmax-inline-memset-insns=⟨n⟩
1373              default:  32. Inline memset calls if they would generate no more
1374              than ⟨n⟩ pseudo instructions
1375
1376       -fmax-simplifier-iterations=⟨n⟩
1377              default: 4. Set the max iterations for the simplifier.
1378
1379       -fmax-uncovered-patterns=⟨n⟩
1380              default: 4. Set the maximum number of  patterns  to  display  in
1381              warnings about non-exhaustive ones.
1382
1383       -fmax-worker-args=⟨n⟩
1384              default:  10.  If a worker has that many arguments, none will be
1385              unpacked anymore.
1386
1387       -fno-opt-coercion
1388              Turn off the coercion optimiser
1389
1390       -fno-pre-inlining
1391              Turn off pre-inlining
1392
1393       -fno-state-hack
1394              Turn off the state hackwhereby  any  lambda  with  a  real-world
1395              state  token as argument is considered to be single-entry. Hence
1396              OK to inline things inside it.
1397
1398       -fomit-interface-pragmas
1399              Don't generate interface pragmas. Implied by -O0 only.
1400
1401       -fomit-yields
1402              Omit heap checks when no allocation is being performed.
1403
1404       -foptimal-applicative-do
1405              Use a slower but better algorithm for ApplicativeDo
1406
1407       -fpedantic-bottoms
1408              Make GHC be more precise about its treatment of bottom (but  see
1409              also  -fno-state-hack).  In  particular, GHC will not eta-expand
1410              through a case expression.
1411
1412       -fregs-graph
1413              Use the graph colouring register allocator for register  alloca‐
1414              tion in the native code generator. Implied by -O2.
1415
1416       -fregs-iterative
1417              Use  the iterative coalescing graph colouring register allocator
1418              in the native code generator.
1419
1420       -fsimpl-tick-factor=⟨n⟩
1421              default: 100. Set the percentage factor for simplifier ticks.
1422
1423       -fsimplifier-phases=⟨n⟩
1424              default: 2. Set the number of phases for  the  simplifier.   Ig‐
1425              nored with -O0.
1426
1427       -fsolve-constant-dicts
1428              When solving constraints, try to eagerly solve super classes us‐
1429              ing available dictionaries.
1430
1431       -fspec-constr
1432              Turn on the SpecConstr transformation. Implied by -O2.
1433
1434       -fspec-constr-count=⟨n⟩
1435              default: 3.* Set to ⟨n⟩ the maximum  number  of  specialisations
1436              that  will  be  created  for  any one function by the SpecConstr
1437              transformation.
1438
1439       -fspec-constr-keen
1440              Specialize a call with an explicit constructor argument, even if
1441              the argument is not scrutinised in the body of the function
1442
1443       -fspec-constr-threshold=⟨n⟩
1444              default:  2000. Set the size threshold for the SpecConstr trans‐
1445              formation to ⟨n⟩.
1446
1447       -fspecialise
1448              Turn on specialisation of overloaded functions. Implied by -O.
1449
1450       -fspecialise-aggressively
1451              Turn on specialisation of  overloaded  functions  regardless  of
1452              size, if unfolding is available
1453
1454       -fstatic-argument-transformation
1455              Turn on the static argument transformation.
1456
1457       -fstg-cse
1458              Enable common sub-expression elimination on the STG intermediate
1459              language
1460
1461       -fstg-lift-lams
1462              Enable late lambda lifting on the STG intermediate language. Im‐
1463              plied by -O2.
1464
1465       -fstg-lift-lams-known
1466              Allow  turning  known  into  unknown calls while performing late
1467              lambda lifting.
1468
1469       -fstg-lift-lams-non-rec-args
1470              Create top-level non-recursive functions with at most <n> param‐
1471              eters while performing late lambda lifting.
1472
1473       -fstg-lift-lams-rec-args
1474              Create top-level recursive functions with at most <n> parameters
1475              while performing late lambda lifting.
1476
1477       -fstrictness
1478              Turn  on  strictness   analysis.    Implied   by   -O.   Implies
1479              -fworker-wrapper
1480
1481       -fstrictness-before=⟨n⟩
1482              Run  an  additional  strictness analysis before simplifier phase
1483              ⟨n⟩
1484
1485       -funbox-small-strict-fields
1486              Flatten strict constructor fields with a pointer-sized represen‐
1487              tation. Implied by -O.
1488
1489       -funbox-strict-fields
1490              Flatten strict constructor fields
1491
1492       -funfolding-creation-threshold=⟨n⟩
1493              default: 750. Tweak unfolding settings.
1494
1495       -funfolding-dict-discount=⟨n⟩
1496              default: 30. Tweak unfolding settings.
1497
1498       -funfolding-fun-discount=⟨n⟩
1499              default: 60. Tweak unfolding settings.
1500
1501       -funfolding-keeness-factor=⟨n⟩
1502              default: 1.5. Tweak unfolding settings.
1503
1504       -funfolding-use-threshold=⟨n⟩
1505              default: 60. Tweak unfolding settings.
1506
1507   Optimization levels
1508       -O     Enable level 1 optimisations
1509
1510       -O0    Disable optimisations (default)
1511
1512       -O2    Enable level 2 optimisations
1513
1514   Package options
1515       -clear-package-db
1516              Clear the package db stack.
1517
1518       -distrust ⟨pkg⟩
1519              Expose   package   ⟨pkg⟩  and  set  it  to  be  distrusted.  See
1520              safe-haskell.
1521
1522       -distrust-all-packages
1523              Distrust all packages by default. See safe-haskell.
1524
1525       -fpackage-trust
1526              Enable Safe Haskell trusted package requirement for  trustworthy
1527              modules.
1528
1529       -global-package-db
1530              Add the global package db to the stack.
1531
1532       -hide-all-packages
1533              Hide all packages by default
1534
1535       -hide-package ⟨pkg⟩
1536              Hide package ⟨pkg⟩
1537
1538       -ignore-package ⟨pkg⟩
1539              Ignore package ⟨pkg⟩
1540
1541       -no-auto-link-packages
1542              Don't automatically link in the base and rts packages.
1543
1544       -no-global-package-db
1545              Remove the global package db from the stack.
1546
1547       -no-user-package-db
1548              Remove the user's package db from the stack.
1549
1550       -package ⟨pkg⟩
1551              Expose package ⟨pkg⟩
1552
1553       -package-db ⟨file⟩
1554              Add ⟨file⟩ to the package db stack.
1555
1556       -package-env ⟨file⟩|⟨name⟩
1557              Use the specified package environment.
1558
1559       -package-id ⟨unit-id⟩
1560              Expose package by id ⟨unit-id⟩
1561
1562       -this-unit-id ⟨unit-id⟩
1563              Compile to be part of unit (i.e. package) ⟨unit-id⟩
1564
1565       -trust ⟨pkg⟩
1566              Expose package ⟨pkg⟩ and set it to be trusted. See safe-haskell.
1567
1568       -user-package-db
1569              Add the user's package db to the stack.
1570
1571   Phases of compilation
1572       -C     Stop after generating C (.hc file)
1573
1574       -c     Stop after generating object (.o) file
1575
1576       -E     Stop after preprocessing (.hspp file)
1577
1578       -F     Enable the use of a pre-processor (set with -pgmF ⟨cmd⟩)
1579
1580       -S     Stop after generating assembly (.s file)
1581
1582       -x ⟨suffix⟩
1583              Override default behaviour for source files
1584
1585   Overriding external programs
1586       -pgma ⟨cmd⟩
1587              Use ⟨cmd⟩ as the assembler
1588
1589       -pgmc ⟨cmd⟩
1590              Use ⟨cmd⟩ as the C compiler
1591
1592       -pgmdll ⟨cmd⟩
1593              Use ⟨cmd⟩ as the DLL generator
1594
1595       -pgmF ⟨cmd⟩
1596              Use ⟨cmd⟩ as the pre-processor (with -F only)
1597
1598       -pgmi ⟨cmd⟩
1599              Use ⟨cmd⟩ as the external interpreter command.
1600
1601       -pgmL ⟨cmd⟩
1602              Use ⟨cmd⟩ as the literate pre-processor
1603
1604       -pgml ⟨cmd⟩
1605              Use ⟨cmd⟩ as the linker
1606
1607       -pgmlc ⟨cmd⟩
1608              Use ⟨cmd⟩ as the LLVM compiler
1609
1610       -pgmlibtool ⟨cmd⟩
1611              Use ⟨cmd⟩ as the command for libtool (with -staticlib only).
1612
1613       -pgmlo ⟨cmd⟩
1614              Use ⟨cmd⟩ as the LLVM optimiser
1615
1616       -pgmP ⟨cmd⟩
1617              Use ⟨cmd⟩ as the C pre-processor (with -cpp only)
1618
1619       -pgms ⟨cmd⟩
1620              Use ⟨cmd⟩ as the splitter
1621
1622       -pgmwindres ⟨cmd⟩
1623              Use ⟨cmd⟩ as the program for embedding manifests on Windows.
1624
1625   Phase-specific options
1626       -opta ⟨option⟩
1627              pass ⟨option⟩ to the assembler
1628
1629       -optc ⟨option⟩
1630              pass ⟨option⟩ to the C compiler
1631
1632       -optdll ⟨option⟩
1633              pass ⟨option⟩ to the DLL generator
1634
1635       -optF ⟨option⟩
1636              pass ⟨option⟩ to the custom pre-processor
1637
1638       -opti ⟨option⟩
1639              pass ⟨option⟩ to the interpreter sub-process.
1640
1641       -optL ⟨option⟩
1642              pass ⟨option⟩ to the literate pre-processor
1643
1644       -optl ⟨option⟩
1645              pass ⟨option⟩ to the linker
1646
1647       -optlc ⟨option⟩
1648              pass ⟨option⟩ to the LLVM compiler
1649
1650       -optlo ⟨option⟩
1651              pass ⟨option⟩ to the LLVM optimiser
1652
1653       -optP ⟨option⟩
1654              pass ⟨option⟩ to cpp (with -cpp only)
1655
1656       -optwindres ⟨option⟩
1657              pass ⟨option⟩ to windres.
1658
1659   Platform-specific options
1660       -msse2 (x86 only) Use SSE2 for floating-point operations
1661
1662       -msse4.2
1663              (x86 only) Use SSE4.2 for floating-point operations
1664
1665   Compiler plugins
1666       -fclear-plugins
1667              Clear the list of active plugins
1668
1669       -fplugin-opt=⟨module⟩:⟨args⟩
1670              Give arguments to a plugin module; module must be specified with
1671              -fplugin=⟨module⟩
1672
1673       -fplugin=⟨module⟩
1674              Load a plugin exported by a given module
1675
1676       -hide-all-plugin-packages
1677              Hide all packages for plugins by default
1678
1679       -plugin-package ⟨pkg⟩
1680              Expose ⟨pkg⟩ for plugins
1681
1682       -plugin-package-id ⟨pkg-id⟩
1683              Expose ⟨pkg-id⟩ for plugins
1684
1685   Profiling
1686       -fno-prof-auto
1687              Disables   any   previous   -fprof-auto,   -fprof-auto-top,   or
1688              -fprof-auto-exported options.
1689
1690       -fno-prof-cafs
1691              Disables any previous -fprof-cafs option.
1692
1693       -fno-prof-count-entries
1694              Do not collect entry counts
1695
1696       -fprof-auto
1697              Auto-add SCC\ s to all bindings not marked INLINE
1698
1699       -fprof-auto-calls
1700              Auto-add SCC\ s to all call sites
1701
1702       -fprof-auto-exported
1703              Auto-add SCC\ s to all exported bindings not marked INLINE
1704
1705       -fprof-auto-top
1706              Auto-add SCC\ s to all top-level bindings not marked INLINE
1707
1708       -fprof-cafs
1709              Auto-add SCC\ s to all CAFs
1710
1711       -prof  Turn on profiling
1712
1713       -ticky Turn on ticky-ticky profiling
1714
1715   Program coverage
1716       -fhpc  Turn on Haskell program coverage instrumentation
1717
1718   Recompilation checking
1719       -fforce-recomp
1720              Turn off recompilation checking. This is implied by any -ddump-X
1721              option when compiling a single file (i.e. when using -c).
1722
1723       -fignore-hpc-changes
1724              Do not recompile modules just to match  changes  to  HPC  flags.
1725              This  is especially useful for avoiding recompilation when using
1726              GHCi, and is enabled by default for GHCi.
1727
1728       -fignore-optim-changes
1729              Do not recompile modules just to match changes  to  optimisation
1730              flags. This is especially useful for avoiding recompilation when
1731              using GHCi, and is enabled by default for GHCi.
1732
1733   Redirecting output
1734       --exclude-module=⟨file⟩
1735              Regard ⟨file⟩ as "stable"; i.e., exclude it from  having  depen‐
1736              dencies on it.
1737
1738       -ddump-mod-cycles
1739              Dump module cycles
1740
1741       -dep-makefile ⟨file⟩
1742              Use ⟨file⟩ as the makefile
1743
1744       -dep-suffix ⟨suffix⟩
1745              Make   dependencies   that   declare   that  files  with  suffix
1746              .⟨suf⟩⟨osuf⟩ depend on interface files with suffix .⟨suf⟩hi
1747
1748       -dumpdir ⟨dir⟩
1749              redirect dump files
1750
1751       -hcsuf ⟨suffix⟩
1752              set the suffix to use for intermediate C files
1753
1754       -hidir ⟨dir⟩
1755              set directory for interface files
1756
1757       -hiedir ⟨dir⟩
1758              set directory for extended interface files
1759
1760       -hiesuf ⟨suffix⟩
1761              set the suffix to use for extended interface files
1762
1763       -hisuf ⟨suffix⟩
1764              set the suffix to use for interface files
1765
1766       -include-pkg-deps
1767              Regard modules imported from packages as unstable
1768
1769       -o ⟨file⟩
1770              set output filename
1771
1772       -odir ⟨dir⟩
1773              set directory for object files
1774
1775       -ohi ⟨file⟩
1776              set the filename in which to put the interface
1777
1778       -osuf ⟨suffix⟩
1779              set the output file suffix
1780
1781       -outputdir ⟨dir⟩
1782              set output directory
1783
1784       -stubdir ⟨dir⟩
1785              redirect FFI stub files
1786
1787   Temporary files
1788       -tmpdir ⟨dir⟩
1789              set the directory for temporary files
1790
1791   Verbosity options
1792       -fabstract-refinement-hole-fits
1793              default: off. Toggles whether refinements where one or  more  of
1794              the holes are abstract are reported.
1795
1796       -fdiagnostics-color=⟨always|auto|never⟩
1797              Use colors in error messages
1798
1799       -fdiagnostics-show-caret
1800              Whether to show snippets of original source code
1801
1802       -ferror-spans
1803              Output full span in error messages
1804
1805       -fhide-source-paths
1806              hide module source and object paths
1807
1808       -fmax-refinement-hole-fits=⟨n⟩
1809              default:  6.  Set the maximum number of refinement hole fits for
1810              typed holes to display in type error messages.
1811
1812       -fmax-relevant-binds=⟨n⟩
1813              default: 6. Set the maximum number of  bindings  to  display  in
1814              type error messages.
1815
1816       -fmax-valid-hole-fits=⟨n⟩
1817              default:  6. Set the maximum number of valid hole fits for typed
1818              holes to display in type error messages.
1819
1820       -fno-show-valid-hole-fits
1821              Disables showing a list of valid hole fits for  typed  holes  in
1822              type error messages.
1823
1824       -fno-sort-valid-hole-fits
1825              Disables  the  sorting  of the list of valid hole fits for typed
1826              holes in type error messages.
1827
1828       -fprint-equality-relations
1829              Distinguish between equality relations when printing
1830
1831       -fprint-expanded-synonyms
1832              In type errors, also print type-synonym-expanded types.
1833
1834       -fprint-explicit-coercions
1835              Print coercions in types
1836
1837       -fprint-explicit-foralls
1838              Print explicit forall quantification in types.  See  also  -XEx‐
1839              plicitForAll
1840
1841       -fprint-explicit-kinds
1842              Print  explicit  kind  foralls and kind arguments in types.  See
1843              also -XKindSignatures
1844
1845       -fprint-explicit-runtime-reps
1846              Print RuntimeRep variables in types which are  runtime-represen‐
1847              tation polymorphic.
1848
1849       -fprint-explicit-runtime-reps
1850              Print  RuntimeRep variables in types which are runtime-represen‐
1851              tation polymorphic.
1852
1853       -fprint-potential-instances
1854              display all available instances in type error messages
1855
1856       -fprint-typechecker-elaboration
1857              Print extra information from typechecker.
1858
1859       -fprint-unicode-syntax
1860              Use unicode syntax when printing expressions, types  and  kinds.
1861              See also -XUnicodeSyntax
1862
1863       -frefinement-level-hole-fits=⟨n⟩
1864              default:  off.  Sets  the  level of refinement of the refinement
1865              hole fits, where level n means that hole fits of up to  n  holes
1866              will be considered.
1867
1868       -freverse-errors
1869              Output errors in reverse order
1870
1871       -fshow-docs-of-hole-fits
1872              Toggles whether to show the documentation of the valid hole fits
1873              in the output.
1874
1875       -fshow-hole-constraints
1876              Show constraints when reporting typed holes.
1877
1878       -fshow-hole-matches-of-hole-fits
1879              Toggles whether to show the type of the additional holes in  re‐
1880              finement hole fits.
1881
1882       -fshow-provenance-of-hole-fits
1883              Toggles whether to show the provenance of the valid hole fits in
1884              the output.
1885
1886       -fshow-type-app-of-hole-fits
1887              Toggles whether to show the type application of the  valid  hole
1888              fits in the output.
1889
1890       -fshow-type-app-vars-of-hole-fits
1891              Toggles whether to show what type each quantified variable takes
1892              in a valid hole fit.
1893
1894       -fshow-type-of-hole-fits
1895              Toggles whether to show the type of the valid hole fits  in  the
1896              output.
1897
1898       -funclutter-valid-hole-fits
1899              Unclutter  the list of valid hole fits by not showing provenance
1900              nor type applications of suggestions.
1901
1902       -Rghc-timing
1903              Summarise timing stats for GHC (same as +RTS -tstderr).
1904
1905       -v     verbose mode (equivalent to -v3)
1906
1907       -v⟨n⟩  set verbosity level
1908
1909   Warnings
1910       -fdefer-out-of-scope-variables
1911              Convert variable out of scope variables  errors  into  warnings.
1912              Implied     by     -fdefer-type-errors.     See    also    -Wde‐
1913              ferred-out-of-scope-variables.
1914
1915       -fdefer-type-errors
1916              Turn type errors into warnings, deferring the error  until  run‐
1917              time. Implies -fdefer-typed-holes and -fdefer-out-of-scope-vari‐
1918              ables.  See also -Wdeferred-type-errors
1919
1920       -fdefer-typed-holes
1921              Convert typed hole errors into warnings, deferring the error un‐
1922              til   runtime.    Implied   by  -fdefer-type-errors.   See  also
1923              -Wtyped-holes.
1924
1925       -fhelpful-errors
1926              Make suggestions for mis-spelled names.
1927
1928       -fmax-pmcheck-iterations=⟨n⟩
1929              the iteration limit for the pattern match checker
1930
1931       -fshow-warning-groups
1932              show which group an emitted warning belongs to.
1933
1934       -W     enable normal warnings
1935
1936       -w     disable all warnings
1937
1938       -Wall  enable almost all warnings (details in options-sanity)
1939
1940       -Wall-missed-specialisations
1941              warn when specialisation of any overloaded function fails.
1942
1943       -Wcompat
1944              enable future compatibility warnings (details in options-sanity)
1945
1946       -Wcpp-undef
1947              warn on uses of the #if directive on undefined identifiers
1948
1949       -Wdeferred-out-of-scope-variables
1950              Report warnings when variable out-of-scope errors  are  deferred
1951              until runtime.  See -fdefer-out-of-scope-variables.
1952
1953       -Wdeferred-type-errors
1954              Report  warnings when deferred type errors are enabled. This op‐
1955              tion is enabled by default. See -fdefer-type-errors.
1956
1957       -Wdeprecated-flags
1958              warn about uses of commandline flags that are deprecated
1959
1960       -Wdeprecations
1961              warn about uses of functions & types that have warnings or  dep‐
1962              recated pragmas. Alias for -Wwarnings-deprecations
1963
1964       -Wdodgy-exports
1965              warn about dodgy exports
1966
1967       -Wdodgy-foreign-imports
1968              warn about dodgy foreign imports
1969
1970       -Wdodgy-imports
1971              warn about dodgy imports
1972
1973       -Wduplicate-constraints
1974              warn when a constraint appears duplicated in a type signature
1975
1976       -Wduplicate-exports
1977              warn when an entity is exported multiple times
1978
1979       -Wempty-enumerations
1980              warn about enumerations that are empty
1981
1982       -Werror
1983              make warnings fatal
1984
1985       -Weverything
1986              enable all warnings supported by GHC
1987
1988       -Whi-shadowing
1989              warn when a .hi file in the current directory shadows a library
1990
1991       -Widentities
1992              warn about uses of Prelude numeric conversions that are probably
1993              the identity (and hence could be omitted)
1994
1995       -Wimplicit-kind-vars
1996              warn when kind variables are brought into scope  implicitly  de‐
1997              spite the "forall-or-nothing" rule
1998
1999       -Wimplicit-prelude
2000              warn when the Prelude is implicitly imported
2001
2002       -Winaccessible-code
2003              warn about inaccessible code
2004
2005       -Wincomplete-patterns
2006              warn when a pattern match could fail
2007
2008       -Wincomplete-record-updates
2009              warn when a record update could fail
2010
2011       -Wincomplete-uni-patterns
2012              warn  when  a  pattern  match  in a lambda expression or pattern
2013              binding could fail
2014
2015       -Winline-rule-shadowing
2016              Warn if a rewrite RULE might fail to fire because  the  function
2017              might  be  inlined  before  the  rule has a chance to fire.  See
2018              rules-inline.
2019
2020       -Wmissed-extra-shared-lib
2021              Warn when GHCi can't load a shared lib.
2022
2023       -Wmissed-specialisations
2024              warn when specialisation of  an  imported,  overloaded  function
2025              fails.
2026
2027       -Wmissing-deriving-strategies
2028              warn when a deriving clause is missing a deriving strategy
2029
2030       -Wmissing-export-lists
2031              warn  when a module declaration does not explicitly list all ex‐
2032              ports
2033
2034       -Wmissing-exported-signatures
2035              warn about top-level functions without signatures, only if  they
2036              are exported. takes precedence over -Wmissing-signatures
2037
2038       -Wmissing-exported-sigs
2039              (deprecated)  warn about top-level functions without signatures,
2040              only if they are exported. takes precedence over  -Wmissing-sig‐
2041              natures
2042
2043       -Wmissing-fields
2044              warn when fields of a record are uninitialised
2045
2046       -Wmissing-home-modules
2047              warn when encountering a home module imported, but not listed on
2048              the command line. Useful for cabal to ensure GHC won't  pick  up
2049              modules,   not   listed   neither  in  exposed-modules,  nor  in
2050              other-modules.
2051
2052       -Wmissing-import-lists
2053              warn when an import declaration does not explicitly list all the
2054              names brought into scope
2055
2056       -Wmissing-local-signatures
2057              warn about polymorphic local bindings without signatures
2058
2059       -Wmissing-local-sigs
2060              (deprecated)  warn about polymorphic local bindings without sig‐
2061              natures
2062
2063       -Wmissing-methods
2064              warn when class methods are undefined
2065
2066       -Wmissing-monadfail-instances
2067              Warn when a failable pattern is used in a do-block that does not
2068              have a MonadFail instance.
2069
2070       -Wmissing-pattern-synonym-signatures
2071              warn when pattern synonyms do not have type signatures
2072
2073       -Wmissing-signatures
2074              warn about top-level functions without signatures
2075
2076       -Wmonomorphism-restriction
2077              warn when the Monomorphism Restriction is applied
2078
2079       -Wname-shadowing
2080              warn when names are shadowed
2081
2082       -Wno-compat
2083              Disables all warnings enabled by -Wcompat.
2084
2085       -Wnoncanonical-monad-instances
2086              warn when Applicative or Monad instances have noncanonical defi‐
2087              nitions of return, pure, (>>), or (*>).  See flag description in
2088              options-sanity for more details.
2089
2090       -Wnoncanonical-monadfail-instances
2091              warn when Monad or MonadFail instances have noncanonical defini‐
2092              tions of fail.  See flag description in options-sanity for  more
2093              details.
2094
2095       -Wnoncanonical-monoid-instances
2096              warn  when Semigroup or Monoid instances have noncanonical defi‐
2097              nitions of  (<>)  or  mappend.   See  flag  description  in  op‐
2098              tions-sanity for more details.
2099
2100       -Worphans
2101              warn  when  the  module contains orphan instance declarations or
2102              rewrite rules
2103
2104       -Woverflowed-literals
2105              warn about literals that will overflow their type
2106
2107       -Woverlapping-patterns
2108              warn about overlapping patterns
2109
2110       -Wpartial-fields
2111              warn when defining a partial record field.
2112
2113       -Wpartial-type-signatures
2114              warn about holes in partial type signatures when -XPartialTypeS‐
2115              ignatures  is  enabled.  Not applicable when -XPartialTypesigna‐
2116              tures is not enabled, in which case  errors  are  generated  for
2117              such holes. See partial-type-signatures.
2118
2119       -Wredundant-constraints
2120              Have  the compiler warn about redundant constraints in type sig‐
2121              natures.
2122
2123       -Wsafe warn if the module being compiled is regarded to be safe.
2124
2125       -Wsemigroup
2126              warn when a Monoid is not Semigroup, and on non- Semigroup defi‐
2127              nitions of (<>)?
2128
2129       -Wsimplifiable-class-constraints
2130              Warn  about  class  constraints  in a type signature that can be
2131              simplified using a top-level instance declaration.
2132
2133       -Wspace-after-bang
2134              warn for missing space before the second argument  of  an  infix
2135              definition of (!) when -XBangPatterns are not enabled
2136
2137       -Wstar-binder
2138              warn about binding the (*) type operator despite -XStarIsType
2139
2140       -Wstar-is-type
2141              warn when * is used to mean Data.Kind.Type
2142
2143       -Wtabs warn if there are tabs in the source file
2144
2145       -Wtrustworthy-safe
2146              warn  if  the module being compiled is marked as Trustworthy but
2147              it could instead be marked as Safe, a more informative bound.
2148
2149       -Wtype-defaults
2150              warn when defaulting happens
2151
2152       -Wtyped-holes
2153              Report warnings when typed hole errors are deferred  until  run‐
2154              time. See -fdefer-typed-holes.
2155
2156       -Wunbanged-strict-patterns
2157              warn  on  pattern bind of unlifted variable that is neither bare
2158              nor banged
2159
2160       -Wunrecognised-pragmas
2161              warn about uses of pragmas that GHC doesn't recognise
2162
2163       -Wunrecognised-warning-flags
2164              throw a warning when an unreconised -W... flag is encountered on
2165              the command line.
2166
2167       -Wunsafe
2168              warn if the module being compiled is regarded to be unsafe.  See
2169              safe-haskell
2170
2171       -Wunsupported-calling-conventions
2172              warn about use of an unsupported calling convention
2173
2174       -Wunsupported-llvm-version
2175              Warn when using -fllvm with an unsupported version of LLVM.
2176
2177       -Wunticked-promoted-constructors
2178              warn if promoted constructors are not ticked
2179
2180       -Wunused-binds
2181              warn   about   bindings   that    are    unused.    Alias    for
2182              -Wunused-top-binds,   -Wunused-local-binds   and   -Wunused-pat‐
2183              tern-binds
2184
2185       -Wunused-do-bind
2186              warn about do bindings that appear to throw away values of types
2187              other than ()
2188
2189       -Wunused-foralls
2190              warn  about type variables in user-written forall\s that are un‐
2191              used
2192
2193       -Wunused-imports
2194              warn about unnecessary imports
2195
2196       -Wunused-local-binds
2197              warn about local bindings that are unused
2198
2199       -Wunused-matches
2200              warn about variables in patterns that aren't used
2201
2202       -Wunused-pattern-binds
2203              warn about pattern match bindings that are unused
2204
2205       -Wunused-top-binds
2206              warn about top-level bindings that are unused
2207
2208       -Wunused-type-patterns
2209              warn about unused type variables which arise from patterns in in
2210              type family and data family instances
2211
2212       -Wwarn make warnings non-fatal
2213
2214       -Wwarnings-deprecations
2215              warn  about uses of functions & types that have warnings or dep‐
2216              recated pragmas
2217
2218       -Wwrong-do-bind
2219              warn about do bindings that appear to throw away monadic  values
2220              that you should have bound instead
2221
2223       Copyright 2015. The University Court of the University of Glasgow.  All
2224       rights reserved.
2225

AUTHOR

2227       The GHC Team
2228
2230       2021, GHC Team
2231
2232
2233
2234
22358.8.4                            Jan 26, 2021                           GHC(1)
Impressum