GHC(1)                     Glasgow Haskell Compiler                     GHC(1)



NAME
       GHC - the Glasgow Haskell Compiler



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  docu-
       mentation  is  available  in various other formats including DVI, Post-
       Script 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 sta-
       tus of each flag.


       Common suffixes of file names for Haskell are:

       .hs    Haskell source code; preprocess, compile

       .lhs   literate Haskell source; unlit, preprocess, compile

       .hi    Interface file; contains information about exported symbols

       .hc    intermediate C files

       .x_o   way x object files; common ways are: p, u, s

       .x_hi  way x interface files



OPTIONS
   Help and verbosity options
       -?  -help  -v  -vn  -V  --supported-extensions or --supported-languages
       --info   --version   --numeric-version   --print-libdir   -ferror-spans
       -Hsize  -Rghc-timing


   Which phases to run
       -E  -C  -S  -c  -x suffix


   Alternative modes of operation
       --interactive  --make  -e expr  -M


   Redirecting output
       -hcsuf suffix  -hidir dir  -hisuf suffix  -o filename  -odir dir   -ohi
       filename   -osuf suffix  -stubdir dir  -dumpdir dir  -outputdir dir


   Keeping intermediate files
       -keep-hc-file or
                     -keep-hc-files  -keep-llvm-file or
                     -keep-llvm-files  -keep-s-file or
                     -keep-s-files  -keep-tmp-files


   Temporary files
       -tmpdir


   Finding imports
       -idir1:dir2:...  -i


   Interface file options
       -ddump-hi  -ddump-hi-diffs  -ddump-minimal-imports  --show-iface file


   Recompilation checking
       -fforce-recomp -fno-force-recomp


   Interactive-mode options
       -ignore-dot-ghci            -ghci-script           -fbreak-on-exception
       -fno-break-on-exception       -fbreak-on-error      -fno-break-on-error
       -fprint-evld-with-show  -fno-print-evld-with-show   -fprint-bind-result
       -fno-print-bind-result                         -fno-print-bind-contents
       -fno-implicit-import-qualified  -interactive-print


   Packages
       -package-name  P   -package  P   -hide-all-packages  -hide-package name
       -ignore-package    name     -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   P    -distrust   P
       -distrust-all


   Language options
       -fglasgow-exts         -fno-glasgow-exts         -XOverlappingInstances
       -XNoOverlappingInstances  -XIncoherentInstances -XNoIncoherentInstances
       -XUndecidableInstances   -XNoUndecidableInstances    -fcontext-stack=Nn
       -XArrows             -XNoArrows              -XDisambiguateRecordFields
       -XNoDisambiguateRecordFields                 -XForeignFunctionInterface
       -XNoForeignFunctionInterface  -XGenerics -XNoGenerics  -XImplicitParams
       -XNoImplicitParams      -firrefutable-tuples    -fno-irrefutable-tuples
       -XNoImplicitPrelude        -XImplicitPrelude         -XRebindableSyntax
       -XNoRebindableSyntax                        -XNoMonomorphismRestriction
       -XMonomorphismRrestriction      -XNoNPlusKPatterns     -XNPlusKPatterns
       -XNoTraditionalRecordSyntax -XTraditionalRecordSyntax  -XNoMonoPatBinds
       -XMonoPatBinds            -XRelaxedPolyRec           -XNoRelaxedPolyRec
       -XExtendedDefaultRules   -XNoExtendedDefaultRules   -XOverloadedStrings
       -XNoOverloadedStrings  -XGADTs -XNoGADTs   -XGADTSyntax  -XNoGADTSyntax
       -XTypeFamilies  -XNoTypeFamilies  -XConstraintKinds -XNoConstraintKinds
       -XDataKinds       -XNoDataKinds        -XPolyKinds        -XNoPolyKinds
       -XScopedTypeVariables     -XNoScopedTypeVariables      -XMonoLocalBinds
       -XNoMonoLocalBinds         -XTemplateHaskell        -XNoTemplateHaskell
       -XQuasiQuotes  -XNoQuasiQuotes   -XBangPatterns -XNoBangPatterns  -XCPP
       -XNoCPP      -XPatternGuards     -XNoPatternGuards       -XViewPatterns
       -XNoViewPatterns     -XUnicodeSyntax   -XNoUnicodeSyntax    -XMagicHash
       -XNoMagicHash            -XExplicitForAll            -XNoExplicitForAll
       -XPolymorphicComponents     -XNoPolymorphicComponents      -XRank2Types
       -XNoRank2Types    -XRankNTypes   -XNoRankNTypes    -XImpredicativeTypes
       -XNoImpredicativeTypes                      -XExistentialQuantification
       -XNoExistentialQuantification    -XKindSignatures    -XNoKindSignatures
       -XEmptyDataDecls         -XNoEmptyDataDecls          -XParallelListComp
       -XNoParallelListComp      -XTransformListComp     -XNoTransformListComp
       -XMonadComprehensions    -XNoMonadComprehensions     -XUnliftedFFITypes
       -XNoUnliftedFFITypes       -XInterruptibleFFI      -XNoInterruptibleFFI
       -XLiberalTypeSynonyms      -XNoLiberalTypeSynonyms      -XTypeOperators
       -XNoTypeOperators      -XExplicitNamespaces      -XNoExplicitNamespaces
       -XRecursiveDo   -XNoRecursiveDo    -XParallelArrays  -XNoParallelArrays
       -XRecordWildCards         -XNoRecordWildCards          -XNamedFieldPuns
       -XNoNamedFieldPuns                           -XDisambiguateRecordFields
       -XNoDisambiguateRecordFields      -XUnboxedTuples     -XNoUnboxedTuples
       -XStandaloneDeriving    -XNoStandaloneDeriving     -XDeriveDataTypeable
       -XNoDeriveDataTypeable         -XDeriveGeneric        -XNoDeriveGeneric
       -XGeneralizedNewtypeDeriving             -XNoGeneralizedNewtypeDeriving
       -XTypeSynonymInstances   -XNoTypeSynonymInstances    -XFlexibleContexts
       -XNoFlexibleContexts      -XFlexibleInstances     -XNoFlexibleInstances
       -XConstrainedClassMethods                   -XNoConstrainedClassMethods
       -XDefaultSignatures    -XNoDefaultSignatures    -XMultiParamTypeClasses
       -XNoMultiParamTypeClasses                      -XFunctionalDependencies
       -XNoFunctionalDependencies      -XPackageImports     -XNoPackageImports
       -XLambdaCase  -XNoLambdaCase    -XMultiWayIf   -XNoMultiWayIf    -XSafe
       -XTrustworthy  -XUnsafe  -fpackage-trust


   Warnings
       -W   -w    -w    -Wall   -w    -Werror    -Wwarn    -fdefer-type-errors
       -fno-defer-type-errors       -fhelpful-errors       -fno-helpful-errors
       -fwarn-deprecated-flags                      -fno-warn-deprecated-flags
       -fwarn-duplicate-exports                    -fno-warn-duplicate-exports
       -fwarn-hi-shadowing      -fno-warn-hi-shadowing       -fwarn-identities
       -fno-warn-identities                            -fwarn-implicit-prelude
       -fno-warn-implicit-prelude                   -fwarn-incomplete-patterns
       -fno-warn-incomplete-patterns            -fwarn-incomplete-uni-patterns
       -fno-warn-incomplete-uni-patterns      -fwarn-incomplete-record-updates
       -fno-warn-incomplete-record-updates       -fwarn-lazy-unlifted-bindings
       -fno-warn-lazy-unlifted-bindings                  -fwarn-missing-fields
       -fno-warn-missing-fields                    -fwarn-missing-import-lists
       -fnowarn-missing-import-lists                    -fwarn-missing-methods
       -fno-warn-missing-methods                     -fwarn-missing-signatures
       -fno-warn-missing-signatures                  -fwarn-missing-local-sigs
       -fno-warn-missing-local-sigs            -fwarn-monomorphism-restriction
       -fno-warn-monomorphism-restriction                -fwarn-name-shadowing
       -fno-warn-name-shadowing       -fwarn-orphans,      -fwarn-auto-orphans
       -fno-warn-orphans,  -fno-warn-auto-orphans  -fwarn-overlapping-patterns
       -fno-warn-overlapping-patterns        -fwarn-tabs        -fno-warn-tabs
       -fwarn-type-defaults                            -fno-warn-type-defaults
       -fwarn-unrecognised-pragmas              -fno-warn-unrecognised-pragmas
       -fwarn-unused-binds    -fno-warn-unused-binds     -fwarn-unused-imports
       -fno-warn-unused-imports                          -fwarn-unused-matches
       -fno-warn-unused-matches                          -fwarn-unused-do-bind
       -fno-warn-unused-do-bind  -fwarn-wrong-do-bind  -fno-warn-wrong-do-bind
       -fwarn-unsafe      -fno-warn-unsafe      -fwarn-safe     -fno-warn-safe
       -fwarn-warnings-deprecations -fno-warn-warnings-deprecations


   Optimisation levels
       -O -O0  -On -O0


   Individual optimisations
       -fcase-merge -fno-case-merge  -fcse   -fdicts-strict  -fno-dicts-strict
       -fdo-eta-reduction   -fno-do-eta-reduction    -fdo-lambda-eta-expansion
       -fno-do-lambda-eta-expansion                        -feager-blackholing
       -fenable-rewrite-rules      -fno-enable-rewrite-rules       -fvectorise
       -fno-vectorise    -favoid-vect   -fno-avoid-vect     -fexcess-precision
       -fno-excess-precision   -ffloat-in   -ffull-laziness   -fignore-asserts
       -fno-ignore-asserts                          -fignore-interface-pragmas
       -fno-ignore-interface-pragmas                           -fliberate-case
       -fliberate-case-threshold=n                -fno-liberate-case-threshold
       -fmax-simplifier-iterations     -fmax-worker-args     -fno-opt-coercion
       -fno-pre-inlining          -fno-state-hack           -fpedantic-bottoms
       -fno-pedantic-bottoms                          -fomit-interface-pragmas
       -fno-omit-interface-pragmas  -fsimplifier-phases  -fsimpl-tick-factor=n
       -fspec-constr     -fspec-constr-threshold=n  -fno-spec-constr-threshold
       -fspec-constr-count=n       -fno-spec-constr-count         -fspecialise
       -fstrictness    -fstrictness=before=n  -fstatic-argument-transformation
       -funbox-strict-fields                          -fno-unbox-strict-fields
       -funfolding-creation-threshold        -fno-unfolding-creation-threshold
       -funfolding-fun-discount                    -fno-unfolding-fun-discount
       -funfolding-keeness-factor                -fno-unfolding-keeness-factor
       -funfolding-use-threshold -fno-unfolding-use-threshold


   Profiling options
       -prof   -fprof-auto  -fno-prof-auto    -fprof-auto-top   -fno-prof-auto
       -fprof-auto-exported    -fno-prof-auto     -fprof-cafs   -fno-prof-cafs
       -fno-prof-count-entries -fprof-count-entries  -ticky


   Program coverage options
       -fhpc  -hpcdir dir


   Haskell pre-processor options
       -F


   C pre-processor options
       -cpp  -Dsymbol=value -U  -Usymbol  -Idir


   Code generation options
       -fasm   -fllvm   -fno-code  -fbyte-code  -fobject-code


   Linking options
       -shared  -fPIC  -dynamic  -dynload   -framework  name   -framework-path
       name    -llib    -Ldir    -main-is   --mk-dll   -no-hs-main   -rtsopts,
       -rtsopts={none,some,all}   -with-rtsopts=opts   -no-link    -split-objs
       -static      -threaded      -debug      -eventlog     -fno-gen-manifest
       -fno-embed-manifest  -fno-shared-implib  -dylib-install-name path


   Plugin options
       -fplugin=module  -fplugin-opt=module:args


   Replacing phases
       -pgmL cmd  -pgmP cmd  -pgmc  cmd   -pgms  cmd   -pgma  cmd   -pgml  cmd
       -pgmdll cmd  -pgmF cmd  -pgmwindres cmd


   Forcing options to particular phases
       -optL  option   -optP option  -optF option  -optc option  -optlo option
       -optlc option  -optm option  -opta option  -optl option  -optdll option
       -optwindres option


   Platform-specific options
       -msse2  -monly-[432]-regs


   External core file options
       -fext-core


   Compiler debugging options
       -dcore-lint    -ddump-to-file    -ddump-asm    -ddump-bcos   -ddump-cmm
       -ddump-core-stats  -ddump-cpranal  -ddump-cse  -ddump-deriv   -ddump-ds
       -ddump-flatC  -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-phases  -ddump-simpl-iterations
       -ddump-spec    -ddump-splices   -ddump-stg   -ddump-stranal   -ddump-tc
       -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-noprags     -dppr-user-length
       -dppr-colsNNN   -dppr-case-as-let   -dsuppress-all   -dsuppress-uniques
       -dsuppress-idinfo                            -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


   Misc compiler options
       -fno-hi-version-check         -dno-black-holing          -fhistory-size
       -funregisterised  -fno-ghci-history  -fno-ghci-sandbox



