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