{-# LANGUAGE RecordWildCards #-}
module GHC.Iface.Recomp.Flags (
fingerprintDynFlags
, fingerprintOptFlags
, fingerprintHpcFlags
) where
import GHC.Prelude
import GHC.Driver.Session
import GHC.Driver.Env
import GHC.Utils.Binary
import GHC.Unit.Module
import GHC.Types.Name
import GHC.Types.SafeHaskell
import GHC.Utils.Fingerprint
import GHC.Iface.Recomp.Binary
import GHC.Core.Opt.CallerCC ()
import GHC.Data.EnumSet as EnumSet
import System.FilePath (normalise)
fingerprintDynFlags :: HscEnv -> Module
-> (BinHandle -> Name -> IO ())
-> IO Fingerprint
fingerprintDynFlags :: HscEnv -> Module -> (BinHandle -> Name -> IO ()) -> IO Fingerprint
fingerprintDynFlags HscEnv
hsc_env Module
this_mod BinHandle -> Name -> IO ()
nameio =
let dflags :: DynFlags
dflags@DynFlags{Bool
Int
String
[Int]
[String]
[(String, String)]
[(ModuleName, String)]
[(ModuleName, Module)]
[CallerCcFilter]
[ModuleName]
[Option]
[IgnorePackageFlag]
[PackageDBFlag]
[PackageFlag]
[TrustFlag]
[OnOff Extension]
Maybe Int
Maybe String
Maybe (String, Int)
Maybe UnitId
Maybe BmiVersion
Maybe SseVersion
Maybe Language
Word
IORef Bool
IORef (Maybe CompilerInfo)
IORef (Maybe LinkerInfo)
IORef (ModuleEnv Int)
Ways
EnumSet Extension
EnumSet DumpFlag
EnumSet GeneralFlag
EnumSet WarningFlag
UnfoldingOpts
ModuleName
UnitId
OverridingBool
Platform
PlatformMisc
FileSettings
GhcNameVersion
ToolSettings
Backend
Scheme
Weights
SrcSpan
SafeHaskellMode
IntWithInf
DynLibLoader
FlushErr
FlushOut
GhcLink
GhcMode
IncludeSpecs
LlvmConfig
ProfAuto
RtsOptsEnabled
warningFlags :: DynFlags -> EnumSet WarningFlag
warnUnsafeOnLoc :: DynFlags -> SrcSpan
warnSafeOnLoc :: DynFlags -> SrcSpan
verbosity :: DynFlags -> Int
useUnicode :: DynFlags -> Bool
useColor :: DynFlags -> OverridingBool
uniqueIncrement :: DynFlags -> Int
unfoldingOpts :: DynFlags -> UnfoldingOpts
trustworthyOnLoc :: DynFlags -> SrcSpan
trustFlags :: DynFlags -> [TrustFlag]
toolSettings :: DynFlags -> ToolSettings
thOnLoc :: DynFlags -> SrcSpan
targetWays_ :: DynFlags -> Ways
stubDir :: DynFlags -> Maybe String
strictnessBefore :: DynFlags -> [Int]
sseVersion :: DynFlags -> Maybe SseVersion
splitInfo :: DynFlags -> Maybe (String, Int)
specConstrThreshold :: DynFlags -> Maybe Int
specConstrRecursive :: DynFlags -> Int
specConstrCount :: DynFlags -> Maybe Int
solverIterations :: DynFlags -> IntWithInf
simplTickFactor :: DynFlags -> Int
simplPhases :: DynFlags -> Int
safeInferred :: DynFlags -> Bool
safeInfer :: DynFlags -> Bool
safeHaskell :: DynFlags -> SafeHaskellMode
ruleCheck :: DynFlags -> Maybe String
rtsOptsSuggestions :: DynFlags -> Bool
rtsOptsEnabled :: DynFlags -> RtsOptsEnabled
rtsOpts :: DynFlags -> Maybe String
rtldInfo :: DynFlags -> IORef (Maybe LinkerInfo)
rtccInfo :: DynFlags -> IORef (Maybe CompilerInfo)
reverseErrors :: DynFlags -> Bool
refLevelHoleFits :: DynFlags -> Maybe Int
reductionDepth :: DynFlags -> IntWithInf
rawSettings :: DynFlags -> [(String, String)]
profAuto :: DynFlags -> ProfAuto
pprUserLength :: DynFlags -> Int
pprCols :: DynFlags -> Int
pluginPackageFlags :: DynFlags -> [PackageFlag]
pluginModNames :: DynFlags -> [ModuleName]
pluginModNameOpts :: DynFlags -> [(ModuleName, String)]
platformMisc :: DynFlags -> PlatformMisc
pkgTrustOnLoc :: DynFlags -> SrcSpan
parMakeCount :: DynFlags -> Maybe Int
packageFlags :: DynFlags -> [PackageFlag]
packageEnv :: DynFlags -> Maybe String
packageDBFlags :: DynFlags -> [PackageDBFlag]
overlapInstLoc :: DynFlags -> SrcSpan
outputHi :: DynFlags -> Maybe String
outputFile_ :: DynFlags -> Maybe String
optLevel :: DynFlags -> Int
objectSuf_ :: DynFlags -> String
objectDir :: DynFlags -> Maybe String
nextWrapperNum :: DynFlags -> IORef (ModuleEnv Int)
newDerivOnLoc :: DynFlags -> SrcSpan
maxWorkerArgs :: DynFlags -> Int
maxValidHoleFits :: DynFlags -> Maybe Int
maxUncoveredPatterns :: DynFlags -> Int
maxSimplIterations :: DynFlags -> Int
maxRelevantBinds :: DynFlags -> Maybe Int
maxRefHoleFits :: DynFlags -> Maybe Int
maxPmCheckModels :: DynFlags -> Int
maxInlineMemsetInsns :: DynFlags -> Int
maxInlineMemcpyInsns :: DynFlags -> Int
maxInlineAllocSize :: DynFlags -> Int
maxErrors :: DynFlags -> Maybe Int
mainModuleNameIs :: DynFlags -> ModuleName
mainFunIs :: DynFlags -> Maybe String
llvmConfig :: DynFlags -> LlvmConfig
liftLamsRecArgs :: DynFlags -> Maybe Int
liftLamsNonRecArgs :: DynFlags -> Maybe Int
liftLamsKnown :: DynFlags -> Bool
libraryPaths :: DynFlags -> [String]
liberateCaseThreshold :: DynFlags -> Maybe Int
ldInputs :: DynFlags -> [Option]
language :: DynFlags -> Maybe Language
interactivePrint :: DynFlags -> Maybe String
inlineCheck :: DynFlags -> Maybe String
initialUnique :: DynFlags -> Word
incoherentOnLoc :: DynFlags -> SrcSpan
includePaths :: DynFlags -> IncludeSpecs
importPaths :: DynFlags -> [String]
ignorePackageFlags :: DynFlags -> [IgnorePackageFlag]
hpcDir :: DynFlags -> String
homeUnitInstantiations_ :: DynFlags -> [(ModuleName, Module)]
homeUnitInstanceOf_ :: DynFlags -> Maybe UnitId
homeUnitId_ :: DynFlags -> UnitId
historySize :: DynFlags -> Int
hieSuf :: DynFlags -> String
hieDir :: DynFlags -> Maybe String
hiSuf_ :: DynFlags -> String
hiDir :: DynFlags -> Maybe String
hcSuf :: DynFlags -> String
haddockOptions :: DynFlags -> Maybe String
ghciScripts :: DynFlags -> [String]
ghciHistSize :: DynFlags -> Int
ghcVersionFile :: DynFlags -> Maybe String
ghcNameVersion :: DynFlags -> GhcNameVersion
ghcMode :: DynFlags -> GhcMode
ghcLink :: DynFlags -> GhcLink
ghcHeapSize :: DynFlags -> Maybe Int
generalFlags :: DynFlags -> EnumSet GeneralFlag
frontendPluginOpts :: DynFlags -> [String]
frameworkPaths :: DynFlags -> [String]
flushOut :: DynFlags -> FlushOut
flushErr :: DynFlags -> FlushErr
floatLamArgs :: DynFlags -> Maybe Int
fileSettings :: DynFlags -> FileSettings
fatalWarningFlags :: DynFlags -> EnumSet WarningFlag
extensions :: DynFlags -> [OnOff Extension]
extensionFlags :: DynFlags -> EnumSet Extension
enableTimeStats :: DynFlags -> Bool
dynamicTooFailed :: DynFlags -> IORef Bool
dynamicNow :: DynFlags -> Bool
dynOutputHi :: DynFlags -> Maybe String
dynOutputFile_ :: DynFlags -> Maybe String
dynObjectSuf_ :: DynFlags -> String
dynLibLoader :: DynFlags -> DynLibLoader
dynHiSuf_ :: DynFlags -> String
dylibInstallName :: DynFlags -> Maybe String
dumpPrefixForce :: DynFlags -> Maybe String
dumpPrefix :: DynFlags -> Maybe String
dumpFlags :: DynFlags -> EnumSet DumpFlag
dumpDir :: DynFlags -> Maybe String
deriveViaOnLoc :: DynFlags -> SrcSpan
depSuffixes :: DynFlags -> [String]
depMakefile :: DynFlags -> String
depIncludePkgDeps :: DynFlags -> Bool
depIncludeCppDeps :: DynFlags -> Bool
depExcludeMods :: DynFlags -> [ModuleName]
debugLevel :: DynFlags -> Int
colScheme :: DynFlags -> Scheme
cmmProcAlignment :: DynFlags -> Maybe Int
cmdlineFrameworks :: DynFlags -> [String]
cfgWeights :: DynFlags -> Weights
canUseColor :: DynFlags -> Bool
callerCcFilters :: DynFlags -> [CallerCcFilter]
bmiVersion :: DynFlags -> Maybe BmiVersion
binBlobThreshold :: DynFlags -> Word
backend :: DynFlags -> Backend
avx512pf :: DynFlags -> Bool
avx512f :: DynFlags -> Bool
avx512er :: DynFlags -> Bool
avx512cd :: DynFlags -> Bool
avx2 :: DynFlags -> Bool
avx :: DynFlags -> Bool
targetPlatform :: DynFlags -> Platform
cfgWeights :: Weights
uniqueIncrement :: Int
initialUnique :: Word
maxErrors :: Maybe Int
reverseErrors :: Bool
maxInlineMemsetInsns :: Int
maxInlineMemcpyInsns :: Int
maxInlineAllocSize :: Int
rtccInfo :: IORef (Maybe CompilerInfo)
rtldInfo :: IORef (Maybe LinkerInfo)
avx512pf :: Bool
avx512f :: Bool
avx512er :: Bool
avx512cd :: Bool
avx2 :: Bool
avx :: Bool
bmiVersion :: Maybe BmiVersion
sseVersion :: Maybe SseVersion
nextWrapperNum :: IORef (ModuleEnv Int)
interactivePrint :: Maybe String
callerCcFilters :: [CallerCcFilter]
profAuto :: ProfAuto
colScheme :: Scheme
canUseColor :: Bool
useColor :: OverridingBool
useUnicode :: Bool
pprCols :: Int
pprUserLength :: Int
ghciScripts :: [String]
haddockOptions :: Maybe String
ghcVersionFile :: Maybe String
flushErr :: FlushErr
flushOut :: FlushOut
ghciHistSize :: Int
maxWorkerArgs :: Int
unfoldingOpts :: UnfoldingOpts
extensionFlags :: EnumSet Extension
extensions :: [OnOff Extension]
trustworthyOnLoc :: SrcSpan
warnUnsafeOnLoc :: SrcSpan
warnSafeOnLoc :: SrcSpan
pkgTrustOnLoc :: SrcSpan
incoherentOnLoc :: SrcSpan
overlapInstLoc :: SrcSpan
deriveViaOnLoc :: SrcSpan
newDerivOnLoc :: SrcSpan
thOnLoc :: SrcSpan
safeInferred :: Bool
safeInfer :: Bool
safeHaskell :: SafeHaskellMode
language :: Maybe Language
fatalWarningFlags :: EnumSet WarningFlag
warningFlags :: EnumSet WarningFlag
generalFlags :: EnumSet GeneralFlag
dumpFlags :: EnumSet DumpFlag
packageEnv :: Maybe String
trustFlags :: [TrustFlag]
pluginPackageFlags :: [PackageFlag]
packageFlags :: [PackageFlag]
ignorePackageFlags :: [IgnorePackageFlag]
packageDBFlags :: [PackageDBFlag]
depSuffixes :: [String]
depExcludeMods :: [ModuleName]
depIncludeCppDeps :: Bool
depIncludePkgDeps :: Bool
depMakefile :: String
frontendPluginOpts :: [String]
pluginModNameOpts :: [(ModuleName, String)]
pluginModNames :: [ModuleName]
hpcDir :: String
rtsOptsSuggestions :: Bool
rtsOptsEnabled :: RtsOptsEnabled
rtsOpts :: Maybe String
cmdlineFrameworks :: [String]
frameworkPaths :: [String]
libraryPaths :: [String]
includePaths :: IncludeSpecs
ldInputs :: [Option]
dumpPrefixForce :: Maybe String
dumpPrefix :: Maybe String
dynamicNow :: Bool
dynLibLoader :: DynLibLoader
dynOutputHi :: Maybe String
outputHi :: Maybe String
dynOutputFile_ :: Maybe String
outputFile_ :: Maybe String
dynHiSuf_ :: String
dynObjectSuf_ :: String
dynamicTooFailed :: IORef Bool
hieSuf :: String
hiSuf_ :: String
hcSuf :: String
objectSuf_ :: String
dumpDir :: Maybe String
stubDir :: Maybe String
hieDir :: Maybe String
hiDir :: Maybe String
dylibInstallName :: Maybe String
objectDir :: Maybe String
splitInfo :: Maybe (String, Int)
targetWays_ :: Ways
homeUnitInstantiations_ :: [(ModuleName, Module)]
homeUnitInstanceOf_ :: Maybe UnitId
homeUnitId_ :: UnitId
solverIterations :: IntWithInf
reductionDepth :: IntWithInf
mainFunIs :: Maybe String
mainModuleNameIs :: ModuleName
importPaths :: [String]
historySize :: Int
cmmProcAlignment :: Maybe Int
liftLamsKnown :: Bool
liftLamsNonRecArgs :: Maybe Int
liftLamsRecArgs :: Maybe Int
floatLamArgs :: Maybe Int
liberateCaseThreshold :: Maybe Int
binBlobThreshold :: Word
specConstrRecursive :: Int
specConstrCount :: Maybe Int
specConstrThreshold :: Maybe Int
simplTickFactor :: Int
maxPmCheckModels :: Int
maxUncoveredPatterns :: Int
refLevelHoleFits :: Maybe Int
maxRefHoleFits :: Maybe Int
maxValidHoleFits :: Maybe Int
maxRelevantBinds :: Maybe Int
ghcHeapSize :: Maybe Int
enableTimeStats :: Bool
parMakeCount :: Maybe Int
strictnessBefore :: [Int]
inlineCheck :: Maybe String
ruleCheck :: Maybe String
maxSimplIterations :: Int
simplPhases :: Int
debugLevel :: Int
optLevel :: Int
verbosity :: Int
llvmConfig :: LlvmConfig
rawSettings :: [(String, String)]
platformMisc :: PlatformMisc
toolSettings :: ToolSettings
targetPlatform :: Platform
fileSettings :: FileSettings
ghcNameVersion :: GhcNameVersion
backend :: Backend
ghcLink :: GhcLink
ghcMode :: GhcMode
..} = HscEnv -> DynFlags
hsc_dflags HscEnv
hsc_env
mainis :: Maybe (Maybe String)
mainis = if HscEnv -> Module
mainModIs HscEnv
hsc_env forall a. Eq a => a -> a -> Bool
== Module
this_mod then forall a. a -> Maybe a
Just Maybe String
mainFunIs else forall a. Maybe a
Nothing
safeHs :: IfaceTrustInfo
safeHs = SafeHaskellMode -> IfaceTrustInfo
setSafeMode SafeHaskellMode
safeHaskell
lang :: (Maybe Int, [Int])
lang = (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a. Enum a => a -> Int
fromEnum Maybe Language
language,
forall a b. (a -> b) -> [a] -> [b]
map forall a. Enum a => a -> Int
fromEnum forall a b. (a -> b) -> a -> b
$ forall a. Enum a => EnumSet a -> [a]
EnumSet.toList EnumSet Extension
extensionFlags)
includePathsMinusImplicit :: IncludeSpecs
includePathsMinusImplicit = IncludeSpecs
includePaths { includePathsQuoteImplicit :: [String]
includePathsQuoteImplicit = [] }
cpp :: ([String], [String], ([String], Fingerprint))
cpp = ( forall a b. (a -> b) -> [a] -> [b]
map String -> String
normalise forall a b. (a -> b) -> a -> b
$ IncludeSpecs -> [String]
flattenIncludes IncludeSpecs
includePathsMinusImplicit
, DynFlags -> [String]
picPOpts DynFlags
dflags
, DynFlags -> ([String], Fingerprint)
opt_P_signature DynFlags
dflags)
paths :: [String]
paths = [ String
hcSuf ]
prof :: Int
prof = if DynFlags -> Bool
sccProfilingEnabled DynFlags
dflags then forall a. Enum a => a -> Int
fromEnum ProfAuto
profAuto else Int
0
ticky :: [Bool]
ticky =
forall a b. (a -> b) -> [a] -> [b]
map (GeneralFlag -> DynFlags -> Bool
`gopt` DynFlags
dflags) [GeneralFlag
Opt_Ticky, GeneralFlag
Opt_Ticky_Allocd, GeneralFlag
Opt_Ticky_LNE, GeneralFlag
Opt_Ticky_Dyn_Thunk]
flags :: ((Maybe (Maybe String), IfaceTrustInfo, (Maybe Int, [Int]),
([String], [String], ([String], Fingerprint))),
([String], Int, [Bool], Int, [CallerCcFilter]))
flags = ((Maybe (Maybe String)
mainis, IfaceTrustInfo
safeHs, (Maybe Int, [Int])
lang, ([String], [String], ([String], Fingerprint))
cpp), ([String]
paths, Int
prof, [Bool]
ticky, Int
debugLevel, [CallerCcFilter]
callerCcFilters))
in
forall a.
Binary a =>
(BinHandle -> Name -> IO ()) -> a -> IO Fingerprint
computeFingerprint BinHandle -> Name -> IO ()
nameio ((Maybe (Maybe String), IfaceTrustInfo, (Maybe Int, [Int]),
([String], [String], ([String], Fingerprint))),
([String], Int, [Bool], Int, [CallerCcFilter]))
flags
fingerprintOptFlags :: DynFlags
-> (BinHandle -> Name -> IO ())
-> IO Fingerprint
fingerprintOptFlags :: DynFlags -> (BinHandle -> Name -> IO ()) -> IO Fingerprint
fingerprintOptFlags DynFlags{Bool
Int
String
[Int]
[String]
[(String, String)]
[(ModuleName, String)]
[(ModuleName, Module)]
[CallerCcFilter]
[ModuleName]
[Option]
[IgnorePackageFlag]
[PackageDBFlag]
[PackageFlag]
[TrustFlag]
[OnOff Extension]
Maybe Int
Maybe String
Maybe (String, Int)
Maybe UnitId
Maybe BmiVersion
Maybe SseVersion
Maybe Language
Word
IORef Bool
IORef (Maybe CompilerInfo)
IORef (Maybe LinkerInfo)
IORef (ModuleEnv Int)
Ways
EnumSet Extension
EnumSet DumpFlag
EnumSet GeneralFlag
EnumSet WarningFlag
UnfoldingOpts
ModuleName
UnitId
OverridingBool
Platform
PlatformMisc
FileSettings
GhcNameVersion
ToolSettings
Backend
Scheme
Weights
SrcSpan
SafeHaskellMode
IntWithInf
DynLibLoader
FlushErr
FlushOut
GhcLink
GhcMode
IncludeSpecs
LlvmConfig
ProfAuto
RtsOptsEnabled
cfgWeights :: Weights
uniqueIncrement :: Int
initialUnique :: Word
maxErrors :: Maybe Int
reverseErrors :: Bool
maxInlineMemsetInsns :: Int
maxInlineMemcpyInsns :: Int
maxInlineAllocSize :: Int
rtccInfo :: IORef (Maybe CompilerInfo)
rtldInfo :: IORef (Maybe LinkerInfo)
avx512pf :: Bool
avx512f :: Bool
avx512er :: Bool
avx512cd :: Bool
avx2 :: Bool
avx :: Bool
bmiVersion :: Maybe BmiVersion
sseVersion :: Maybe SseVersion
nextWrapperNum :: IORef (ModuleEnv Int)
interactivePrint :: Maybe String
callerCcFilters :: [CallerCcFilter]
profAuto :: ProfAuto
colScheme :: Scheme
canUseColor :: Bool
useColor :: OverridingBool
useUnicode :: Bool
pprCols :: Int
pprUserLength :: Int
ghciScripts :: [String]
haddockOptions :: Maybe String
ghcVersionFile :: Maybe String
flushErr :: FlushErr
flushOut :: FlushOut
ghciHistSize :: Int
maxWorkerArgs :: Int
unfoldingOpts :: UnfoldingOpts
extensionFlags :: EnumSet Extension
extensions :: [OnOff Extension]
trustworthyOnLoc :: SrcSpan
warnUnsafeOnLoc :: SrcSpan
warnSafeOnLoc :: SrcSpan
pkgTrustOnLoc :: SrcSpan
incoherentOnLoc :: SrcSpan
overlapInstLoc :: SrcSpan
deriveViaOnLoc :: SrcSpan
newDerivOnLoc :: SrcSpan
thOnLoc :: SrcSpan
safeInferred :: Bool
safeInfer :: Bool
safeHaskell :: SafeHaskellMode
language :: Maybe Language
fatalWarningFlags :: EnumSet WarningFlag
warningFlags :: EnumSet WarningFlag
generalFlags :: EnumSet GeneralFlag
dumpFlags :: EnumSet DumpFlag
packageEnv :: Maybe String
trustFlags :: [TrustFlag]
pluginPackageFlags :: [PackageFlag]
packageFlags :: [PackageFlag]
ignorePackageFlags :: [IgnorePackageFlag]
packageDBFlags :: [PackageDBFlag]
depSuffixes :: [String]
depExcludeMods :: [ModuleName]
depIncludeCppDeps :: Bool
depIncludePkgDeps :: Bool
depMakefile :: String
frontendPluginOpts :: [String]
pluginModNameOpts :: [(ModuleName, String)]
pluginModNames :: [ModuleName]
hpcDir :: String
rtsOptsSuggestions :: Bool
rtsOptsEnabled :: RtsOptsEnabled
rtsOpts :: Maybe String
cmdlineFrameworks :: [String]
frameworkPaths :: [String]
libraryPaths :: [String]
includePaths :: IncludeSpecs
ldInputs :: [Option]
dumpPrefixForce :: Maybe String
dumpPrefix :: Maybe String
dynamicNow :: Bool
dynLibLoader :: DynLibLoader
dynOutputHi :: Maybe String
outputHi :: Maybe String
dynOutputFile_ :: Maybe String
outputFile_ :: Maybe String
dynHiSuf_ :: String
dynObjectSuf_ :: String
dynamicTooFailed :: IORef Bool
hieSuf :: String
hiSuf_ :: String
hcSuf :: String
objectSuf_ :: String
dumpDir :: Maybe String
stubDir :: Maybe String
hieDir :: Maybe String
hiDir :: Maybe String
dylibInstallName :: Maybe String
objectDir :: Maybe String
splitInfo :: Maybe (String, Int)
targetWays_ :: Ways
homeUnitInstantiations_ :: [(ModuleName, Module)]
homeUnitInstanceOf_ :: Maybe UnitId
homeUnitId_ :: UnitId
solverIterations :: IntWithInf
reductionDepth :: IntWithInf
mainFunIs :: Maybe String
mainModuleNameIs :: ModuleName
importPaths :: [String]
historySize :: Int
cmmProcAlignment :: Maybe Int
liftLamsKnown :: Bool
liftLamsNonRecArgs :: Maybe Int
liftLamsRecArgs :: Maybe Int
floatLamArgs :: Maybe Int
liberateCaseThreshold :: Maybe Int
binBlobThreshold :: Word
specConstrRecursive :: Int
specConstrCount :: Maybe Int
specConstrThreshold :: Maybe Int
simplTickFactor :: Int
maxPmCheckModels :: Int
maxUncoveredPatterns :: Int
refLevelHoleFits :: Maybe Int
maxRefHoleFits :: Maybe Int
maxValidHoleFits :: Maybe Int
maxRelevantBinds :: Maybe Int
ghcHeapSize :: Maybe Int
enableTimeStats :: Bool
parMakeCount :: Maybe Int
strictnessBefore :: [Int]
inlineCheck :: Maybe String
ruleCheck :: Maybe String
maxSimplIterations :: Int
simplPhases :: Int
debugLevel :: Int
optLevel :: Int
verbosity :: Int
llvmConfig :: LlvmConfig
rawSettings :: [(String, String)]
platformMisc :: PlatformMisc
toolSettings :: ToolSettings
targetPlatform :: Platform
fileSettings :: FileSettings
ghcNameVersion :: GhcNameVersion
backend :: Backend
ghcLink :: GhcLink
ghcMode :: GhcMode
warningFlags :: DynFlags -> EnumSet WarningFlag
warnUnsafeOnLoc :: DynFlags -> SrcSpan
warnSafeOnLoc :: DynFlags -> SrcSpan
verbosity :: DynFlags -> Int
useUnicode :: DynFlags -> Bool
useColor :: DynFlags -> OverridingBool
uniqueIncrement :: DynFlags -> Int
unfoldingOpts :: DynFlags -> UnfoldingOpts
trustworthyOnLoc :: DynFlags -> SrcSpan
trustFlags :: DynFlags -> [TrustFlag]
toolSettings :: DynFlags -> ToolSettings
thOnLoc :: DynFlags -> SrcSpan
targetWays_ :: DynFlags -> Ways
stubDir :: DynFlags -> Maybe String
strictnessBefore :: DynFlags -> [Int]
sseVersion :: DynFlags -> Maybe SseVersion
splitInfo :: DynFlags -> Maybe (String, Int)
specConstrThreshold :: DynFlags -> Maybe Int
specConstrRecursive :: DynFlags -> Int
specConstrCount :: DynFlags -> Maybe Int
solverIterations :: DynFlags -> IntWithInf
simplTickFactor :: DynFlags -> Int
simplPhases :: DynFlags -> Int
safeInferred :: DynFlags -> Bool
safeInfer :: DynFlags -> Bool
safeHaskell :: DynFlags -> SafeHaskellMode
ruleCheck :: DynFlags -> Maybe String
rtsOptsSuggestions :: DynFlags -> Bool
rtsOptsEnabled :: DynFlags -> RtsOptsEnabled
rtsOpts :: DynFlags -> Maybe String
rtldInfo :: DynFlags -> IORef (Maybe LinkerInfo)
rtccInfo :: DynFlags -> IORef (Maybe CompilerInfo)
reverseErrors :: DynFlags -> Bool
refLevelHoleFits :: DynFlags -> Maybe Int
reductionDepth :: DynFlags -> IntWithInf
rawSettings :: DynFlags -> [(String, String)]
profAuto :: DynFlags -> ProfAuto
pprUserLength :: DynFlags -> Int
pprCols :: DynFlags -> Int
pluginPackageFlags :: DynFlags -> [PackageFlag]
pluginModNames :: DynFlags -> [ModuleName]
pluginModNameOpts :: DynFlags -> [(ModuleName, String)]
platformMisc :: DynFlags -> PlatformMisc
pkgTrustOnLoc :: DynFlags -> SrcSpan
parMakeCount :: DynFlags -> Maybe Int
packageFlags :: DynFlags -> [PackageFlag]
packageEnv :: DynFlags -> Maybe String
packageDBFlags :: DynFlags -> [PackageDBFlag]
overlapInstLoc :: DynFlags -> SrcSpan
outputHi :: DynFlags -> Maybe String
outputFile_ :: DynFlags -> Maybe String
optLevel :: DynFlags -> Int
objectSuf_ :: DynFlags -> String
objectDir :: DynFlags -> Maybe String
nextWrapperNum :: DynFlags -> IORef (ModuleEnv Int)
newDerivOnLoc :: DynFlags -> SrcSpan
maxWorkerArgs :: DynFlags -> Int
maxValidHoleFits :: DynFlags -> Maybe Int
maxUncoveredPatterns :: DynFlags -> Int
maxSimplIterations :: DynFlags -> Int
maxRelevantBinds :: DynFlags -> Maybe Int
maxRefHoleFits :: DynFlags -> Maybe Int
maxPmCheckModels :: DynFlags -> Int
maxInlineMemsetInsns :: DynFlags -> Int
maxInlineMemcpyInsns :: DynFlags -> Int
maxInlineAllocSize :: DynFlags -> Int
maxErrors :: DynFlags -> Maybe Int
mainModuleNameIs :: DynFlags -> ModuleName
mainFunIs :: DynFlags -> Maybe String
llvmConfig :: DynFlags -> LlvmConfig
liftLamsRecArgs :: DynFlags -> Maybe Int
liftLamsNonRecArgs :: DynFlags -> Maybe Int
liftLamsKnown :: DynFlags -> Bool
libraryPaths :: DynFlags -> [String]
liberateCaseThreshold :: DynFlags -> Maybe Int
ldInputs :: DynFlags -> [Option]
language :: DynFlags -> Maybe Language
interactivePrint :: DynFlags -> Maybe String
inlineCheck :: DynFlags -> Maybe String
initialUnique :: DynFlags -> Word
incoherentOnLoc :: DynFlags -> SrcSpan
includePaths :: DynFlags -> IncludeSpecs
importPaths :: DynFlags -> [String]
ignorePackageFlags :: DynFlags -> [IgnorePackageFlag]
hpcDir :: DynFlags -> String
homeUnitInstantiations_ :: DynFlags -> [(ModuleName, Module)]
homeUnitInstanceOf_ :: DynFlags -> Maybe UnitId
homeUnitId_ :: DynFlags -> UnitId
historySize :: DynFlags -> Int
hieSuf :: DynFlags -> String
hieDir :: DynFlags -> Maybe String
hiSuf_ :: DynFlags -> String
hiDir :: DynFlags -> Maybe String
hcSuf :: DynFlags -> String
haddockOptions :: DynFlags -> Maybe String
ghciScripts :: DynFlags -> [String]
ghciHistSize :: DynFlags -> Int
ghcVersionFile :: DynFlags -> Maybe String
ghcNameVersion :: DynFlags -> GhcNameVersion
ghcMode :: DynFlags -> GhcMode
ghcLink :: DynFlags -> GhcLink
ghcHeapSize :: DynFlags -> Maybe Int
generalFlags :: DynFlags -> EnumSet GeneralFlag
frontendPluginOpts :: DynFlags -> [String]
frameworkPaths :: DynFlags -> [String]
flushOut :: DynFlags -> FlushOut
flushErr :: DynFlags -> FlushErr
floatLamArgs :: DynFlags -> Maybe Int
fileSettings :: DynFlags -> FileSettings
fatalWarningFlags :: DynFlags -> EnumSet WarningFlag
extensions :: DynFlags -> [OnOff Extension]
extensionFlags :: DynFlags -> EnumSet Extension
enableTimeStats :: DynFlags -> Bool
dynamicTooFailed :: DynFlags -> IORef Bool
dynamicNow :: DynFlags -> Bool
dynOutputHi :: DynFlags -> Maybe String
dynOutputFile_ :: DynFlags -> Maybe String
dynObjectSuf_ :: DynFlags -> String
dynLibLoader :: DynFlags -> DynLibLoader
dynHiSuf_ :: DynFlags -> String
dylibInstallName :: DynFlags -> Maybe String
dumpPrefixForce :: DynFlags -> Maybe String
dumpPrefix :: DynFlags -> Maybe String
dumpFlags :: DynFlags -> EnumSet DumpFlag
dumpDir :: DynFlags -> Maybe String
deriveViaOnLoc :: DynFlags -> SrcSpan
depSuffixes :: DynFlags -> [String]
depMakefile :: DynFlags -> String
depIncludePkgDeps :: DynFlags -> Bool
depIncludeCppDeps :: DynFlags -> Bool
depExcludeMods :: DynFlags -> [ModuleName]
debugLevel :: DynFlags -> Int
colScheme :: DynFlags -> Scheme
cmmProcAlignment :: DynFlags -> Maybe Int
cmdlineFrameworks :: DynFlags -> [String]
cfgWeights :: DynFlags -> Weights
canUseColor :: DynFlags -> Bool
callerCcFilters :: DynFlags -> [CallerCcFilter]
bmiVersion :: DynFlags -> Maybe BmiVersion
binBlobThreshold :: DynFlags -> Word
backend :: DynFlags -> Backend
avx512pf :: DynFlags -> Bool
avx512f :: DynFlags -> Bool
avx512er :: DynFlags -> Bool
avx512cd :: DynFlags -> Bool
avx2 :: DynFlags -> Bool
avx :: DynFlags -> Bool
targetPlatform :: DynFlags -> Platform
..} BinHandle -> Name -> IO ()
nameio =
let
opt_flags :: [Int]
opt_flags = forall a b. (a -> b) -> [a] -> [b]
map forall a. Enum a => a -> Int
fromEnum forall a b. (a -> b) -> a -> b
$ forall a. (a -> Bool) -> [a] -> [a]
filter (forall a. Enum a => a -> EnumSet a -> Bool
`EnumSet.member` EnumSet GeneralFlag
optimisationFlags)
(forall a. Enum a => EnumSet a -> [a]
EnumSet.toList EnumSet GeneralFlag
generalFlags)
in forall a.
Binary a =>
(BinHandle -> Name -> IO ()) -> a -> IO Fingerprint
computeFingerprint BinHandle -> Name -> IO ()
nameio [Int]
opt_flags
fingerprintHpcFlags :: DynFlags
-> (BinHandle -> Name -> IO ())
-> IO Fingerprint
fingerprintHpcFlags :: DynFlags -> (BinHandle -> Name -> IO ()) -> IO Fingerprint
fingerprintHpcFlags dflags :: DynFlags
dflags@DynFlags{Bool
Int
String
[Int]
[String]
[(String, String)]
[(ModuleName, String)]
[(ModuleName, Module)]
[CallerCcFilter]
[ModuleName]
[Option]
[IgnorePackageFlag]
[PackageDBFlag]
[PackageFlag]
[TrustFlag]
[OnOff Extension]
Maybe Int
Maybe String
Maybe (String, Int)
Maybe UnitId
Maybe BmiVersion
Maybe SseVersion
Maybe Language
Word
IORef Bool
IORef (Maybe CompilerInfo)
IORef (Maybe LinkerInfo)
IORef (ModuleEnv Int)
Ways
EnumSet Extension
EnumSet DumpFlag
EnumSet GeneralFlag
EnumSet WarningFlag
UnfoldingOpts
ModuleName
UnitId
OverridingBool
Platform
PlatformMisc
FileSettings
GhcNameVersion
ToolSettings
Backend
Scheme
Weights
SrcSpan
SafeHaskellMode
IntWithInf
DynLibLoader
FlushErr
FlushOut
GhcLink
GhcMode
IncludeSpecs
LlvmConfig
ProfAuto
RtsOptsEnabled
cfgWeights :: Weights
uniqueIncrement :: Int
initialUnique :: Word
maxErrors :: Maybe Int
reverseErrors :: Bool
maxInlineMemsetInsns :: Int
maxInlineMemcpyInsns :: Int
maxInlineAllocSize :: Int
rtccInfo :: IORef (Maybe CompilerInfo)
rtldInfo :: IORef (Maybe LinkerInfo)
avx512pf :: Bool
avx512f :: Bool
avx512er :: Bool
avx512cd :: Bool
avx2 :: Bool
avx :: Bool
bmiVersion :: Maybe BmiVersion
sseVersion :: Maybe SseVersion
nextWrapperNum :: IORef (ModuleEnv Int)
interactivePrint :: Maybe String
callerCcFilters :: [CallerCcFilter]
profAuto :: ProfAuto
colScheme :: Scheme
canUseColor :: Bool
useColor :: OverridingBool
useUnicode :: Bool
pprCols :: Int
pprUserLength :: Int
ghciScripts :: [String]
haddockOptions :: Maybe String
ghcVersionFile :: Maybe String
flushErr :: FlushErr
flushOut :: FlushOut
ghciHistSize :: Int
maxWorkerArgs :: Int
unfoldingOpts :: UnfoldingOpts
extensionFlags :: EnumSet Extension
extensions :: [OnOff Extension]
trustworthyOnLoc :: SrcSpan
warnUnsafeOnLoc :: SrcSpan
warnSafeOnLoc :: SrcSpan
pkgTrustOnLoc :: SrcSpan
incoherentOnLoc :: SrcSpan
overlapInstLoc :: SrcSpan
deriveViaOnLoc :: SrcSpan
newDerivOnLoc :: SrcSpan
thOnLoc :: SrcSpan
safeInferred :: Bool
safeInfer :: Bool
safeHaskell :: SafeHaskellMode
language :: Maybe Language
fatalWarningFlags :: EnumSet WarningFlag
warningFlags :: EnumSet WarningFlag
generalFlags :: EnumSet GeneralFlag
dumpFlags :: EnumSet DumpFlag
packageEnv :: Maybe String
trustFlags :: [TrustFlag]
pluginPackageFlags :: [PackageFlag]
packageFlags :: [PackageFlag]
ignorePackageFlags :: [IgnorePackageFlag]
packageDBFlags :: [PackageDBFlag]
depSuffixes :: [String]
depExcludeMods :: [ModuleName]
depIncludeCppDeps :: Bool
depIncludePkgDeps :: Bool
depMakefile :: String
frontendPluginOpts :: [String]
pluginModNameOpts :: [(ModuleName, String)]
pluginModNames :: [ModuleName]
hpcDir :: String
rtsOptsSuggestions :: Bool
rtsOptsEnabled :: RtsOptsEnabled
rtsOpts :: Maybe String
cmdlineFrameworks :: [String]
frameworkPaths :: [String]
libraryPaths :: [String]
includePaths :: IncludeSpecs
ldInputs :: [Option]
dumpPrefixForce :: Maybe String
dumpPrefix :: Maybe String
dynamicNow :: Bool
dynLibLoader :: DynLibLoader
dynOutputHi :: Maybe String
outputHi :: Maybe String
dynOutputFile_ :: Maybe String
outputFile_ :: Maybe String
dynHiSuf_ :: String
dynObjectSuf_ :: String
dynamicTooFailed :: IORef Bool
hieSuf :: String
hiSuf_ :: String
hcSuf :: String
objectSuf_ :: String
dumpDir :: Maybe String
stubDir :: Maybe String
hieDir :: Maybe String
hiDir :: Maybe String
dylibInstallName :: Maybe String
objectDir :: Maybe String
splitInfo :: Maybe (String, Int)
targetWays_ :: Ways
homeUnitInstantiations_ :: [(ModuleName, Module)]
homeUnitInstanceOf_ :: Maybe UnitId
homeUnitId_ :: UnitId
solverIterations :: IntWithInf
reductionDepth :: IntWithInf
mainFunIs :: Maybe String
mainModuleNameIs :: ModuleName
importPaths :: [String]
historySize :: Int
cmmProcAlignment :: Maybe Int
liftLamsKnown :: Bool
liftLamsNonRecArgs :: Maybe Int
liftLamsRecArgs :: Maybe Int
floatLamArgs :: Maybe Int
liberateCaseThreshold :: Maybe Int
binBlobThreshold :: Word
specConstrRecursive :: Int
specConstrCount :: Maybe Int
specConstrThreshold :: Maybe Int
simplTickFactor :: Int
maxPmCheckModels :: Int
maxUncoveredPatterns :: Int
refLevelHoleFits :: Maybe Int
maxRefHoleFits :: Maybe Int
maxValidHoleFits :: Maybe Int
maxRelevantBinds :: Maybe Int
ghcHeapSize :: Maybe Int
enableTimeStats :: Bool
parMakeCount :: Maybe Int
strictnessBefore :: [Int]
inlineCheck :: Maybe String
ruleCheck :: Maybe String
maxSimplIterations :: Int
simplPhases :: Int
debugLevel :: Int
optLevel :: Int
verbosity :: Int
llvmConfig :: LlvmConfig
rawSettings :: [(String, String)]
platformMisc :: PlatformMisc
toolSettings :: ToolSettings
targetPlatform :: Platform
fileSettings :: FileSettings
ghcNameVersion :: GhcNameVersion
backend :: Backend
ghcLink :: GhcLink
ghcMode :: GhcMode
warningFlags :: DynFlags -> EnumSet WarningFlag
warnUnsafeOnLoc :: DynFlags -> SrcSpan
warnSafeOnLoc :: DynFlags -> SrcSpan
verbosity :: DynFlags -> Int
useUnicode :: DynFlags -> Bool
useColor :: DynFlags -> OverridingBool
uniqueIncrement :: DynFlags -> Int
unfoldingOpts :: DynFlags -> UnfoldingOpts
trustworthyOnLoc :: DynFlags -> SrcSpan
trustFlags :: DynFlags -> [TrustFlag]
toolSettings :: DynFlags -> ToolSettings
thOnLoc :: DynFlags -> SrcSpan
targetWays_ :: DynFlags -> Ways
stubDir :: DynFlags -> Maybe String
strictnessBefore :: DynFlags -> [Int]
sseVersion :: DynFlags -> Maybe SseVersion
splitInfo :: DynFlags -> Maybe (String, Int)
specConstrThreshold :: DynFlags -> Maybe Int
specConstrRecursive :: DynFlags -> Int
specConstrCount :: DynFlags -> Maybe Int
solverIterations :: DynFlags -> IntWithInf
simplTickFactor :: DynFlags -> Int
simplPhases :: DynFlags -> Int
safeInferred :: DynFlags -> Bool
safeInfer :: DynFlags -> Bool
safeHaskell :: DynFlags -> SafeHaskellMode
ruleCheck :: DynFlags -> Maybe String
rtsOptsSuggestions :: DynFlags -> Bool
rtsOptsEnabled :: DynFlags -> RtsOptsEnabled
rtsOpts :: DynFlags -> Maybe String
rtldInfo :: DynFlags -> IORef (Maybe LinkerInfo)
rtccInfo :: DynFlags -> IORef (Maybe CompilerInfo)
reverseErrors :: DynFlags -> Bool
refLevelHoleFits :: DynFlags -> Maybe Int
reductionDepth :: DynFlags -> IntWithInf
rawSettings :: DynFlags -> [(String, String)]
profAuto :: DynFlags -> ProfAuto
pprUserLength :: DynFlags -> Int
pprCols :: DynFlags -> Int
pluginPackageFlags :: DynFlags -> [PackageFlag]
pluginModNames :: DynFlags -> [ModuleName]
pluginModNameOpts :: DynFlags -> [(ModuleName, String)]
platformMisc :: DynFlags -> PlatformMisc
pkgTrustOnLoc :: DynFlags -> SrcSpan
parMakeCount :: DynFlags -> Maybe Int
packageFlags :: DynFlags -> [PackageFlag]
packageEnv :: DynFlags -> Maybe String
packageDBFlags :: DynFlags -> [PackageDBFlag]
overlapInstLoc :: DynFlags -> SrcSpan
outputHi :: DynFlags -> Maybe String
outputFile_ :: DynFlags -> Maybe String
optLevel :: DynFlags -> Int
objectSuf_ :: DynFlags -> String
objectDir :: DynFlags -> Maybe String
nextWrapperNum :: DynFlags -> IORef (ModuleEnv Int)
newDerivOnLoc :: DynFlags -> SrcSpan
maxWorkerArgs :: DynFlags -> Int
maxValidHoleFits :: DynFlags -> Maybe Int
maxUncoveredPatterns :: DynFlags -> Int
maxSimplIterations :: DynFlags -> Int
maxRelevantBinds :: DynFlags -> Maybe Int
maxRefHoleFits :: DynFlags -> Maybe Int
maxPmCheckModels :: DynFlags -> Int
maxInlineMemsetInsns :: DynFlags -> Int
maxInlineMemcpyInsns :: DynFlags -> Int
maxInlineAllocSize :: DynFlags -> Int
maxErrors :: DynFlags -> Maybe Int
mainModuleNameIs :: DynFlags -> ModuleName
mainFunIs :: DynFlags -> Maybe String
llvmConfig :: DynFlags -> LlvmConfig
liftLamsRecArgs :: DynFlags -> Maybe Int
liftLamsNonRecArgs :: DynFlags -> Maybe Int
liftLamsKnown :: DynFlags -> Bool
libraryPaths :: DynFlags -> [String]
liberateCaseThreshold :: DynFlags -> Maybe Int
ldInputs :: DynFlags -> [Option]
language :: DynFlags -> Maybe Language
interactivePrint :: DynFlags -> Maybe String
inlineCheck :: DynFlags -> Maybe String
initialUnique :: DynFlags -> Word
incoherentOnLoc :: DynFlags -> SrcSpan
includePaths :: DynFlags -> IncludeSpecs
importPaths :: DynFlags -> [String]
ignorePackageFlags :: DynFlags -> [IgnorePackageFlag]
hpcDir :: DynFlags -> String
homeUnitInstantiations_ :: DynFlags -> [(ModuleName, Module)]
homeUnitInstanceOf_ :: DynFlags -> Maybe UnitId
homeUnitId_ :: DynFlags -> UnitId
historySize :: DynFlags -> Int
hieSuf :: DynFlags -> String
hieDir :: DynFlags -> Maybe String
hiSuf_ :: DynFlags -> String
hiDir :: DynFlags -> Maybe String
hcSuf :: DynFlags -> String
haddockOptions :: DynFlags -> Maybe String
ghciScripts :: DynFlags -> [String]
ghciHistSize :: DynFlags -> Int
ghcVersionFile :: DynFlags -> Maybe String
ghcNameVersion :: DynFlags -> GhcNameVersion
ghcMode :: DynFlags -> GhcMode
ghcLink :: DynFlags -> GhcLink
ghcHeapSize :: DynFlags -> Maybe Int
generalFlags :: DynFlags -> EnumSet GeneralFlag
frontendPluginOpts :: DynFlags -> [String]
frameworkPaths :: DynFlags -> [String]
flushOut :: DynFlags -> FlushOut
flushErr :: DynFlags -> FlushErr
floatLamArgs :: DynFlags -> Maybe Int
fileSettings :: DynFlags -> FileSettings
fatalWarningFlags :: DynFlags -> EnumSet WarningFlag
extensions :: DynFlags -> [OnOff Extension]
extensionFlags :: DynFlags -> EnumSet Extension
enableTimeStats :: DynFlags -> Bool
dynamicTooFailed :: DynFlags -> IORef Bool
dynamicNow :: DynFlags -> Bool
dynOutputHi :: DynFlags -> Maybe String
dynOutputFile_ :: DynFlags -> Maybe String
dynObjectSuf_ :: DynFlags -> String
dynLibLoader :: DynFlags -> DynLibLoader
dynHiSuf_ :: DynFlags -> String
dylibInstallName :: DynFlags -> Maybe String
dumpPrefixForce :: DynFlags -> Maybe String
dumpPrefix :: DynFlags -> Maybe String
dumpFlags :: DynFlags -> EnumSet DumpFlag
dumpDir :: DynFlags -> Maybe String
deriveViaOnLoc :: DynFlags -> SrcSpan
depSuffixes :: DynFlags -> [String]
depMakefile :: DynFlags -> String
depIncludePkgDeps :: DynFlags -> Bool
depIncludeCppDeps :: DynFlags -> Bool
depExcludeMods :: DynFlags -> [ModuleName]
debugLevel :: DynFlags -> Int
colScheme :: DynFlags -> Scheme
cmmProcAlignment :: DynFlags -> Maybe Int
cmdlineFrameworks :: DynFlags -> [String]
cfgWeights :: DynFlags -> Weights
canUseColor :: DynFlags -> Bool
callerCcFilters :: DynFlags -> [CallerCcFilter]
bmiVersion :: DynFlags -> Maybe BmiVersion
binBlobThreshold :: DynFlags -> Word
backend :: DynFlags -> Backend
avx512pf :: DynFlags -> Bool
avx512f :: DynFlags -> Bool
avx512er :: DynFlags -> Bool
avx512cd :: DynFlags -> Bool
avx2 :: DynFlags -> Bool
avx :: DynFlags -> Bool
targetPlatform :: DynFlags -> Platform
..} BinHandle -> Name -> IO ()
nameio =
let
hpc :: Maybe String
hpc = if GeneralFlag -> DynFlags -> Bool
gopt GeneralFlag
Opt_Hpc DynFlags
dflags then forall a. a -> Maybe a
Just String
hpcDir else forall a. Maybe a
Nothing
in forall a.
Binary a =>
(BinHandle -> Name -> IO ()) -> a -> IO Fingerprint
computeFingerprint BinHandle -> Name -> IO ()
nameio Maybe String
hpc