HELP AND VERBOSITY OPTIONS
       -?     help
                                                                        [mode]


       -help  help
                                                                        [mode]


       -v     verbose mode (equivalent to -v3)
                                                                     [dynamic]


       -vn    set verbosity level
                                                                     [dynamic]


       -V     display GHC version
                                                                        [mode]


       --supported-extensions or --supported-languages
              display the supported languages and language extensions
                                                                        [mode]


       --info display information about the compiler
                                                                        [mode]


       --version
              display GHC version
                                                                        [mode]


       --numeric-version
              display GHC version (numeric only)
                                                                        [mode]


       --print-libdir
              display GHC library directory
                                                                        [mode]


       -ferror-spans
              output full span in error messages
                                                                      [static]


       -Hsize Set the minimum heap size to size
                                                                      [static]


       -Rghc-timing
              Summarise timing stats for GHC (same as +RTS -tstderr)
                                                                      [static]



WHICH PHASES TO RUN
       -E     Stop after preprocessing (.hspp file)
                                                                        [mode]


       -C     Stop after generating C (.hc file)
                                                                        [mode]


       -S     Stop after generating assembly (.s file)
                                                                        [mode]


       -c     Do not link
                                                                     [dynamic]


       -x suffix
              Override default behaviour for source files
                                                                      [static]



