GHC¶
Synopsis¶
ghc [option|filename]
ghci [option|filename]
Description¶
This manual page documents briefly the ghc and ghci commands. Note that
ghci is not yet available on all architectures. Extensive documentation is
available in various other formats including PDF and HTML; see below.
Each of GHC’s command line options is classified as either static or
dynamic. A static flag may only be specified on the command line, whereas a
dynamic flag may also be given in an OPTIONS pragma in a source file or
set from the GHCi command-line with :set .
As a rule of thumb, all the language options are dynamic, as are the warning options and the debugging options.
The rest are static, with the notable exceptions of
-v, -cpp, -fasm, -fvia-C, -fllvm, and
-#include.
The OPTIONS sections lists the status of each flag.
Common suffixes of file names for Haskell are:
.hsHaskell source code; preprocess, compile
.lhsliterate Haskell source; unlit, preprocess, compile
.hiInterface file; contains information about exported symbols
.hcintermediate C files
.⟨way⟩_oobject files for “way” ⟨way⟩; common ways are:
dyndynamically-linked
pbuilt with profiling
.⟨way⟩_hiinterface files for “way” ⟨way⟩; common ways are:
Options¶
- Code generation
-fasm-fllvm-fno-code-fwrite-interface-fbyte-code-fobject-code-g⟨n⟩-dynamic-dynamic-too- Debugging the compiler
-dcore-lint-ddump-to-file-ddump-asm-ddump-bcos-ddump-cmm-from-stg-ddump-cmm-verbose-ddump-cmm-ddump-core-stats-ddump-cse-ddump-deriv-ddump-ds-ddump-foreign-ddump-hpc-ddump-inlinings-ddump-llvm-ddump-occur-anal-ddump-opt-cmm-ddump-parsed-ddump-prep-ddump-rn-ddump-rule-firings-ddump-rule-rewrites-ddump-rules-ddump-vect-ddump-simpl-ddump-simpl-iterations-ddump-spec-ddump-splices-ddump-stg-ddump-stranal-ddump-str-signatures-ddump-tc-dth-dec-file=⟨file⟩-ddump-types-ddump-worker-wrapper-ddump-if-trace-ddump-tc-trace-ddump-vt-trace-ddump-rn-trace-ddump-rn-stats-ddump-simpl-stats-dno-debug-output-dppr-debug-dppr-user-length-dppr-cols=⟨n⟩-dppr-case-as-let-dsuppress-all-dsuppress-uniques-dsuppress-idinfo-dsuppress-unfoldings-dsuppress-module-prefixes-dsuppress-type-signatures-dsuppress-type-applications-dsuppress-coercions-dsource-stats-dcmm-lint-dstg-lint-dstg-stats-dverbose-core2core-dverbose-stg2stg-dshow-passes-dfaststring-stats-frule-check- C pre-processor
-cpp-D⟨symbol⟩[=⟨value⟩]-U⟨symbol⟩-I⟨dir⟩- Finding imports
-i⟨dir⟩[:⟨dir⟩]*-i- Interactive mode
-ignore-dot-ghci-ghci-script-fbreak-on-error-fbreak-on-exception-fghci-hist-size=⟨n⟩-fprint-evld-with-show-fprint-bind-result-fno-print-bind-contents-fno-implicit-import-qualified-interactive-print ⟨expr⟩- Interface files
-ddump-hi-ddump-hi-diffs-ddump-minimal-imports--show-iface ⟨file⟩- Keeping intermediate files
-keep-hc-file, -keep-hc-files-keep-hi-files-keep-llvm-file, -keep-llvm-files-keep-o-files-keep-s-file, -keep-s-files-keep-tmp-files- Language options
-fconstraint-solver-iterations=⟨n⟩-freduction-depth=⟨n⟩-fcontext-stack=⟨n⟩-fglasgow-exts-firrefutable-tuples-fpackage-trust-ftype-function-depth=⟨n⟩-XAllowAmbiguousTypes-XArrows-XApplicativeDo-XAutoDeriveTypeable-XBangPatterns-XBinaryLiterals-XCApiFFI-XConstrainedClassMethods-XConstraintKinds-XCPP-XDataKinds-XDefaultSignatures-XDeriveAnyClass-XDeriveDataTypeable-XDeriveFunctor-XDeriveFoldable-XDeriveGeneric-XDeriveGeneric-XDeriveLift-XDeriveTraversable-XDerivingStrategies-XDisambiguateRecordFields-XEmptyCase-XEmptyDataDecls-XExistentialQuantification-XExplicitForAll-XExplicitNamespaces-XExtendedDefaultRules-XFlexibleContexts-XFlexibleInstances-XForeignFunctionInterface-XFunctionalDependencies-XGADTs-XGADTSyntax-XGeneralizedNewtypeDeriving-XGenerics-XImplicitParams-XNoImplicitPrelude-XImpredicativeTypes-XIncoherentInstances-XTypeFamilyDependencies-XInstanceSigs-XInterruptibleFFI-XKindSignatures-XLambdaCase-XLiberalTypeSynonyms-XMagicHash-XMonadComprehensions-XMonoLocalBinds-XNoMonomorphismRestriction-XMultiParamTypeClasses-XMultiWayIf-XNamedFieldPuns-XNamedWildCards-XNegativeLiterals-XNPlusKPatterns-XNullaryTypeClasses-XNumDecimals-XOverlappingInstances-XOverloadedLabels-XOverloadedLists-XOverloadedStrings-XPackageImports-XParallelArrays-XParallelListComp-XPartialTypeSignatures-XNoPatternGuards-XPatternSynonyms-XPolyKinds-XPolymorphicComponents-XPostfixOperators-XQuasiQuotes-XRank2Types-XRankNTypes-XRebindableSyntax-XRecordWildCards-XRecursiveDo-XRoleAnnotations-XSafe-XScopedTypeVariables-XStandaloneDeriving-XStaticPointers-XStrictData-XTemplateHaskell-XTemplateHaskellQuotes-XNoTraditionalRecordSyntax-XTransformListComp-XTrustworthy-XTupleSections-XTypeFamilies-XTypeInType-XTypeOperators-XTypeSynonymInstances-XUnboxedTuples-XUnboxedSums-XUndecidableInstances-XUnicodeSyntax-XUnliftedFFITypes-XUnsafe-XViewPatterns- Linking options
-shared-staticlib-fPIC-fPIE-pie-dynload-framework ⟨name⟩-framework-path ⟨dir⟩-l ⟨lib⟩-L ⟨dir⟩-main-is ⟨thing⟩--mk-dll-no-hs-main-rtsopts[=⟨none|some|all⟩]-with-rtsopts=⟨opts⟩-no-rtsopts-suggestions-no-link-split-objs-split-sections-static-threaded-debug-ticky-eventlog-fno-gen-manifest-fno-embed-manifest-fno-shared-implib-dylib-install-name ⟨path⟩-rdynamic- Miscellaneous options
-j[⟨n⟩]-fno-hi-version-check-fhistory-size-fno-ghci-history-fno-ghci-sandbox-flocal-ghci-history- Modes of operation
--help,-?--interactive--make-e ⟨expr⟩--show-iface ⟨file⟩-M--frontend ⟨module⟩--supported-extensions, --supported-languages--show-options--info--version, -V--numeric-version--print-libdir- Individual optimizations
-fcall-arity-fcase-merge-fcase-folding-fcmm-elim-common-blocks-fcmm-sink-fcpr-anal-fcse-fdicts-cheap-fdicts-strict-fdmd-tx-dict-sel-fdo-eta-reduction-fdo-lambda-eta-expansion-feager-blackholing-fenable-rewrite-rules-fexcess-precision-fexpose-all-unfoldings-ffloat-in-ffull-laziness-ffun-to-thunk-fignore-asserts-fignore-interface-pragmas-flate-dmd-anal-fliberate-case-fliberate-case-threshold=⟨n⟩-floopification-fmax-inline-alloc-size=⟨n⟩-fmax-inline-memcpy-insns=⟨n⟩-fmax-inline-memset-insns=⟨n⟩-fmax-relevant-binds=⟨n⟩-fmax-uncovered-patterns=⟨n⟩-fmax-simplifier-iterations=⟨n⟩-fmax-worker-args=⟨n⟩-fno-opt-coercion-fno-pre-inlining-fno-state-hack-fomit-interface-pragmas-fomit-yields-foptimal-applicative-do-fpedantic-bottoms-fregs-graph-fregs-iterative-fsimplifier-phases=⟨n⟩-fsimpl-tick-factor=⟨n⟩-fspec-constr-fspec-constr-count=⟨n⟩-fspec-constr-threshold=⟨n⟩-fspecialise-fcross-module-specialise-fstatic-argument-transformation-fstrictness-fstrictness-before=⟨n⟩-funbox-small-strict-fields-funbox-strict-fields-funfolding-creation-threshold=⟨n⟩-funfolding-dict-discount=⟨n⟩-funfolding-fun-discount=⟨n⟩-funfolding-keeness-factor=⟨n⟩-funfolding-use-threshold=⟨n⟩-fvectorisation-avoidance-fvectorise-fworker-wrapper- Optimization levels
-O0-O, -O1-O2-Odph- Package options
-this-unit-id ⟨unit-id⟩-package ⟨pkg⟩-hide-all-packages-hide-package ⟨pkg⟩-ignore-package ⟨pkg⟩-package-db ⟨file⟩-clear-package-db-no-global-package-db-global-package-db-no-user-package-db-user-package-db-no-auto-link-packages-trust ⟨pkg⟩-distrust ⟨pkg⟩-distrust-all-package-env ⟨file⟩|⟨name⟩- Phases of compilation
-F-E-C-S-c-x ⟨suffix⟩- Overriding external programs
-pgmL ⟨cmd⟩-pgmP ⟨cmd⟩-pgmc ⟨cmd⟩-pgmlo ⟨cmd⟩-pgmlc ⟨cmd⟩-pgms ⟨cmd⟩-pgma ⟨cmd⟩-pgml ⟨cmd⟩-pgmdll ⟨cmd⟩-pgmF ⟨cmd⟩-pgmwindres ⟨cmd⟩-pgmlibtool ⟨cmd⟩- Phase-specific options
-optL ⟨option⟩-optP ⟨option⟩-optF ⟨option⟩-optc ⟨option⟩-optlo ⟨option⟩-optlc ⟨option⟩-opta ⟨option⟩-optl ⟨option⟩-optdll ⟨option⟩-optwindres ⟨option⟩- Platform-specific options
-msse2-msse4.2- Compiler plugins
-fplugin=⟨module⟩-fplugin-opt=⟨module⟩:⟨args⟩- Profiling
-prof-fprof-auto-fprof-auto-top-fprof-auto-exported-fprof-cafs-fno-prof-count-entries-ticky- Program coverage
-fhpc-hpcdir ⟨dir⟩- Recompilation checking
-fforce-recomp- Redirecting output
-hcsuf ⟨suffix⟩-hidir ⟨dir⟩-hisuf ⟨suffix⟩-o ⟨file⟩-odir ⟨dir⟩-ohi ⟨file⟩-osuf ⟨suffix⟩-stubdir ⟨dir⟩-dumpdir ⟨dir⟩-outputdir ⟨dir⟩-dyno ⟨file⟩-dynosuf ⟨suffix⟩-dynhisuf ⟨suffix⟩- Temporary files
-tmpdir ⟨dir⟩- Verbosity options
-v-v ⟨n⟩-fhide-source-paths-fprint-potential-instances-fprint-explicit-foralls-fprint-explicit-kinds-fprint-explicit-runtime-reps-fprint-unicode-syntax-fprint-expanded-synonyms-fprint-typechecker-elaboration-fdiagnostics-color=(always|auto|never)-f[no-]diagnostics-show-caret-ferror-spans-Rghc-timing-fshow-hole-constraints-fshow-loaded-modules- Warnings
-W-w-Wall-Wcompat-Werror-Werror=⟨wflag⟩-Wwarn-Wwarn=⟨wflag⟩-Wunrecognised-warning-flags-fshow-warning-groups-fdefer-type-errors-fdefer-typed-holes-fdefer-out-of-scope-variables-fhelpful-errors-freverse-errors-fmax-errors-Wdeprecated-flags-Wduplicate-constraints-Wduplicate-exports-Whi-shadowing-Widentities-Wimplicit-prelude-Wincomplete-patterns-Wincomplete-uni-patterns-fmax-pmcheck-iterations=⟨n⟩-Wincomplete-record-updates-Wmissing-fields-Wmissing-import-lists-Wmissing-methods-Wmissing-signatures-Wmissing-exported-sigs-Wmissing-exported-signatures-Wmissing-local-sigs-Wmissing-local-signatures-Wmissing-monadfail-instances-Wsemigroup-Wmissed-specialisations-Wall-missed-specialisations-Wmonomorphism-restriction-Wname-shadowing-Wnoncanonical-monad-instances-Wnoncanonical-monadfail-instances-Wnoncanonical-monoid-instances-Worphans-Woverlapping-patterns-Wtabs-Wtype-defaults-Wunrecognised-pragmas-Wunticked-promoted-constructors-Wunused-binds-Wunused-top-binds-Wunused-local-binds-Wunused-pattern-binds-Wunused-imports-Wunused-matches-Wunused-foralls-Wunused-type-variables-Wunused-do-bind-Wwrong-do-bind-Wunsafe-Wsafe-Wtrustworthy-safe-Wwarnings-deprecations-Wdeprecations-Wamp-Wredundant-constraints-Wdeferred-type-errors-Wtyped-holes-Wdeferred-out-of-scope-variables-Wpartial-type-signatures-Wderiving-typeable-Wmissing-home-modules
Code generation¶
-fasmUse the native code generator
-fllvmCompile using the LLVM code generator
-fno-codeOmit code generation
-fwrite-interfaceAlways write interface files
-fbyte-codeGenerate byte-code
-fobject-codeGenerate object code
-g⟨n⟩Produce DWARF debug information in compiled object files.⟨n⟩ can be 0, 1, or 2, with higher numbers producing richer output. If ⟨n⟩ is omitted level 2 is assumed.
-dynamicBuild dynamically-linked object files and executables
-dynamic-tooBuild dynamic object files as well as static object files during compilation
Debugging the compiler¶
-dcore-lintTurn on internal sanity checking
-ddump-to-fileDump to files instead of stdout
-ddump-asmDump assembly
-ddump-bcosDump interpreter byte code
-ddump-cmm-from-stgDump STG-to-C– output
-ddump-cmm-verboseShow output from each C– pipeline pass
-ddump-cmmDump the final C– output
-ddump-core-statsPrint a one-line summary of the size of the Core program at the end of the optimisation pipeline
-ddump-cseDump CSE output
-ddump-derivDump deriving output
-ddump-dsDump desugarer output
-ddump-foreignDump
foreign exportstubs-ddump-hpcDump after instrumentation for program coverage
-ddump-inliningsDump inlining info
-ddump-llvmDump LLVM intermediate code. Implies
-fllvm.-ddump-occur-analDump occurrence analysis output
-ddump-opt-cmmDump the results of C– to C– optimising passes
-ddump-parsedDump parse tree
-ddump-prepDump prepared core
-ddump-rnDump renamer output
-ddump-rule-firingsDump rule firing info
-ddump-rule-rewritesDump detailed rule firing info
-ddump-rulesDump rules
-ddump-vectDump vectoriser input and output
-ddump-simplDump final simplifier output
-ddump-simpl-iterationsDump output from each simplifier iteration
-ddump-specDump specialiser output
-ddump-splicesDump TH spliced expressions, and what they evaluate to
-ddump-stgDump final STG
-ddump-stranalDump strictness analyser output
-ddump-str-signaturesDump strictness signatures
-ddump-tcDump typechecker output
-dth-dec-file=⟨file⟩Show evaluated TH declarations in a .th.hs file
-ddump-typesDump type signatures
-ddump-worker-wrapperDump worker-wrapper output
-ddump-if-traceTrace interface files
-ddump-tc-traceTrace typechecker
-ddump-vt-traceTrace vectoriser
-ddump-rn-traceTrace renamer
-ddump-rn-statsRenamer stats
-ddump-simpl-statsDump simplifier stats
-dno-debug-outputSuppress unsolicited debugging output
-dppr-debugTurn on debug printing (more verbose)
-dppr-user-lengthSet the depth for printing expressions in error msgs
-dppr-cols=⟨n⟩Set the width of debugging output. For example
-dppr-cols200-dppr-case-as-letPrint single alternative case expressions as strict lets.
-dsuppress-allIn core dumps, suppress everything (except for uniques) that is suppressible.
-dsuppress-uniquesSuppress the printing of uniques in debug output (easier to use
diff)-dsuppress-idinfoSuppress extended information about identifiers where they are bound
-dsuppress-unfoldingsSuppress the printing of the stable unfolding of a variable at its binding site
-dsuppress-module-prefixesSuppress the printing of module qualification prefixes
-dsuppress-type-signaturesSuppress type signatures
-dsuppress-type-applicationsSuppress type applications
-dsuppress-coercionsSuppress the printing of coercions in Core dumps to make them shorter
-dsource-statsDump haskell source stats
-dcmm-lintC– pass sanity checking
-dstg-lintSTG pass sanity checking
-dstg-statsDump STG stats
-dverbose-core2coreShow output from each core-to-core pass
-dverbose-stg2stgShow output from each STG-to-STG pass
-dshow-passesPrint out each pass name as it happens
-dfaststring-statsShow statistics for fast string usage when finished
-frule-checkReport sites with rules that could have fired but didn’t. Takes a string argument.
C pre-processor¶
-cppRun the C pre-processor on Haskell source files
-D⟨symbol⟩[=⟨value⟩]Define a symbol in the C pre-processor
-U⟨symbol⟩Undefine a symbol in the C pre-processor
-I⟨dir⟩Add ⟨dir⟩ to the directory search list for
#includefiles
Finding imports¶
-i⟨dir⟩[:⟨dir⟩]*add ⟨dir⟩, ⟨dir2⟩, etc. to import path
-iEmpty the import directory list
Interactive mode¶
-ignore-dot-ghciDisable reading of
.ghcifiles-ghci-scriptRead additional
.ghcifiles-fbreak-on-error-fbreak-on-exception-fghci-hist-size=⟨n⟩Set the number of entries GHCi keeps for
:history. See The GHCi Debugger.-fprint-evld-with-showEnable usage of
Showinstances in:print. See Breakpoints and inspecting variables.-fprint-bind-result-fno-print-bind-contents-fno-implicit-import-qualified-interactive-print ⟨expr⟩Select the function to use for printing evaluated expressions in GHCi
Interface files¶
-ddump-hiDump the new interface to stdout
-ddump-hi-diffsShow the differences vs. the old interface
-ddump-minimal-importsDump a minimal set of imports
--show-iface ⟨file⟩See Modes of operation.
Keeping intermediate files¶
-keep-hc-file, -keep-hc-filesRetain intermediate
.hcfiles.-keep-hi-filesRetain intermediate
.hifiles (the default).-keep-llvm-file, -keep-llvm-filesRetain intermediate LLVM
.llfiles. Implies-fllvm.-keep-o-filesRetain intermediate
.ofiles (the default).-keep-s-file, -keep-s-filesRetain intermediate
.sfiles.-keep-tmp-filesRetain all intermediate temporary files.
Language options¶
-fconstraint-solver-iterations=⟨n⟩default: 4. Set the iteration limit for the type-constraint solver. Typically one iteration suffices; so please yell if you find you need to set it higher than the default. Zero means infinity.
-freduction-depth=⟨n⟩default: 200. Set the limit for type simplification. Zero means infinity.
-fcontext-stack=⟨n⟩Deprecated. Use
-freduction-depth=⟨n⟩instead.-fglasgow-extsDeprecated. Enable most language extensions; see Language options for exactly which ones.
-firrefutable-tuplesMake tuple pattern matching irrefutable
-fpackage-trustEnable Safe Haskell trusted package requirement for trustworthy modules.
-ftype-function-depth=⟨n⟩Deprecated. Use
-freduction-depth=⟨n⟩instead.-XAllowAmbiguousTypesAllow the user to write ambiguous types, and the type inference engine to infer them.
-XArrowsEnable arrow notation extension
-XApplicativeDo-XAutoDeriveTypeableAs of GHC 7.10, this option is not needed, and should not be used. Previously this would automatically derive Typeable instances for every datatype and type class declaration. Implies
-XDeriveDataTypeable.-XBangPatternsEnable bang patterns.
-XBinaryLiteralsEnable support for binary literals.
-XCApiFFIEnable the CAPI calling convention.
-XConstrainedClassMethodsEnable constrained class methods.
-XConstraintKindsEnable a kind of constraints.
-XCPPEnable the C preprocessor.
-XDataKindsEnable datatype promotion.
-XDefaultSignaturesEnable default signatures.
-XDeriveAnyClassEnable deriving for any class.
-XDeriveDataTypeableEnable
derivingfor the Data class. Implied by-XAutoDeriveTypeable.-XDeriveFunctorEnable deriving for the Functor class. Implied by
-XDeriveTraversable.-XDeriveFoldableEnable deriving for the Foldable class. Implied by
-XDeriveTraversable.-XDeriveGenericEnable deriving for the Generic class.
-XDeriveGenericEnable deriving for the Generic class.
-XDeriveLiftEnable deriving for the Lift class
-XDeriveTraversableEnable deriving for the Traversable class. Implies
-XDeriveFunctorand-XDeriveFoldable.-XDerivingStrategiesEnables deriving strategies.
-XDisambiguateRecordFieldsEnable record field disambiguation. Implied by
-XRecordWildCards.-XEmptyCaseAllow empty case alternatives.
-XEmptyDataDeclsEnable empty data declarations.
-XExistentialQuantificationEnable existential quantification.
-XExplicitForAllEnable explicit universal quantification. Implied by
-XScopedTypeVariables,-XLiberalTypeSynonyms,-XRankNTypesand-XExistentialQuantification.-XExplicitNamespacesEnable using the keyword
typeto specify the namespace of entries in imports and exports (Explicit namespaces in import/export). Implied by-XTypeOperatorsand-XTypeFamilies.-XExtendedDefaultRulesUse GHCi’s extended default rules in a normal module.
-XFlexibleContextsEnable flexible contexts. Implied by
-XImplicitParams.-XFlexibleInstancesEnable flexible instances. Implies
-XTypeSynonymInstances. Implied by-XImplicitParams.-XForeignFunctionInterfaceEnable foreign function interface.
-XFunctionalDependenciesEnable functional dependencies. Implies
-XMultiParamTypeClasses.-XGADTsEnable generalised algebraic data types. Implies
-XGADTSyntaxand-XMonoLocalBinds.-XGADTSyntax-XGeneralizedNewtypeDerivingEnable newtype deriving.
-XGenericsDeprecated, does nothing. No longer enables generic classes. See also GHC’s support for generic programming.
-XImplicitParamsEnable Implicit Parameters. Implies
-XFlexibleContextsand-XFlexibleInstances.-XNoImplicitPreludeDon’t implicitly
import Prelude. Implied by-XRebindableSyntax.-XImpredicativeTypesEnable impredicative types. Implies
-XRankNTypes.-XIncoherentInstancesEnable incoherent instances. Implies
-XOverlappingInstances.-XTypeFamilyDependenciesEnable injective type families. Implies
-XTypeFamilies.-XInstanceSigsEnable instance signatures.
-XInterruptibleFFIEnable interruptible FFI.
-XKindSignaturesEnable kind signatures. Implied by
-XTypeFamiliesand-XPolyKinds.-XLambdaCaseEnable lambda-case expressions.
-XLiberalTypeSynonymsEnable liberalised type synonyms.
-XMagicHashAllow
#as a postfix modifier on identifiers.-XMonadComprehensionsEnable monad comprehensions.
-XMonoLocalBindsEnable do not generalise local bindings. Implied by
-XTypeFamiliesand-XGADTs.-XNoMonomorphismRestrictionDisable the monomorphism restriction.
-XMultiParamTypeClassesEnable multi parameter type classes. Implied by
-XFunctionalDependencies.-XMultiWayIfEnable multi-way if-expressions.
-XNamedFieldPunsEnable record puns.
-XNamedWildCardsEnable named wildcards.
-XNegativeLiteralsEnable support for negative literals.
-XNPlusKPatternsEnable support for
n+kpatterns. Implied by-XHaskell98.-XNullaryTypeClassesDeprecated, does nothing. nullary (no parameter) type classes are now enabled using
-XMultiParamTypeClasses.-XNumDecimalsEnable support for ‘fractional’ integer literals.
-XOverlappingInstancesEnable overlapping instances.
-XOverloadedLabelsEnable overloaded labels.
-XOverloadedListsEnable overloaded lists.
-XOverloadedStringsEnable overloaded string literals.
-XPackageImportsEnable package-qualified imports.
-XParallelArraysEnable parallel arrays. Implies
-XParallelListComp.-XParallelListCompEnable parallel list comprehensions. Implied by
-XParallelArrays.-XPartialTypeSignaturesEnable partial type signatures.
-XNoPatternGuardsDisable pattern guards. Implied by
-XHaskell98.-XPatternSynonymsEnable pattern synonyms.
-XPolyKindsEnable kind polymorphism. Implies
-XKindSignatures.-XPolymorphicComponentsEnable polymorphic components for data constructors. Synonym for
-XRankNTypes.-XPostfixOperatorsEnable postfix operators.
-XQuasiQuotesEnable quasiquotation.
-XRank2TypesEnable rank-2 types. Synonym for
-XRankNTypes.-XRankNTypesEnable rank-N types. Implied by
-XImpredicativeTypes.-XRebindableSyntaxEmploy rebindable syntax. Implies
-XNoImplicitPrelude.-XRecordWildCardsEnable record wildcards. Implies
-XDisambiguateRecordFields.-XRecursiveDoEnable recursive do (mdo) notation.
-XRoleAnnotationsEnable role annotations.
-XSafeEnable the Safe Haskell Safe mode.
-XScopedTypeVariablesEnable lexically-scoped type variables.
-XStandaloneDerivingEnable standalone deriving.
-XStaticPointersEnable static pointers.
-XStrictDataEnable default strict datatype fields.
-XTemplateHaskellEnable Template Haskell.
-XTemplateHaskellQuotesEnable quotation subset of Template Haskell.
-XNoTraditionalRecordSyntaxDisable support for traditional record syntax (as supported by Haskell 98)
C {f = x}-XTransformListCompEnable generalised list comprehensions.
-XTrustworthyEnable the Safe Haskell Trustworthy mode.
-XTupleSectionsEnable tuple sections.
-XTypeFamiliesEnable type families. Implies
-XExplicitNamespaces,-XKindSignatures, and-XMonoLocalBinds.-XTypeInTypeAllow kinds to be used as types, including explicit kind variable quantification, higher-rank kinds, kind synonyms, and kind families. Implies
-XDataKinds,-XKindSignatures, and-XPolyKinds.-XTypeOperatorsEnable type operators. Implies
-XExplicitNamespaces.-XTypeSynonymInstancesEnable type synonyms in instance heads. Implied by
-XFlexibleInstances.-XUnboxedTuplesEnable unboxed tuples.
-XUnboxedSumsEnable :ref: unboxed sums <unboxed-sums>.
-XUndecidableInstancesEnable undecidable instances.
-XUnicodeSyntaxEnable unicode syntax.
-XUnliftedFFITypesEnable unlifted FFI types.
-XUnsafeEnable Safe Haskell Unsafe mode.
-XViewPatternsEnable view patterns.
Linking options¶
-sharedGenerate a shared library (as opposed to an executable)
-staticlibOn Darwin/OS X/iOS only, generate a standalone static library (as opposed to an executable). This is the usual way to compile for iOS.
-fPICGenerate position-independent code (where available)
-fPIEGenerate code for a position-independent executable (where available)
-pieInstruct the linker to produce a position-independent executable.
-dynloadSelects one of a number of modes for finding shared libraries at runtime.
-framework ⟨name⟩On Darwin/OS X/iOS only, link in the framework ⟨name⟩. This option corresponds to the
-frameworkoption for Apple’s Linker.-framework-path ⟨dir⟩On Darwin/OS X/iOS only, add ⟨dir⟩ to the list of directories searched for frameworks. This option corresponds to the
-Foption for Apple’s Linker.-l ⟨lib⟩Link in library ⟨lib⟩
-L ⟨dir⟩Add ⟨dir⟩ to the list of directories searched for libraries
-main-is ⟨thing⟩Set main module and function
--mk-dllDLL-creation mode (Windows only)
-no-hs-mainDon’t assume this program contains
main-rtsopts[=⟨none|some|all⟩]Control whether the RTS behaviour can be tweaked via command-lineflags and the
GHCRTSenvironment variable. Usingnonemeans no RTS flags can be given;somemeans only a minimum of safe options can be given (the default), andall(or no argument at all) means that all RTS flags are permitted.-with-rtsopts=⟨opts⟩Set the default RTS options to ⟨opts⟩.
-no-rtsopts-suggestionsDon’t print RTS suggestions about linking with
-rtsopts[=⟨none|some|all⟩].-no-linkOmit linking
-split-objsSplit objects (for libraries)
-split-sectionsSplit sections for link-time dead-code stripping
-staticUse static Haskell libraries
-threadedUse the threaded runtime
-debugUse the debugging runtime
-tickyFor linking, this simply implies
-debug; see Using “ticky-ticky” profiling (for implementors).-eventlogEnable runtime event tracing
-fno-gen-manifestDo not generate a manifest file (Windows only)
-fno-embed-manifestDo not embed the manifest in the executable (Windows only)
-fno-shared-implibDon’t generate an import library for a DLL (Windows only)
-dylib-install-name ⟨path⟩Set the install name (via
-install_namepassed to Apple’s linker), specifying the full install path of the library file. Any libraries or executables that link with it later will pick up that path as their runtime search location for it. (Darwin/OS X only)-rdynamicThis instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. Currently Linux and Windows/MinGW32 only. This is equivalent to using
-optl -rdynamicon Linux, and-optl -export-all-symbolson Windows.
Miscellaneous options¶
-j[⟨n⟩]When compiling with
--make, compile ⟨n⟩ modules in parallel.-fno-hi-version-checkDon’t complain about
.hifile mismatches-fhistory-sizeSet simplification history size
-fno-ghci-historyDo not use the load/store the GHCi command history from/to
ghci_history.-fno-ghci-sandboxTurn off the GHCi sandbox. Means computations are run in the main thread, rather than a forked thread.
-flocal-ghci-historyUse current directory for the GHCi command history file
.ghci-history.
Modes of operation¶
--help,-?Display help
--interactiveInteractive mode - normally used by just running
ghci; see Using GHCi for details.--makeBuild a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using
make; see Using ghc --make for details.-e ⟨expr⟩Evaluate
expr; see Expression evaluation mode for details.--show-iface ⟨file⟩display the contents of an interface file.
-Mgenerate dependency information suitable for use in a
Makefile; see Dependency generation for details.--frontend ⟨module⟩run GHC with the given frontend plugin; see Frontend plugins for details.
--supported-extensions, --supported-languagesdisplay the supported language extensions
--show-optionsdisplay the supported command line options
--infodisplay information about the compiler
--version, -Vdisplay GHC version
--numeric-versiondisplay GHC version (numeric only)
--print-libdirdisplay GHC library directory
Individual optimizations¶
-fcall-arityEnable call-arity optimisation. Implied by
-O.-fcase-mergeEnable case-merging. Implied by
-O.-fcase-foldingEnable constant folding in case expressions. Implied by
-O.-fcmm-elim-common-blocksEnable Cmm common block elimination. Implied by
-O.-fcmm-sinkEnable Cmm sinking. Implied by
-O.-fcpr-analTurn on CPR analysis in the demand analyser. Implied by
-O.-fcseEnable common sub-expression elimination. Implied by
-O.-fdicts-cheapMake dictionary-valued expressions seem cheap to the optimiser.
-fdicts-strictMake dictionaries strict
-fdmd-tx-dict-selUse a special demand transformer for dictionary selectors. Always enabled by default.
-fdo-eta-reductionEnable eta-reduction. Implied by
-O.-fdo-lambda-eta-expansionEnable lambda eta-expansion. Always enabled by default.
-feager-blackholingTurn on eager blackholing
-fenable-rewrite-rulesSwitch on all rewrite rules (including rules generated by automatic specialisation of overloaded functions). Implied by
-O.-fexcess-precisionEnable excess intermediate precision
-fexpose-all-unfoldingsExpose all unfoldings, even for very large or recursive functions.
-ffloat-inTurn on the float-in transformation. Implied by
-O.-ffull-lazinessTurn on full laziness (floating bindings outwards). Implied by
-O.-ffun-to-thunkAllow worker-wrapper to convert a function closure into a thunk if the function does not use any of its arguments. Off by default.
-fignore-assertsIgnore assertions in the source. Implied by
-O.-fignore-interface-pragmasIgnore pragmas in interface files. Implied by
-O0only.-flate-dmd-analRun demand analysis again, at the end of the simplification pipeline
-fliberate-caseTurn on the liberate-case transformation. Implied by
-O2.-fliberate-case-threshold=⟨n⟩default: 2000. Set the size threshold for the liberate-case transformation to ⟨n⟩
-floopificationTurn saturated self-recursive tail-calls into local jumps in the generated assembly. Implied by
-O.-fmax-inline-alloc-size=⟨n⟩default: 128. Set the maximum size of inline array allocations to ⟨n⟩ bytes (default: 128). GHC will allocate non-pinned arrays of statically known size in the current nursery block if they’re no bigger than ⟨n⟩ bytes, ignoring GC overheap. This value should be quite a bit smaller than the block size (typically: 4096).
-fmax-inline-memcpy-insns=⟨n⟩default: 32. Inline
memcpycalls if they would generate no more than ⟨n⟩ pseudo instructions.-fmax-inline-memset-insns=⟨n⟩default: 32. Inline
memsetcalls if they would generate no more than ⟨n⟩ pseudo instructions-fmax-relevant-binds=⟨n⟩default: 6. Set the maximum number of bindings to display in type error messages.
-fmax-uncovered-patterns=⟨n⟩default: 4. Set the maximum number of patterns to display in warnings about non-exhaustive ones.
-fmax-simplifier-iterations=⟨n⟩default: 4. Set the max iterations for the simplifier.
-fmax-worker-args=⟨n⟩default: 10. If a worker has that many arguments, none will be unpacked anymore.
-fno-opt-coercionTurn off the coercion optimiser
-fno-pre-inliningTurn off pre-inlining
-fno-state-hackTurn off the “state hack” whereby any lambda with a real-world state token as argument is considered to be single-entry. Hence OK to inline things inside it.
-fomit-interface-pragmasDon’t generate interface pragmas. Implied by
-O0only.-fomit-yieldsOmit heap checks when no allocation is being performed.
-foptimal-applicative-doUse a slower but better algorithm for ApplicativeDo
-fpedantic-bottomsMake GHC be more precise about its treatment of bottom (but see also
-fno-state-hack). In particular, GHC will not eta-expand through a case expression.-fregs-graphUse the graph colouring register allocator for register allocation in the native code generator. Implied by
-O2.-fregs-iterativeUse the iterative coalescing graph colouring register allocator in the native code generator.
-fsimplifier-phases=⟨n⟩default: 2. Set the number of phases for the simplifier. Ignored with
-O0.-fsimpl-tick-factor=⟨n⟩default: 100. Set the percentage factor for simplifier ticks.
-fspec-constrTurn on the SpecConstr transformation. Implied by
-O2.-fspec-constr-count=⟨n⟩default: 3.* Set to ⟨n⟩ the maximum number of specialisations that will be created for any one function by the SpecConstr transformation.
-fspec-constr-threshold=⟨n⟩default: 2000. Set the size threshold for the SpecConstr transformation to ⟨n⟩.
-fspecialiseTurn on specialisation of overloaded functions. Implied by
-O.-fcross-module-specialiseTurn on specialisation of overloaded functions imported from other modules.
-fstatic-argument-transformationTurn on the static argument transformation.
-fstrictnessTurn on strictness analysis. Implied by
-O. Implies-fworker-wrapper-fstrictness-before=⟨n⟩Run an additional strictness analysis before simplifier phase ⟨n⟩
-funbox-small-strict-fieldsFlatten strict constructor fields with a pointer-sized representation. Implied by
-O.-funbox-strict-fieldsFlatten strict constructor fields
-funfolding-creation-threshold=⟨n⟩default: 750. Tweak unfolding settings.
-funfolding-dict-discount=⟨n⟩default: 30. Tweak unfolding settings.
-funfolding-fun-discount=⟨n⟩default: 60. Tweak unfolding settings.
-funfolding-keeness-factor=⟨n⟩default: 1.5. Tweak unfolding settings.
-funfolding-use-threshold=⟨n⟩default: 60. Tweak unfolding settings.
-fvectorisation-avoidanceEnable vectorisation avoidance. Always enabled by default.
-fvectoriseEnable vectorisation of nested data parallelism
-fworker-wrapperEnable the worker-wrapper transformation after a strictness analysis pass. Implied by
-O, and by-fstrictness. Disabled by-fno-strictness. Enabling-fworker-wrapperwhile strictness analysis is disabled (by-fno-strictness) has no effect.
Optimization levels¶
-O0Disable optimisations (default)
-O, -O1Enable level 1 optimisations
-O2Enable level 2 optimisations
-OdphEnable level 2 optimisations, set
-fmax-simplifier-iterations=20and-fsimplifier-phases=3.
Package options¶
-this-unit-id ⟨unit-id⟩Compile to be part of unit (i.e. package) ⟨unit-id⟩
-package ⟨pkg⟩Expose package ⟨pkg⟩
-hide-all-packagesHide all packages by default
-hide-package ⟨pkg⟩Hide package ⟨pkg⟩
-ignore-package ⟨pkg⟩Ignore package ⟨pkg⟩
-package-db ⟨file⟩Add ⟨file⟩ to the package db stack.
-clear-package-dbClear the package db stack.
-no-global-package-dbRemove the global package db from the stack.
-global-package-dbAdd the global package db to the stack.
-no-user-package-dbRemove the user’s package db from the stack.
-user-package-dbAdd the user’s package db to the stack.
-no-auto-link-packagesDon’t automatically link in the base and rts packages.
-trust ⟨pkg⟩Expose package ⟨pkg⟩ and set it to be trusted
-distrust ⟨pkg⟩Expose package ⟨pkg⟩ and set it to be distrusted
-distrust-allDistrust all packages by default
-package-env ⟨file⟩|⟨name⟩Use the specified package environment.
Phases of compilation¶
-FEnable the use of a pre-processor (set with
-pgmF ⟨cmd⟩)-EStop after preprocessing (
.hsppfile)-CStop after generating C (
.hcfile)-SStop after generating assembly (
.sfile)-cStop after generating object (
.o) file-x ⟨suffix⟩Override default behaviour for source files
Overriding external programs¶
-pgmL ⟨cmd⟩Use ⟨cmd⟩ as the literate pre-processor
-pgmP ⟨cmd⟩Use ⟨cmd⟩ as the C pre-processor (with
-cpponly)-pgmc ⟨cmd⟩Use ⟨cmd⟩ as the C compiler
-pgmlo ⟨cmd⟩Use ⟨cmd⟩ as the LLVM optimiser
-pgmlc ⟨cmd⟩Use ⟨cmd⟩ as the LLVM compiler
-pgms ⟨cmd⟩Use ⟨cmd⟩ as the splitter
-pgma ⟨cmd⟩Use ⟨cmd⟩ as the assembler
-pgml ⟨cmd⟩Use ⟨cmd⟩ as the linker
-pgmdll ⟨cmd⟩Use ⟨cmd⟩ as the DLL generator
-pgmF ⟨cmd⟩Use ⟨cmd⟩ as the pre-processor (with
-Fonly)-pgmwindres ⟨cmd⟩Use ⟨cmd⟩ as the program for embedding manifests on Windows.
-pgmlibtool ⟨cmd⟩Use ⟨cmd⟩ as the command for libtool (with
-staticlibonly).
Phase-specific options¶
-optL ⟨option⟩pass ⟨option⟩ to the literate pre-processor
-optP ⟨option⟩pass ⟨option⟩ to cpp (with
-cpponly)-optF ⟨option⟩pass ⟨option⟩ to the custom pre-processor
-optc ⟨option⟩pass ⟨option⟩ to the C compiler
-optlo ⟨option⟩pass ⟨option⟩ to the LLVM optimiser
-optlc ⟨option⟩pass ⟨option⟩ to the LLVM compiler
-opta ⟨option⟩pass ⟨option⟩ to the assembler
-optl ⟨option⟩pass ⟨option⟩ to the linker
-optdll ⟨option⟩pass ⟨option⟩ to the DLL generator
-optwindres ⟨option⟩pass ⟨option⟩ to
windres.
Platform-specific options¶
-msse2(x86 only) Use SSE2 for floating-point operations
-msse4.2(x86 only) Use SSE4.2 for floating-point operations
Compiler plugins¶
-fplugin=⟨module⟩Load a plugin exported by a given module
-fplugin-opt=⟨module⟩:⟨args⟩Give arguments to a plugin module; module must be specified with
-fplugin
Profiling¶
-profTurn on profiling
-fprof-autoAuto-add
SCCs to all bindings not marked INLINE-fprof-auto-topAuto-add
SCCs to all top-level bindings not marked INLINE-fprof-auto-exportedAuto-add
SCCs to all exported bindings not marked INLINE-fprof-cafsAuto-add
SCCs to all CAFs-fno-prof-count-entriesDo not collect entry counts
-ticky
Program coverage¶
-fhpcTurn on Haskell program coverage instrumentation
-hpcdir ⟨dir⟩Directory to deposit
.mixfiles during compilation (default is.hpc)
Recompilation checking¶
-fforce-recompTurn off recompilation checking. This is implied by any
-ddump-Xoption when compiling a single file (i.e. when using-c).
Redirecting output¶
-hcsuf ⟨suffix⟩set the suffix to use for intermediate C files
-hidir ⟨dir⟩set directory for interface files
-hisuf ⟨suffix⟩set the suffix to use for interface files
-o ⟨file⟩set output filename
-odir ⟨dir⟩set directory for object files
-ohi ⟨file⟩set the filename in which to put the interface
-osuf ⟨suffix⟩set the output file suffix
-stubdir ⟨dir⟩redirect FFI stub files
-dumpdir ⟨dir⟩redirect dump files
-outputdir ⟨dir⟩set output directory
-dyno ⟨file⟩Set the output filename for dynamic object files (see
-dynamic-too)-dynosuf ⟨suffix⟩Set the object suffix for dynamic object files (see
-dynamic-too)-dynhisuf ⟨suffix⟩Set the hi suffix for dynamic object files (see
-dynamic-too)
Temporary files¶
-tmpdir ⟨dir⟩set the directory for temporary files
Verbosity options¶
-vverbose mode (equivalent to
-v3)-v ⟨n⟩set verbosity level
-fhide-source-pathshide module source and object paths
-fprint-potential-instancesdisplay all available instances in type error messages
-fprint-explicit-forallsPrint explicit
forallquantification in types. See also-XExplicitForAll-fprint-explicit-kindsPrint explicit kind foralls and kind arguments in types. See also
-XKindSignatures-fprint-explicit-runtime-repsPrint
RuntimeRepvariables in types which are runtime-representation polymorphic.-fprint-unicode-syntaxUse unicode syntax when printing expressions, types and kinds. See also
-XUnicodeSyntax-fprint-expanded-synonymsIn type errors, also print type-synonym-expanded types.
-fprint-typechecker-elaborationPrint extra information from typechecker.
-fdiagnostics-color=(always|auto|never)Use colors in error messages
-f[no-]diagnostics-show-caretWhether to show snippets of original source code
-ferror-spansOutput full span in error messages
-Rghc-timingSummarise timing stats for GHC (same as
+RTS -tstderr).-fshow-hole-constraintsShow constraints when reporting typed holes
-fshow-loaded-modulesShow the names of modules that GHCi loaded after a
:loadcommand.
Warnings¶
-Wenable normal warnings
-wdisable all warnings
-Wallenable almost all warnings (details in Warnings and sanity-checking)
-Wcompatenable future compatibility warnings (details in Warnings and sanity-checking)
-Werrormake warnings fatal
-Werror=⟨wflag⟩make a specific warning fatal
-Wwarnmake warnings non-fatal
-Wwarn=⟨wflag⟩make a specific warning non-fatal
-Wunrecognised-warning-flagsthrow a warning when an unreconised
-W...flag is encountered on the command line.-fshow-warning-groupsshow which group an emitted warning belongs to.
-fdefer-type-errorsTurn type errors into warnings, deferring the error until runtime. Implies
-fdefer-typed-holesand-fdefer-out-of-scope-variables. See also-Wdeferred-type-errors-fdefer-typed-holesConvert typed hole errors into warnings, deferring the error until runtime. Implied by
-fdefer-type-errors. See also-Wtyped-holes.-fdefer-out-of-scope-variablesConvert variable out of scope variables errors into warnings. Implied by
-fdefer-type-errors. See also-Wdeferred-out-of-scope-variables.-fhelpful-errorsMake suggestions for mis-spelled names.
-freverse-errorsDisplay errors in GHC/GHCi sorted by reverse order of source code line numbers.
-fmax-errorsLimit the number of errors displayed in GHC/GHCi.
-Wdeprecated-flagswarn about uses of commandline flags that are deprecated
-Wduplicate-constraintswarn when a constraint appears duplicated in a type signature
-Wduplicate-exportswarn when an entity is exported multiple times
-Whi-shadowingwarn when a
.hifile in the current directory shadows a library-Widentitieswarn about uses of Prelude numeric conversions that are probably the identity (and hence could be omitted)
-Wimplicit-preludewarn when the Prelude is implicitly imported
-Wincomplete-patternswarn when a pattern match could fail
-Wincomplete-uni-patternswarn when a pattern match in a lambda expression or pattern binding could fail
-fmax-pmcheck-iterations=⟨n⟩the iteration limit for the pattern match checker
-Wincomplete-record-updateswarn when a record update could fail
-Wmissing-fieldswarn when fields of a record are uninitialised
-Wmissing-import-listswarn when an import declaration does not explicitly list all thenames brought into scope
-Wmissing-methodswarn when class methods are undefined
-Wmissing-signatureswarn about top-level functions without signatures
-Wmissing-exported-sigs(deprecated) warn about top-level functions without signatures, only if they are exported. takes precedence over -Wmissing-signatures
-Wmissing-exported-signatureswarn about top-level functions without signatures, only if they are exported. takes precedence over -Wmissing-signatures
-Wmissing-local-sigs(deprecated) warn about polymorphic local bindings without signatures
-Wmissing-local-signatureswarn about polymorphic local bindings without signatures
-Wmissing-monadfail-instanceswarn when a failable pattern is used in a do-block that does not have a
MonadFailinstance.-Wsemigroupwarn when a
Monoidis notSemigroup, and on non-Semigroupdefinitions of(<>)?-Wmissed-specialisationswarn when specialisation of an imported, overloaded function fails.
-Wall-missed-specialisationswarn when specialisation of any overloaded function fails.
-Wmonomorphism-restrictionwarn when the Monomorphism Restriction is applied
-Wname-shadowingwarn when names are shadowed
-Wnoncanonical-monad-instanceswarn when
ApplicativeorMonadinstances have noncanonical definitions ofreturn,pure,(>>), or(*>). See flag description in Warnings and sanity-checking for more details.-Wnoncanonical-monadfail-instanceswarn when
MonadorMonadFailinstances have noncanonical definitions offail.See flag description in Warnings and sanity-checking for more details.-Wnoncanonical-monoid-instanceswarn when
SemigrouporMonoidinstances have noncanonical definitions of(<>)ormappend. See flag description in Warnings and sanity-checking for more details.-Worphanswarn when the module contains orphan instance declarations or rewrite rules
-Woverlapping-patternswarn about overlapping patterns
-Wtabswarn if there are tabs in the source file
-Wtype-defaultswarn when defaulting happens
-Wunrecognised-pragmaswarn about uses of pragmas that GHC doesn’t recognise
-Wunticked-promoted-constructorswarn if promoted constructors are not ticked
-Wunused-bindswarn about bindings that are unused. Alias for
-Wunused-top-binds,-Wunused-local-bindsand-Wunused-pattern-binds-Wunused-top-bindswarn about top-level bindings that are unused
-Wunused-local-bindswarn about local bindings that are unused
-Wunused-pattern-bindswarn about pattern match bindings that are unused
-Wunused-importswarn about unnecessary imports
-Wunused-matcheswarn about variables in patterns that aren’t used
-Wunused-forallswarn about type variables in user-written
foralls that are unused-Wunused-type-variableswarn about variables in type family or data family instances that are unused
-Wunused-do-bindwarn about do bindings that appear to throw away values of types other than
()-Wwrong-do-bindwarn about do bindings that appear to throw away monadic values that you should have bound instead
-Wunsafewarn if the module being compiled is regarded to be unsafe. Should be used to check the safety status of modules when using safe inference. Works on all module types, even those using explicit Safe Haskell modes (such as
-XTrustworthy) and so can be used to have the compiler check any assumptions made.-Wsafewarn if the module being compiled is regarded to be safe. Should be used to check the safety status of modules when using safe inference. Works on all module types, even those using explicit Safe Haskell modes (such as
-XTrustworthy) and so can be used to have the compiler check any assumptions made.-Wtrustworthy-safewarn if the module being compiled is marked as
-XTrustworthybut it could instead be marked as-XSafe, a more informative bound. Can be used to detectonce a Safe Haskell bound can be improved as dependencies are updated.-Wwarnings-deprecationswarn about uses of functions & types that have warnings or deprecated pragmas
-Wdeprecationswarn about uses of functions & types that have warnings or deprecated pragmas. Alias for
-Wwarnings-deprecations-Wamp(deprecated) warn on definitions conflicting with the Applicative-Monad Proposal (AMP)
-Wredundant-constraintsHave the compiler warn about redundant constraints in typesignatures.
-Wdeferred-type-errorsReport warnings when deferred type errors are enabled. This option is enabled by default. See
-fdefer-type-errors.-Wtyped-holesReport warnings when typed hole errors are deferred until runtime. See
-fdefer-typed-holes.-Wdeferred-out-of-scope-variablesReport warnings when variable out-of-scope errors are deferred until runtime. See :ghc-flag:-fdefer-out-of-scope-variables`.
-Wpartial-type-signatureswarn about holes in partial type signatures when
-XPartialTypeSignaturesis enabled. Not applicable when-XPartialTypesignaturesis not enabled, in which case errors are generated for such holes. See Partial Type Signatures.-Wderiving-typeablewarn when encountering a request to derive an instance of class
Typeable. As of GHC 7.10, such declarations are unnecessary and are ignored by the compiler because GHC has a custom solver for discharging this type of constraint.-Wmissing-home-moduleswarn when encountering a home module imported, but not listed on the command line. Useful for cabal to ensure GHC won’t pick up modules, not listed neither in
exposed-modules, nor inother-modules.
Copyright¶
Copyright 2015. The University Court of the University of Glasgow. All rights reserved.