Cabal-1.22.1.0: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell98

Distribution.Simple.Program.GHC

Synopsis

Documentation

data GhcOptions Source

A structured set of GHC options/flags

Constructors

GhcOptions 

Fields

ghcOptMode :: Flag GhcMode

The major mode for the ghc invocation.

ghcOptExtra :: NubListR String

Any extra options to pass directly to ghc. These go at the end and hence override other stuff.

ghcOptExtraDefault :: NubListR String

Extra default flags to pass directly to ghc. These go at the beginning and so can be overridden by other stuff.

ghcOptInputFiles :: NubListR FilePath

The main input files; could be .hs, .hi, .c, .o, depending on mode.

ghcOptInputModules :: NubListR ModuleName

The names of input Haskell modules, mainly for --make mode.

ghcOptOutputFile :: Flag FilePath

Location for output file; the ghc -o flag.

ghcOptOutputDynFile :: Flag FilePath

Location for dynamic output file in GhcStaticAndDynamic mode; the ghc -dyno flag.

ghcOptSourcePathClear :: Flag Bool

Start with an empty search path for Haskell source files; the ghc -i flag (-i on it's own with no path argument).

ghcOptSourcePath :: NubListR FilePath

Search path for Haskell source files; the ghc -i flag.

ghcOptPackageKey :: Flag PackageKey

The package key the modules will belong to; the ghc -this-package-key flag.

ghcOptPackageDBs :: PackageDBStack

GHC package databases to use, the ghc -package-conf flag.

ghcOptPackages :: NubListR (InstalledPackageId, PackageId, ModuleRenaming)

The GHC packages to use. For compatability with old and new ghc, this requires both the short and long form of the package id; the ghc -package or ghc -package-id flags.

ghcOptHideAllPackages :: Flag Bool

Start with a clean package set; the ghc -hide-all-packages flag

ghcOptNoAutoLinkPackages :: Flag Bool

Don't automatically link in Haskell98 etc; the ghc -no-auto-link-packages flag.

ghcOptSigOf :: [(ModuleName, (PackageKey, ModuleName))]

What packages are implementing the signatures

ghcOptLinkLibs :: NubListR FilePath

Names of libraries to link in; the ghc -l flag.

ghcOptLinkLibPath :: NubListR FilePath

Search path for libraries to link in; the ghc -L flag.

ghcOptLinkOptions :: NubListR String

Options to pass through to the linker; the ghc -optl flag.

ghcOptLinkFrameworks :: NubListR String

OSX only: frameworks to link in; the ghc -framework flag.

ghcOptNoLink :: Flag Bool

Don't do the link step, useful in make mode; the ghc -no-link flag.

ghcOptLinkNoHsMain :: Flag Bool

Don't link in the normal RTS main entry point; the ghc -no-hs-main flag.

ghcOptCcOptions :: NubListR String

Options to pass through to the C compiler; the ghc -optc flag.

ghcOptCppOptions :: NubListR String

Options to pass through to CPP; the ghc -optP flag.

ghcOptCppIncludePath :: NubListR FilePath

Search path for CPP includes like header files; the ghc -I flag.

ghcOptCppIncludes :: NubListR FilePath

Extra header files to include at CPP stage; the ghc -optP-include flag.

ghcOptFfiIncludes :: NubListR FilePath

Extra header files to include for old-style FFI; the ghc -#include flag.

ghcOptLanguage :: Flag Language

The base language; the ghc -XHaskell98 or -XHaskell2010 flag.

ghcOptExtensions :: NubListR Extension

The language extensions; the ghc -X flag.

ghcOptExtensionMap :: Map Extension String

A GHC version-dependent mapping of extensions to flags. This must be set to be able to make use of the ghcOptExtensions.

ghcOptOptimisation :: Flag GhcOptimisation

What optimisation level to use; the ghc -O flag.

ghcOptDebugInfo :: Flag Bool

Emit debug info; the ghc -g flag.

ghcOptProfilingMode :: Flag Bool

Compile in profiling mode; the ghc -prof flag.

ghcOptSplitObjs :: Flag Bool

Use the "split object files" feature; the ghc -split-objs flag.

ghcOptNumJobs :: Flag (Maybe Int)

Run N jobs simultaneously (if possible).

ghcOptHPCDir :: Flag FilePath

Enable coverage analysis; the ghc -fhpc -hpcdir flags.

ghcOptGHCiScripts :: NubListR FilePath

Extra GHCi startup scripts; the -ghci-script flag

ghcOptHiSuffix :: Flag String
 
ghcOptObjSuffix :: Flag String
 
ghcOptDynHiSuffix :: Flag String

only in GhcStaticAndDynamic mode

ghcOptDynObjSuffix :: Flag String

only in GhcStaticAndDynamic mode

ghcOptHiDir :: Flag FilePath
 
ghcOptObjDir :: Flag FilePath
 
ghcOptOutputDir :: Flag FilePath
 
ghcOptStubDir :: Flag FilePath
 
ghcOptDynLinkMode :: Flag GhcDynLinkMode
 
ghcOptShared :: Flag Bool
 
ghcOptFPic :: Flag Bool
 
ghcOptDylibName :: Flag String
 
ghcOptRPaths :: NubListR FilePath
 
ghcOptVerbosity :: Flag Verbosity

Get GHC to be quiet or verbose with what it's doing; the ghc -v flag.

ghcOptCabal :: Flag Bool

Let GHC know that it is Cabal that's calling it. Modifies some of the GHC error messages.

data GhcMode Source

Constructors

GhcModeCompile
ghc -c
GhcModeLink
ghc
GhcModeMake
ghc --make
GhcModeInteractive

ghci / ghc --interactive

GhcModeAbiHash

ghc --abi-hash | GhcModeDepAnalysis -- ^ ghc -M | GhcModeEvaluate -- ^ ghc -e

Instances

data GhcDynLinkMode Source

Constructors

GhcStaticOnly
-static
GhcDynamicOnly
-dynamic
GhcStaticAndDynamic
-static -dynamic-too