ALTERNATIVE MODES OF OPERATION
       --interactive
              Interactive  mode  - normally used by just running ghci; see for
              details.
                                                                        [mode]


       --make Build a multi-module Haskell program, automatically figuring out
              dependencies.  Likely  to be much easier, and faster, than using
              make; see for details..
                                                                        [mode]


       -e expr
              Evaluate expr; see for details.
                                                                        [mode]


       -M     Generate dependency information suitable for use in a  Makefile;
              see for details.
                                                                        [mode]



REDIRECTING OUTPUT
       -hcsuf suffix
              set the suffix to use for intermediate C files
                                                                     [dynamic]


       -hidir dir
              set directory for interface files
                                                                     [dynamic]


       -hisuf suffix
              set the suffix to use for interface files
                                                                     [dynamic]


       -o filename
              set output filename
                                                                     [dynamic]


       -odir dir
              set directory for object files
                                                                     [dynamic]


       -ohi filename
              set the filename in which to put the interface
                                                                     [dynamic]


       -osuf suffix
              set the output file suffix
                                                                     [dynamic]


       -stubdir dir
              redirect FFI stub files
                                                                     [dynamic]


       -dumpdir dir
              redirect dump files
                                                                     [dynamic]


       -outputdir dir
              set output directory
                                                                     [dynamic]



KEEPING INTERMEDIATE FILES
       -keep-hc-file or
                            -keep-hc-files retain intermediate .hc files
                                                                     [dynamic]


       -keep-llvm-file or
                            -keep-llvm-files   retain  intermediate  LLVM  .ll
              files
                                                                     [dynamic]


       -keep-s-file or
                            -keep-s-files retain intermediate .s files
                                                                     [dynamic]


       -keep-tmp-files
              retain all intermediate temporary files
                                                                     [dynamic]



TEMPORARY FILES
       -tmpdir
              set the directory for temporary files
                                                                     [dynamic]



FINDING IMPORTS
       -idir1:dir2:...
              add dir, dir2, etc. to import path
                                                                 [static/:set]


       -i     Empty the import directory list
                                                                 [static/:set]



INTERFACE FILE OPTIONS
       -ddump-hi
              Dump the new interface to stdout
                                                                     [dynamic]


       -ddump-hi-diffs
              Show the differences vs. the old interface
                                                                     [dynamic]


       -ddump-minimal-imports
              Dump a minimal set of imports
                                                                     [dynamic]


       --show-iface file
              See .
                                                                            []



RECOMPILATION CHECKING
       -fforce-recomp
              Turn off recompilation checking; implied by any -ddump-X option
                                                                     [dynamic]



INTERACTIVE-MODE OPTIONS
       -ignore-dot-ghci
              Disable reading of .ghci files
                                                                     [dynamic]


       -ghci-script
              Read additional .ghci files
                                                                     [dynamic]


       -fbreak-on-exception
              Break on any exception thrown
                                                                     [dynamic]


       -fbreak-on-error
              Break on uncaught exceptions and errors
                                                                     [dynamic]


       -fprint-evld-with-show
              Enable usage of Show instances in :print
                                                                     [dynamic]


       -fprint-bind-result
              Turn on printing of binding results in GHCi
                                                                     [dynamic]


       -fno-print-bind-contents
              Turn off printing of binding contents in GHCi
                                                                     [dynamic]


       -fno-implicit-import-qualified
              Turn off implicit qualified import of everything in GHCi
                                                                     [dynamic]


       -interactive-print
              Select the function to use for printing evaluated expressions in
              GHCi
                                                                     [dynamic]



