Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Distribution.Simple.Program.GHC
Synopsis
- data GhcOptions = GhcOptions {
- ghcOptMode :: Flag GhcMode
- ghcOptExtra :: [String]
- ghcOptExtraDefault :: [String]
- ghcOptInputFiles :: NubListR (SymbolicPath Pkg File)
- ghcOptInputScripts :: NubListR (SymbolicPath Pkg File)
- ghcOptInputModules :: NubListR ModuleName
- ghcOptOutputFile :: Flag (SymbolicPath Pkg File)
- ghcOptOutputDynFile :: Flag FilePath
- ghcOptSourcePathClear :: Flag Bool
- ghcOptSourcePath :: NubListR (SymbolicPath Pkg (Dir Source))
- ghcOptThisUnitId :: Flag String
- ghcOptThisComponentId :: Flag ComponentId
- ghcOptInstantiatedWith :: [(ModuleName, OpenModule)]
- ghcOptNoCode :: Flag Bool
- ghcOptPackageDBs :: PackageDBStack
- ghcOptPackages :: NubListR (OpenUnitId, ModuleRenaming)
- ghcOptHideAllPackages :: Flag Bool
- ghcOptWarnMissingHomeModules :: Flag Bool
- ghcOptNoAutoLinkPackages :: Flag Bool
- ghcOptLinkLibs :: [FilePath]
- ghcOptLinkLibPath :: NubListR (SymbolicPath Pkg (Dir Lib))
- ghcOptLinkOptions :: [String]
- ghcOptLinkFrameworks :: NubListR String
- ghcOptLinkFrameworkDirs :: NubListR (SymbolicPath Pkg (Dir Framework))
- ghcOptLinkRts :: Flag Bool
- ghcOptNoLink :: Flag Bool
- ghcOptLinkNoHsMain :: Flag Bool
- ghcOptLinkModDefFiles :: NubListR FilePath
- ghcOptCcOptions :: [String]
- ghcOptCxxOptions :: [String]
- ghcOptAsmOptions :: [String]
- ghcOptCppOptions :: [String]
- ghcOptCppIncludePath :: NubListR (SymbolicPath Pkg (Dir Include))
- ghcOptCppIncludes :: NubListR (SymbolicPath Pkg File)
- ghcOptFfiIncludes :: NubListR FilePath
- ghcOptCcProgram :: Flag FilePath
- ghcOptLanguage :: Flag Language
- ghcOptExtensions :: NubListR Extension
- ghcOptExtensionMap :: Map Extension (Maybe CompilerFlag)
- ghcOptOptimisation :: Flag GhcOptimisation
- ghcOptDebugInfo :: Flag DebugInfoLevel
- ghcOptProfilingMode :: Flag Bool
- ghcOptProfilingAuto :: Flag GhcProfAuto
- ghcOptSplitSections :: Flag Bool
- ghcOptSplitObjs :: Flag Bool
- ghcOptNumJobs :: Flag ParStrat
- ghcOptHPCDir :: Flag (SymbolicPath Pkg (Dir Mix))
- ghcOptGHCiScripts :: [FilePath]
- ghcOptHiSuffix :: Flag String
- ghcOptObjSuffix :: Flag String
- ghcOptDynHiSuffix :: Flag String
- ghcOptDynObjSuffix :: Flag String
- ghcOptHiDir :: Flag (SymbolicPath Pkg (Dir Artifacts))
- ghcOptHieDir :: Flag (SymbolicPath Pkg (Dir Artifacts))
- ghcOptObjDir :: Flag (SymbolicPath Pkg (Dir Artifacts))
- ghcOptOutputDir :: Flag (SymbolicPath Pkg (Dir Artifacts))
- ghcOptStubDir :: Flag (SymbolicPath Pkg (Dir Artifacts))
- ghcOptDynLinkMode :: Flag GhcDynLinkMode
- ghcOptStaticLib :: Flag Bool
- ghcOptShared :: Flag Bool
- ghcOptFPic :: Flag Bool
- ghcOptDylibName :: Flag String
- ghcOptRPaths :: NubListR FilePath
- ghcOptVerbosity :: Flag Verbosity
- ghcOptExtraPath :: NubListR (SymbolicPath Pkg (Dir Build))
- ghcOptCabal :: Flag Bool
- data GhcMode
- data GhcOptimisation
- data GhcDynLinkMode
- data GhcProfAuto
- ghcInvocation :: Verbosity -> ConfiguredProgram -> Compiler -> Platform -> Maybe (SymbolicPath CWD (Dir Pkg)) -> GhcOptions -> IO ProgramInvocation
- renderGhcOptions :: Compiler -> Platform -> GhcOptions -> [String]
- runGHC :: Verbosity -> ConfiguredProgram -> Compiler -> Platform -> Maybe (SymbolicPath CWD (Dir Pkg)) -> GhcOptions -> IO ()
- packageDbArgsDb :: PackageDBStack -> [String]
- normaliseGhcArgs :: Maybe Version -> PackageDescription -> [String] -> [String]
Documentation
data GhcOptions Source #
A structured set of GHC options/flags
Note that options containing lists fall into two categories:
- options that can be safely deduplicated, e.g. input modules or enabled extensions;
- options that cannot be deduplicated in general without changing semantics, e.g. extra ghc options or linking options.
Constructors
GhcOptions | |
Fields
|
Instances
Monoid GhcOptions Source # | |
Defined in Distribution.Simple.Program.GHC Methods mempty :: GhcOptions # mappend :: GhcOptions -> GhcOptions -> GhcOptions # mconcat :: [GhcOptions] -> GhcOptions # | |
Semigroup GhcOptions Source # | |
Defined in Distribution.Simple.Program.GHC Methods (<>) :: GhcOptions -> GhcOptions -> GhcOptions # sconcat :: NonEmpty GhcOptions -> GhcOptions stimes :: Integral b => b -> GhcOptions -> GhcOptions | |
Generic GhcOptions Source # | |
Defined in Distribution.Simple.Program.GHC Associated Types type Rep GhcOptions :: Type -> Type | |
Show GhcOptions Source # | |
Defined in Distribution.Simple.Program.GHC Methods showsPrec :: Int -> GhcOptions -> ShowS # show :: GhcOptions -> String # showList :: [GhcOptions] -> ShowS # | |
type Rep GhcOptions Source # | |
Defined in Distribution.Simple.Program.GHC type Rep GhcOptions = D1 ('MetaData "GhcOptions" "Distribution.Simple.Program.GHC" "Cabal-3.13.0.0-inplace" 'False) (C1 ('MetaCons "GhcOptions" 'PrefixI 'True) ((((((S1 ('MetaSel ('Just "ghcOptMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag GhcMode)) :*: S1 ('MetaSel ('Just "ghcOptExtra") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])) :*: (S1 ('MetaSel ('Just "ghcOptExtraDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Just "ghcOptInputFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg 'File))))) :*: ((S1 ('MetaSel ('Just "ghcOptInputScripts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg 'File))) :*: S1 ('MetaSel ('Just "ghcOptInputModules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR ModuleName))) :*: (S1 ('MetaSel ('Just "ghcOptOutputFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg 'File))) :*: S1 ('MetaSel ('Just "ghcOptOutputDynFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag FilePath))))) :*: (((S1 ('MetaSel ('Just "ghcOptSourcePathClear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptSourcePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg ('Dir Source))))) :*: (S1 ('MetaSel ('Just "ghcOptThisUnitId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag String)) :*: S1 ('MetaSel ('Just "ghcOptThisComponentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag ComponentId)))) :*: ((S1 ('MetaSel ('Just "ghcOptInstantiatedWith") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(ModuleName, OpenModule)]) :*: S1 ('MetaSel ('Just "ghcOptNoCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool))) :*: (S1 ('MetaSel ('Just "ghcOptPackageDBs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PackageDBStack) :*: S1 ('MetaSel ('Just "ghcOptPackages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (OpenUnitId, ModuleRenaming))))))) :*: ((((S1 ('MetaSel ('Just "ghcOptHideAllPackages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptWarnMissingHomeModules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool))) :*: (S1 ('MetaSel ('Just "ghcOptNoAutoLinkPackages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptLinkLibs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]))) :*: ((S1 ('MetaSel ('Just "ghcOptLinkLibPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg ('Dir Lib)))) :*: S1 ('MetaSel ('Just "ghcOptLinkOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])) :*: (S1 ('MetaSel ('Just "ghcOptLinkFrameworks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR String)) :*: S1 ('MetaSel ('Just "ghcOptLinkFrameworkDirs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg ('Dir Framework))))))) :*: (((S1 ('MetaSel ('Just "ghcOptLinkRts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptNoLink") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool))) :*: (S1 ('MetaSel ('Just "ghcOptLinkNoHsMain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptLinkModDefFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR FilePath)))) :*: ((S1 ('MetaSel ('Just "ghcOptCcOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Just "ghcOptCxxOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])) :*: (S1 ('MetaSel ('Just "ghcOptAsmOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: (S1 ('MetaSel ('Just "ghcOptCppOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Just "ghcOptCppIncludePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg ('Dir Include)))))))))) :*: (((((S1 ('MetaSel ('Just "ghcOptCppIncludes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg 'File))) :*: S1 ('MetaSel ('Just "ghcOptFfiIncludes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR FilePath))) :*: (S1 ('MetaSel ('Just "ghcOptCcProgram") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag FilePath)) :*: S1 ('MetaSel ('Just "ghcOptLanguage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Language)))) :*: ((S1 ('MetaSel ('Just "ghcOptExtensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR Extension)) :*: S1 ('MetaSel ('Just "ghcOptExtensionMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Extension (Maybe CompilerFlag)))) :*: (S1 ('MetaSel ('Just "ghcOptOptimisation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag GhcOptimisation)) :*: S1 ('MetaSel ('Just "ghcOptDebugInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag DebugInfoLevel))))) :*: (((S1 ('MetaSel ('Just "ghcOptProfilingMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptProfilingAuto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag GhcProfAuto))) :*: (S1 ('MetaSel ('Just "ghcOptSplitSections") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptSplitObjs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)))) :*: ((S1 ('MetaSel ('Just "ghcOptNumJobs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag ParStrat)) :*: S1 ('MetaSel ('Just "ghcOptHPCDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg ('Dir Mix))))) :*: (S1 ('MetaSel ('Just "ghcOptGHCiScripts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: S1 ('MetaSel ('Just "ghcOptHiSuffix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag String)))))) :*: ((((S1 ('MetaSel ('Just "ghcOptObjSuffix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag String)) :*: S1 ('MetaSel ('Just "ghcOptDynHiSuffix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag String))) :*: (S1 ('MetaSel ('Just "ghcOptDynObjSuffix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag String)) :*: S1 ('MetaSel ('Just "ghcOptHiDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg ('Dir Artifacts)))))) :*: ((S1 ('MetaSel ('Just "ghcOptHieDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg ('Dir Artifacts)))) :*: S1 ('MetaSel ('Just "ghcOptObjDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg ('Dir Artifacts))))) :*: (S1 ('MetaSel ('Just "ghcOptOutputDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg ('Dir Artifacts)))) :*: S1 ('MetaSel ('Just "ghcOptStubDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag (SymbolicPath Pkg ('Dir Artifacts))))))) :*: (((S1 ('MetaSel ('Just "ghcOptDynLinkMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag GhcDynLinkMode)) :*: S1 ('MetaSel ('Just "ghcOptStaticLib") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool))) :*: (S1 ('MetaSel ('Just "ghcOptShared") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)) :*: S1 ('MetaSel ('Just "ghcOptFPic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)))) :*: ((S1 ('MetaSel ('Just "ghcOptDylibName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag String)) :*: S1 ('MetaSel ('Just "ghcOptRPaths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR FilePath))) :*: (S1 ('MetaSel ('Just "ghcOptVerbosity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Verbosity)) :*: (S1 ('MetaSel ('Just "ghcOptExtraPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NubListR (SymbolicPath Pkg ('Dir Build)))) :*: S1 ('MetaSel ('Just "ghcOptCabal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Bool)))))))))) |
Constructors
GhcModeCompile | ghc -c |
GhcModeLink | ghc |
GhcModeMake | ghc --make |
GhcModeInteractive |
|
GhcModeAbiHash |
|
data GhcOptimisation Source #
Constructors
GhcNoOptimisation | -O0 |
GhcNormalOptimisation | -O |
GhcMaximumOptimisation | -O2 |
GhcSpecialOptimisation String | e.g. |
Instances
Show GhcOptimisation Source # | |
Defined in Distribution.Simple.Program.GHC Methods showsPrec :: Int -> GhcOptimisation -> ShowS # show :: GhcOptimisation -> String # showList :: [GhcOptimisation] -> ShowS # | |
Eq GhcOptimisation Source # | |
Defined in Distribution.Simple.Program.GHC Methods (==) :: GhcOptimisation -> GhcOptimisation -> Bool # (/=) :: GhcOptimisation -> GhcOptimisation -> Bool # |
data GhcDynLinkMode Source #
Constructors
GhcStaticOnly | -static |
GhcDynamicOnly | -dynamic |
GhcStaticAndDynamic | -static -dynamic-too |
Instances
Show GhcDynLinkMode Source # | |
Defined in Distribution.Simple.Program.GHC Methods showsPrec :: Int -> GhcDynLinkMode -> ShowS # show :: GhcDynLinkMode -> String # showList :: [GhcDynLinkMode] -> ShowS # | |
Eq GhcDynLinkMode Source # | |
Defined in Distribution.Simple.Program.GHC Methods (==) :: GhcDynLinkMode -> GhcDynLinkMode -> Bool # (/=) :: GhcDynLinkMode -> GhcDynLinkMode -> Bool # |
data GhcProfAuto Source #
Constructors
GhcProfAutoAll | -fprof-auto |
GhcProfAutoToplevel | -fprof-auto-top |
GhcProfAutoExported | -fprof-auto-exported |
GhcProfLate | @-fprof-late |
Instances
Show GhcProfAuto Source # | |
Defined in Distribution.Simple.Program.GHC Methods showsPrec :: Int -> GhcProfAuto -> ShowS # show :: GhcProfAuto -> String # showList :: [GhcProfAuto] -> ShowS # | |
Eq GhcProfAuto Source # | |
Defined in Distribution.Simple.Program.GHC |
ghcInvocation :: Verbosity -> ConfiguredProgram -> Compiler -> Platform -> Maybe (SymbolicPath CWD (Dir Pkg)) -> GhcOptions -> IO ProgramInvocation Source #
renderGhcOptions :: Compiler -> Platform -> GhcOptions -> [String] Source #
runGHC :: Verbosity -> ConfiguredProgram -> Compiler -> Platform -> Maybe (SymbolicPath CWD (Dir Pkg)) -> GhcOptions -> IO () Source #
packageDbArgsDb :: PackageDBStack -> [String] Source #
GHC >= 7.6 uses the '-package-db' flag. See https://gitlab.haskell.org/ghc/ghc/-/issues/5977.
normaliseGhcArgs :: Maybe Version -> PackageDescription -> [String] -> [String] Source #