PACKAGES
       -package-name P
              Compile to be part of package P
                                                                      [static]


       -package P
              Expose package P
                                                                 [static/:set]


       -hide-all-packages
              Hide all packages by default
                                                                      [static]


       -hide-package name
              Hide package P
                                                                 [static/:set]


       -ignore-package name
              Ignore package P
                                                                 [static/:set]


       -package-db file
              Add file to the package db stack.
                                                                      [static]


       -clear-package-db
              Clear the package db stack.
                                                                      [static]


       -no-global-package-db
              Remove the global package db from the stack.
                                                                      [static]


       -global-package-db
              Add the global package db to the stack.
                                                                      [static]


       -no-user-package-db
              Remove the user's package db from the stack.
                                                                      [static]


       -user-package-db
              Add the user's package db to the stack.
                                                                      [static]


       -no-auto-link-packages
              Don't automatically link in the haskell98 package.
                                                                     [dynamic]


       -trust P
              Expose package P and set it to be trusted
                                                                 [static/:set]


       -distrust P
              Expose package P and set it to be distrusted
                                                                 [static/:set]


       -distrust-all
              Distrust all packages by default
                                                                 [static/:set]



LANGUAGE OPTIONS
       -fglasgow-exts
              Enable most language extensions; see for exactly which ones.
                                                                     [dynamic]


       -XOverlappingInstances
              Enable overlapping instances
                                                                     [dynamic]


       -XIncoherentInstances
              Enable incoherent instances. Implies -XOverlappingInstances
                                                                     [dynamic]


       -XUndecidableInstances
              Enable undecidable instances
                                                                     [dynamic]


       -fcontext-stack=Nn
              set the limit for context reduction. Default is 20.
                                                                     [dynamic]


       -XArrows
              Enable arrow notation extension
                                                                     [dynamic]


       -XDisambiguateRecordFields
              Enable record field disambiguation
                                                                     [dynamic]


       -XForeignFunctionInterface
              Enable foreign function interface (implied by -fglasgow-exts)
                                                                     [dynamic]


       -XGenerics
              Deprecated, does nothing. No longer enables generic classes. See
              also GHC's support for generic programming.
                                                                     [dynamic]


       -XImplicitParams
              Enable Implicit Parameters. Implied by -fglasgow-exts.
                                                                     [dynamic]


       -firrefutable-tuples
              Make tuple pattern matching irrefutable
                                                                     [dynamic]


       -XNoImplicitPrelude
              Don't implicitly import Prelude
                                                                     [dynamic]


       -XRebindableSyntax
              Employ rebindable syntax
                                                                     [dynamic]


       -XNoMonomorphismRestriction
              Disable the monomorphism restriction
                                                                     [dynamic]


       -XNoNPlusKPatterns
              Disable support for n+k patterns
                                                                     [dynamic]


       -XNoTraditionalRecordSyntax
              Disable support for traditional record syntax (as  supported  by
              Haskell 98) C {f = x}
                                                                     [dynamic]


       -XNoMonoPatBinds
              Make pattern bindings polymorphic
                                                                     [dynamic]


       -XRelaxedPolyRec
              Relaxed checking for mutually-recursive polymorphic functions
                                                                     [dynamic]


       -XExtendedDefaultRules
              Use GHCi's extended default rules in a normal module
                                                                     [dynamic]


       -XOverloadedStrings
              Enable overloaded string literals.
                                                                     [dynamic]


       -XGADTs
              Enable generalised algebraic data types.
                                                                     [dynamic]


       -XGADTSyntax
              Enable generalised algebraic data type syntax.
                                                                     [dynamic]


       -XTypeFamilies
              Enable type families.
                                                                     [dynamic]


       -XConstraintKinds
              Enable a kind of constraints.
                                                                     [dynamic]


       -XDataKinds
              Enable datatype promotion.
                                                                     [dynamic]


       -XPolyKinds
              Enable kind polymorphism. Implies -XKindSignatures.
                                                                     [dynamic]


       -XScopedTypeVariables
              Enable  lexically-scoped  type  variables.  Implied  by  -fglas-
              gow-exts.
                                                                     [dynamic]


       -XMonoLocalBinds
              Enable do not generalise local bindings.
                                                                     [dynamic]


       -XTemplateHaskell
              Enable Template Haskell. No longer implied by -fglasgow-exts.
                                                                     [dynamic]


       -XQuasiQuotes
              Enable quasiquotation.
                                                                     [dynamic]


       -XBangPatterns
              Enable bang patterns.
                                                                     [dynamic]


       -XCPP  Enable the C preprocessor.
                                                                     [dynamic]


       -XPatternGuards
              Enable pattern guards.
                                                                     [dynamic]


       -XViewPatterns
              Enable view patterns.
                                                                     [dynamic]


       -XUnicodeSyntax
              Enable unicode syntax.
                                                                     [dynamic]


       -XMagicHash
              Allow "#" as a postfix modifier on identifiers.
                                                                     [dynamic]


       -XExplicitForAll
              Enable explicit universal quantification. Implied  by  -XScoped-
              TypeVariables,   -XLiberalTypeSynonyms,  -XRank2Types,  -XRankN-
              Types, -XPolymorphicComponents, -XExistentialQuantification
                                                                     [dynamic]


       -XPolymorphicComponents
              Enable polymorphic components for data constructors.
                                                                     [dynamic]


       -XRank2Types
              Enable rank-2 types.
                                                                     [dynamic]


       -XRankNTypes
              Enable rank-N types.
                                                                     [dynamic]


       -XImpredicativeTypes
              Enable impredicative types.
                                                                     [dynamic]


       -XExistentialQuantification
              Enable existential quantification.
                                                                     [dynamic]


       -XKindSignatures
              Enable kind signatures.
                                                                     [dynamic]


       -XEmptyDataDecls
              Enable empty data declarations.
                                                                     [dynamic]


       -XParallelListComp
              Enable parallel list comprehensions.
                                                                     [dynamic]


       -XTransformListComp
              Enable generalised list comprehensions.
                                                                     [dynamic]


       -XMonadComprehensions
              Enable monad comprehensions.
                                                                     [dynamic]


       -XUnliftedFFITypes
              Enable unlifted FFI types.
                                                                     [dynamic]


       -XInterruptibleFFI
              Enable interruptible FFI.
                                                                     [dynamic]


       -XLiberalTypeSynonyms
              Enable liberalised type synonyms.
                                                                     [dynamic]


       -XTypeOperators
              Enable type operators.
                                                                     [dynamic]


       -XExplicitNamespaces
              Enable using the keyword type to specify the  namespace  of  en-
              tries in imports and exports.
                                                                     [dynamic]


       -XRecursiveDo
              Enable recursive do (mdo) notation.
                                                                     [dynamic]


       -XParallelArrays
              Enable parallel arrays.
                                                                     [dynamic]


       -XRecordWildCards
              Enable record wildcards.
                                                                     [dynamic]


       -XNamedFieldPuns
              Enable record puns.
                                                                     [dynamic]


       -XDisambiguateRecordFields
              Enable record field disambiguation.
                                                                     [dynamic]


       -XUnboxedTuples
              Enable unboxed tuples.
                                                                     [dynamic]


       -XStandaloneDeriving
              Enable standalone deriving.
                                                                     [dynamic]


       -XDeriveDataTypeable
              Enable deriving for the Data and Typeable classes.
                                                                     [dynamic]


       -XDeriveGeneric
              Enable deriving for the Generic class.
                                                                     [dynamic]


       -XGeneralizedNewtypeDeriving
              Enable newtype deriving.
                                                                     [dynamic]


       -XTypeSynonymInstances
              Enable type synonyms in instance heads.
                                                                     [dynamic]


       -XFlexibleContexts
              Enable flexible contexts.
                                                                     [dynamic]


       -XFlexibleInstances
              Enable flexible instances. Implies -XTypeSynonymInstances
                                                                     [dynamic]


       -XConstrainedClassMethods
              Enable constrained class methods.
                                                                     [dynamic]


       -XDefaultSignatures
              Enable default signatures.
                                                                     [dynamic]


       -XMultiParamTypeClasses
              Enable multi parameter type classes.
                                                                     [dynamic]


       -XFunctionalDependencies
              Enable functional dependencies.
                                                                     [dynamic]


       -XPackageImports
              Enable package-qualified imports.
                                                                     [dynamic]


       -XLambdaCase
              Enable lambda-case expressions.
                                                                     [dynamic]


       -XMultiWayIf
              Enable multi-way if-expressions.
                                                                     [dynamic]


       -XSafe Enable the Safe Haskell Safe mode.
                                                                     [dynamic]


       -XTrustworthy
              Enable the Safe Haskell Trustworthy mode.
                                                                     [dynamic]


       -XUnsafe
              Enable Safe Haskell Unsafe mode.
                                                                     [dynamic]


       -fpackage-trust
              Enable  Safe  Haskell trusted package requirement for trustworty
              modules.
                                                                     [dynamic]



WARNINGS
       -W     enable normal warnings
                                                                     [dynamic]


       -w     disable all warnings
                                                                     [dynamic]


       -Wall  enable almost all warnings (details in )
                                                                     [dynamic]


       -Werror
              make warnings fatal
                                                                     [dynamic]


       -Wwarn make warnings non-fatal
                                                                     [dynamic]


       -fdefer-type-errors
              Defer as many type errors as possible until runtime.
                                                                     [dynamic]


       -fhelpful-errors
              Make suggestions for mis-spelled names.
                                                                     [dynamic]


       -fwarn-deprecated-flags
              warn about uses of commandline flags that are deprecated
                                                                     [dynamic]


       -fwarn-duplicate-exports
              warn when an entity is exported multiple times
                                                                     [dynamic]


       -fwarn-hi-shadowing
              warn when a .hi file in the current directory shadows a library
                                                                     [dynamic]


       -fwarn-identities
              warn about uses of Prelude numeric conversions that are probably
              the identity (and hence could be omitted)
                                                                     [dynamic]


       -fwarn-implicit-prelude
              warn when the Prelude is implicitly imported
                                                                     [dynamic]


       -fwarn-incomplete-patterns
              warn when a pattern match could fail
                                                                     [dynamic]


       -fwarn-incomplete-uni-patterns
              warn  when  a  pattern  match  in a lambda expression or pattern
              binding could fail
                                                                     [dynamic]


       -fwarn-incomplete-record-updates
              warn when a record update could fail
                                                                     [dynamic]


       -fwarn-lazy-unlifted-bindings
              warn when a pattern binding looks lazy but must be strict
                                                                     [dynamic]


       -fwarn-missing-fields
              warn when fields of a record are uninitialised
                                                                     [dynamic]


       -fwarn-missing-import-lists
              warn when an import declaration does not explicitly list all the
              names brought into scope
                                                                     [dynamic]


       -fwarn-missing-methods
              warn when class methods are undefined
                                                                     [dynamic]


       -fwarn-missing-signatures
              warn about top-level functions without signatures
                                                                     [dynamic]


       -fwarn-missing-local-sigs
              warn about polymorphic local bindings without signatures
                                                                     [dynamic]


       -fwarn-monomorphism-restriction
              warn when the Monomorphism Restriction is applied
                                                                     [dynamic]


       -fwarn-name-shadowing
              warn when names are shadowed
                                                                     [dynamic]


       -fwarn-orphans, -fwarn-auto-orphans
              warn  when  the  module contains orphan instance declarations or
              rewrite rules
                                                                     [dynamic]


       -fwarn-overlapping-patterns
              warn about overlapping patterns
                                                                     [dynamic]


       -fwarn-tabs
              warn if there are tabs in the source file
                                                                     [dynamic]


       -fwarn-type-defaults
              warn when defaulting happens
                                                                     [dynamic]


       -fwarn-unrecognised-pragmas
              warn about uses of pragmas that GHC doesn't recognise
                                                                     [dynamic]


       -fwarn-unused-binds
              warn about bindings that are unused
                                                                     [dynamic]


       -fwarn-unused-imports
              warn about unnecessary imports
                                                                     [dynamic]


       -fwarn-unused-matches
              warn about variables in patterns that aren't used
                                                                     [dynamic]


       -fwarn-unused-do-bind
              warn about do bindings that appear to throw away values of types
              other than ()
                                                                     [dynamic]


       -fwarn-wrong-do-bind
              warn  about do bindings that appear to throw away monadic values
              that you should have bound instead
                                                                     [dynamic]


       -fwarn-unsafe
              warn if the module being compiled  is  regarded  to  be  unsafe.
              Should  be used to check the safety status of modules when using
              safe inference.
                                                                     [dynamic]


       -fwarn-safe
              warn if the module being compiled is regarded to be safe. Should
              be  used  to  check the safety status of modules when using safe
              inference.
                                                                     [dynamic]


       -fwarn-warnings-deprecations
              warn about uses of functions & types that have warnings or  dep-
              recated pragmas
                                                                     [dynamic]



OPTIMISATION LEVELS
       -O     Enable default optimisation (level 1)
                                                                     [dynamic]


       -On    Set optimisation level n
                                                                     [dynamic]



INDIVIDUAL OPTIMISATIONS
       -fcase-merge
              Enable case-merging. Implied by -O.
                                                                     [dynamic]


       -fcse  Turn on common sub-expression elimination. Implied by -O.
                                                                     [dynamic]


       -fdicts-strict
              Make dictionaries strict
                                                                      [static]


       -fdo-eta-reduction
              Enable eta-reduction. Implied by -O.
                                                                     [dynamic]


       -fdo-lambda-eta-expansion
              Enable lambda eta-reduction
                                                                     [dynamic]


       -feager-blackholing
              Turn on eager blackholing
                                                                     [dynamic]


       -fenable-rewrite-rules
              Switch  on all rewrite rules (including rules generated by auto-
              matic specialisation of overloaded functions). Implied by -O.
                                                                     [dynamic]


       -fvectorise
              Enable vectorisation of nested data parallelism
                                                                     [dynamic]


       -favoid-vect
              Enable vectorisation avoidance (EXPERIMENTAL)
                                                                     [dynamic]


       -fexcess-precision
              Enable excess intermediate precision
                                                                     [dynamic]


       -ffloat-in
              Turn on the float-in transformation. Implied by -O.
                                                                     [dynamic]


       -ffull-laziness
              Turn on full laziness (floating bindings outwards).  Implied  by
              -O.
                                                                     [dynamic]


       -fignore-asserts
              Ignore assertions in the source
                                                                     [dynamic]


       -fignore-interface-pragmas
              Ignore pragmas in interface files
                                                                     [dynamic]


       -fliberate-case
              Turn on the liberate-case transformation. Implied by -O2.
                                                                     [dynamic]


       -fliberate-case-threshold=n
              Set the size threshold for the liberate-case transformation to n
              (default: 200)
                                                                      [static]


       -fmax-simplifier-iterations
              Set the max iterations for the simplifier
                                                                     [dynamic]


       -fmax-worker-args
              If a worker has that many arguments, none will be unpacked  any-
              more (default: 10)
                                                                      [static]


       -fno-opt-coercion
              Turn off the coercion optimiser
                                                                      [static]


       -fno-pre-inlining
              Turn off pre-inlining
                                                                      [static]


       -fno-state-hack
              Turn  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.
                                                                      [static]


       -fpedantic-bottoms
              Make  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.
                                                                     [dynamic]


       -fomit-interface-pragmas
              Don't generate interface pragmas
                                                                     [dynamic]


       -fsimplifier-phases
              Set the number of phases for the simplifier (default 2). Ignored
              with -O0.
                                                                     [dynamic]


       -fsimpl-tick-factor=n
              Set the percentage factor for simplifier ticks (default 100)
                                                                     [dynamic]


       -fspec-constr
              Turn on the SpecConstr transformation. Implied by -O2.
                                                                     [dynamic]


       -fspec-constr-threshold=n
              Set the size threshold for the SpecConstr  transformation  to  n
              (default: 200)
                                                                      [static]


       -fspec-constr-count=n
              Set to n (default: 3) the maximum number of specialisations that
              will be created for any one function by the SpecConstr transfor-
              mation
                                                                      [static]


       -fspecialise
              Turn on specialisation of overloaded functions. Implied by -O.
                                                                     [dynamic]


       -fstrictness
              Turn on strictness analysis. Implied by -O.
                                                                     [dynamic]


       -fstrictness=before=n
              Run an additional strictness analysis before simplifier phase n
                                                                     [dynamic]


       -fstatic-argument-transformation
              Turn on the static argument transformation. Implied by -O2.
                                                                     [dynamic]


       -funbox-strict-fields
              Flatten strict constructor fields
                                                                     [dynamic]


       -funfolding-creation-threshold
              Tweak unfolding settings
                                                                      [static]


       -funfolding-fun-discount
              Tweak unfolding settings
                                                                      [static]


       -funfolding-keeness-factor
              Tweak unfolding settings
                                                                      [static]


       -funfolding-use-threshold
              Tweak unfolding settings
                                                                      [static]



PROFILING OPTIONS
       -prof  Turn on profiling
                                                                      [static]


       -fprof-auto
              Auto-add SCCs to all bindings not marked INLINE
                                                                     [dynamic]


       -fprof-auto-top
              Auto-add SCCs to all top-level bindings not marked INLINE
                                                                     [dynamic]


       -fprof-auto-exported
              Auto-add SCCs to all exported bindings not marked INLINE
                                                                     [dynamic]


       -fprof-cafs
              Auto-add SCCs to all CAFs
                                                                     [dynamic]


       -fno-prof-count-entries
              Do not collect entry counts
                                                                     [dynamic]


       -ticky Turn on ticky-ticky profiling
                                                                      [static]



PROGRAM COVERAGE OPTIONS
       -fhpc  Turn on Haskell program coverage instrumentation
                                                                      [static]


       -hpcdir dir
              Directory  to  deposit .mix files during compilation (default is
              .hpc)
                                                                     [dynamic]



HASKELL PRE-PROCESSOR OPTIONS
       -F     Enable the use of a pre-processor (set with -pgmF)
                                                                     [dynamic]



C PRE-PROCESSOR OPTIONS
       -cpp   Run the C pre-processor on Haskell source files
                                                                     [dynamic]


       -Dsymbol=value
              Define a symbol in the C pre-processor
                                                                     [dynamic]


       -Usymbol
              Undefine a symbol in the C pre-processor
                                                                     [dynamic]


       -Idir  Add dir to the directory search list for #include files
                                                                     [dynamic]



CODE GENERATION OPTIONS
       -fasm  Use the native code generator
                                                                     [dynamic]


       -fllvm Compile using the LLVM code generator
                                                                     [dynamic]


       -fno-code
              Omit code generation
                                                                     [dynamic]


       -fbyte-code
              Generate byte-code
                                                                     [dynamic]


       -fobject-code
              Generate object code
                                                                     [dynamic]



LINKING OPTIONS
       -shared
              Generate a shared library (as opposed to an executable)
                                                                     [dynamic]


       -fPIC  Generate position-independent code (where available)
                                                                      [static]


       -dynamic
              Use dynamic Haskell libraries (if available)
                                                                      [static]


       -dynload
              Selects one of a number of modes for finding shared libraries at
              runtime.
                                                                      [static]


       -framework name
              On  Darwin/MacOS X only, link in the framework name. This option
              corresponds to the -framework option for Apple's Linker.
                                                                     [dynamic]


       -framework-path name
              On Darwin/MacOS X only, add  dir  to  the  list  of  directories
              searched  for  frameworks. This option corresponds to the -F op-
              tion for Apple's Linker.
                                                                     [dynamic]


       -llib  Link in library lib
                                                                     [dynamic]


       -Ldir  Add dir to the list of directories searched for libraries
                                                                     [dynamic]


       -main-is
              Set main module and function
                                                                     [dynamic]


       --mk-dll
              DLL-creation mode (Windows only)
                                                                     [dynamic]


       -no-hs-main
              Don't assume this program contains main
                                                                     [dynamic]


       -rtsopts, -rtsopts={none,some,all}
              Control whether the RTS behaviour can be  tweaked  via  command-
              line flags and the GHCRTS environment variable. Using none means
              no RTS flags can be given; some means only a minimum of safe op-
              tions  can  be  given  (the default), and all (or no argument at
              all) means that all RTS flags are permitted.
                                                                     [dynamic]


       -with-rtsopts=opts
              Set the default RTS options to opts.
                                                                     [dynamic]


       -no-link
              Omit linking
                                                                     [dynamic]


       -split-objs
              Split objects (for libraries)
                                                                     [dynamic]


       -static
              Use static Haskell libraries
                                                                      [static]


       -threaded
              Use the threaded runtime
                                                                      [static]


       -debug Use the debugging runtime
                                                                      [static]


       -eventlog
              Enable runtime event tracing
                                                                      [static]


       -fno-gen-manifest
              Do not generate a manifest file (Windows only)
                                                                     [dynamic]


       -fno-embed-manifest
              Do not embed the manifest in the executable (Windows only)
                                                                     [dynamic]


       -fno-shared-implib
              Don't generate an import library for a DLL (Windows only)
                                                                     [dynamic]


       -dylib-install-name path
              Set the install name (via -install_name passed to Apple's  link-
              er),  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/MacOS
              X only)
                                                                     [dynamic]



PLUGIN OPTIONS
       -fplugin=module
              Load a plugin exported by a given module
                                                                      [static]


       -fplugin-opt=module:args
              Give arguments to a plugin module; module must be specified with
              -fplugin
                                                                      [static]



REPLACING PHASES
       -pgmL cmd
              Use cmd as the literate pre-processor
                                                                     [dynamic]


       -pgmP cmd
              Use cmd as the C pre-processor (with -cpp only)
                                                                     [dynamic]


       -pgmc cmd
              Use cmd as the C compiler
                                                                     [dynamic]


       -pgms cmd
              Use cmd as the splitter
                                                                     [dynamic]


       -pgma cmd
              Use cmd as the assembler
                                                                     [dynamic]


       -pgml cmd
              Use cmd as the linker
                                                                     [dynamic]


       -pgmdll cmd
              Use cmd as the DLL generator
                                                                     [dynamic]


       -pgmF cmd
              Use cmd as the pre-processor (with -F only)
                                                                     [dynamic]


       -pgmwindres cmd
              Use cmd as the program for embedding manifests on Windows.
                                                                     [dynamic]



FORCING OPTIONS TO PARTICULAR PHASES
       -optL option
              pass option to the literate pre-processor
                                                                     [dynamic]


       -optP option
              pass option to cpp (with -cpp only)
                                                                     [dynamic]


       -optF option
              pass option to the custom pre-processor
                                                                     [dynamic]


       -optc option
              pass option to the C compiler
                                                                     [dynamic]


       -optlo option
              pass option to the LLVM optimiser
                                                                     [dynamic]


       -optlc option
              pass option to the LLVM compiler
                                                                     [dynamic]


       -optm option
              pass option to the mangler
                                                                     [dynamic]


       -opta option
              pass option to the assembler
                                                                     [dynamic]


       -optl option
              pass option to the linker
                                                                     [dynamic]


       -optdll option
              pass option to the DLL generator
                                                                     [dynamic]


       -optwindres option
              pass option to windres.
                                                                     [dynamic]



PLATFORM-SPECIFIC OPTIONS
       -msse2 (x86 only) Use SSE2 for floating point
                                                                     [dynamic]


       -monly-[432]-regs
              (x86 only) give some registers back to the C compiler
                                                                     [dynamic]



EXTERNAL CORE FILE OPTIONS
       -fext-core
              Generate .hcr external Core files
                                                                     [dynamic]



COMPILER DEBUGGING OPTIONS
       -dcore-lint
              Turn on internal sanity checking
                                                                     [dynamic]


       -ddump-to-file
              Dump to files instead of stdout
                                                                     [dynamic]


       -ddump-asm
              Dump assembly
                                                                     [dynamic]


       -ddump-bcos
              Dump interpreter byte code
                                                                     [dynamic]


       -ddump-cmm
              Dump C-- output
                                                                     [dynamic]


       -ddump-core-stats
              Print  a one-line summary of the size of the Core program at the
              end of the optimisation pipeline
                                                                     [dynamic]


       -ddump-cpranal
              Dump output from CPR analysis
                                                                     [dynamic]


       -ddump-cse
              Dump CSE output
                                                                     [dynamic]


       -ddump-deriv
              Dump deriving output
                                                                     [dynamic]


       -ddump-ds
              Dump desugarer output
                                                                     [dynamic]


       -ddump-flatC
              Dump `flat' C
                                                                     [dynamic]


       -ddump-foreign
              Dump foreign export stubs
                                                                     [dynamic]


       -ddump-hpc
              Dump after instrumentation for program coverage
                                                                     [dynamic]


       -ddump-inlinings
              Dump inlining info
                                                                     [dynamic]


       -ddump-llvm
              Dump LLVM intermediate code
                                                                     [dynamic]


       -ddump-occur-anal
              Dump occurrence analysis output
                                                                     [dynamic]


       -ddump-opt-cmm
              Dump the results of C-- to C-- optimising passes
                                                                     [dynamic]


       -ddump-parsed
              Dump parse tree
                                                                     [dynamic]


       -ddump-prep
              Dump prepared core
                                                                     [dynamic]


       -ddump-rn
              Dump renamer output
                                                                     [dynamic]


       -ddump-rule-firings
              Dump rule firing info
                                                                     [dynamic]


       -ddump-rule-rewrites
              Dump detailed rule firing info
                                                                     [dynamic]


       -ddump-rules
              Dump rules
                                                                     [dynamic]


       -ddump-vect
              Dump vectoriser input and output
                                                                     [dynamic]


       -ddump-simpl
              Dump final simplifier output
                                                                     [dynamic]


       -ddump-simpl-phases
              Dump output from each simplifier phase
                                                                     [dynamic]


       -ddump-simpl-iterations
              Dump output from each simplifier iteration
                                                                     [dynamic]


       -ddump-spec
              Dump specialiser output
                                                                     [dynamic]


       -ddump-splices
              Dump TH spliced expressions, and what they evaluate to
                                                                     [dynamic]


       -ddump-stg
              Dump final STG
                                                                     [dynamic]


       -ddump-stranal
              Dump strictness analyser output
                                                                     [dynamic]


       -ddump-tc
              Dump typechecker output
                                                                     [dynamic]


       -ddump-types
              Dump type signatures
                                                                     [dynamic]


       -ddump-worker-wrapper
              Dump worker-wrapper output
                                                                     [dynamic]


       -ddump-if-trace
              Trace interface files
                                                                     [dynamic]


       -ddump-tc-trace
              Trace typechecker
                                                                     [dynamic]


       -ddump-vt-trace
              Trace vectoriser
                                                                     [dynamic]


       -ddump-rn-trace
              Trace renamer
                                                                     [dynamic]


       -ddump-rn-stats
              Renamer stats
                                                                     [dynamic]


       -ddump-simpl-stats
              Dump simplifier stats
                                                                     [dynamic]


       -dno-debug-output
              Suppress unsolicited debugging output
                                                                      [static]


       -dppr-debug
              Turn on debug printing (more verbose)
                                                                      [static]


       -dppr-noprags
              Don't output pragma info in dumps
                                                                      [static]


       -dppr-user-length
              Set the depth for printing expressions in error msgs
                                                                     [dynamic]


       -dppr-colsNNN
              Set the width of debugging output. For example -dppr-cols200
                                                                     [dynamic]


       -dppr-case-as-let
              Print single alternative case expressions as strict lets.
                                                                     [dynamic]


       -dsuppress-all
              In core dumps, suppress everything that is suppressable.
                                                                      [static]


       -dsuppress-uniques
              Suppress the printing of uniques in debug output (easier to  use
              diff)
                                                                      [static]


       -dsuppress-idinfo
              Suppress  extended  information about identifiers where they are
              bound
                                                                      [static]


       -dsuppress-module-prefixes
              Suppress the printing of module qualification prefixes
                                                                      [static]


       -dsuppress-type-signatures
              Suppress type signatures
                                                                      [static]


       -dsuppress-type-applications
              Suppress type applications
                                                                      [static]


       -dsuppress-coercions
              Suppress the printing of coercions in Core dumps  to  make  them
              shorter
                                                                      [static]


       -dsource-stats
              Dump haskell source stats
                                                                     [dynamic]


       -dcmm-lint
              C-- pass sanity checking
                                                                     [dynamic]


       -dstg-lint
              STG pass sanity checking
                                                                     [dynamic]


       -dstg-stats
              Dump STG stats
                                                                     [dynamic]


       -dverbose-core2core
              Show output from each core-to-core pass
                                                                     [dynamic]


       -dverbose-stg2stg
              Show output from each STG-to-STG pass
                                                                     [dynamic]


       -dshow-passes
              Print out each pass name as it happens
                                                                     [dynamic]


       -dfaststring-stats
              Show statistics for fast string usage when finished
                                                                     [dynamic]



MISC COMPILER OPTIONS
       -fno-hi-version-check
              Don't complain about .hi file mismatches
                                                                      [static]


       -dno-black-holing
              Turn off black holing (probably doesn't work)
                                                                      [static]


       -fhistory-size
              Set simplification history size
                                                                      [static]


       -funregisterised
              Unregisterised compilation (use -unreg instead)
                                                                      [static]


       -fno-ghci-history
              Do  not  use the load/store the GHCi command history from/to gh-
              ci_history.
                                                                     [dynamic]


       -fno-ghci-sandbox
              Turn off the GHCi sandbox. Means computations  are  run  in  the
              main thread, rather than a forked thread.
                                                                     [dynamic]




FILES
       /usr/lib


COPYRIGHT
       Copyright 2002, The University Court of the University of Glasgow.
       All rights reserved.



AUTHOR
       This  manual  page was generated from the XML documentation of GHC with
       blood, sweat, tears and  a  breaks-if-you-look-at-it-the-wrong-way  XSL
       stylesheet  originally  written  by Michael Weber <michaelw@debian.org>
       for the Debian GNU/Linux system (but may be used by others).




Glasgow FP Suite                  2002-10-25                            GHC(1)
