stack-1.4.0: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Types.Build

Description

Build-specific types.

Synopsis

- data StackBuildException
  - = Couldn'tFindPkgId PackageName
  - | CompilerVersionMismatch (Maybe (CompilerVersion, Arch)) (CompilerVersion, Arch) GHCVariant CompilerBuild VersionCheck (Maybe (Path Abs File)) Text
  - | Couldn'tParseTargets [Text]
  - | UnknownTargets (Set PackageName) (Map PackageName Version) (Path Abs File)
  - | TestSuiteFailure PackageIdentifier (Map Text (Maybe ExitCode)) (Maybe (Path Abs File)) ByteString
  - | TestSuiteTypeUnsupported TestSuiteInterface
  - | ConstructPlanFailed String
  - | CabalExitedUnsuccessfully ExitCode PackageIdentifier (Path Abs File) [String] (Maybe (Path Abs File)) [Text]
  - | ExecutionFailure [SomeException]
  - | LocalPackageDoesn'tMatchTarget PackageName Version Version
  - | NoSetupHsFound (Path Abs Dir)
  - | InvalidFlagSpecification (Set UnusedFlags)
  - | TargetParseException [Text]
  - | DuplicateLocalPackageNames [(PackageName, [Path Abs Dir])]
  - | SolverGiveUp String
  - | SolverMissingCabalInstall
  - | SomeTargetsNotBuildable [(PackageName, NamedComponent)]
  - | TestSuiteExeMissing Bool String String String
  - | CabalCopyFailed Bool String
  - | LocalPackagesPresent [PackageIdentifier]
- data FlagSource
  - = FSCommandLine
  - | FSStackYaml
- data UnusedFlags
  - = UFNoPackage FlagSource PackageName
  - | UFFlagsNotDefined FlagSource Package (Set FlagName)
  - | UFSnapshot PackageName
- data InstallLocation
  - = Snap
  - | Local
- data ModTime
- modTime :: UTCTime -> ModTime
- data Installed
  - = Library PackageIdentifier GhcPkgId
  - | Executable PackageIdentifier
- class PackageInstallInfo a where
- data Task = Task {
  - taskProvides :: !PackageIdentifier
  - taskType :: !TaskType
  - taskConfigOpts :: !TaskConfigOpts
  - taskPresent :: !(Map PackageIdentifier GhcPkgId)
  - taskAllInOne :: !Bool
  }
- taskLocation :: Task -> InstallLocation
- data LocalPackage = LocalPackage {
  - lpPackage :: !Package
  - lpComponents :: !(Set NamedComponent)
  - lpUnbuildable :: !(Set NamedComponent)
  - lpWanted :: !Bool
  - lpTestDeps :: !(Map PackageName VersionRange)
  - lpBenchDeps :: !(Map PackageName VersionRange)
  - lpTestBench :: !(Maybe Package)
  - lpDir :: !(Path Abs Dir)
  - lpCabalFile :: !(Path Abs File)
  - lpForceDirty :: !Bool
  - lpDirtyFiles :: !(Maybe (Set FilePath))
  - lpNewBuildCache :: !(Map FilePath FileCacheInfo)
  - lpFiles :: !(Set (Path Abs File))
  }
- data BaseConfigOpts = BaseConfigOpts {
  - bcoSnapDB :: !(Path Abs Dir)
  - bcoLocalDB :: !(Path Abs Dir)
  - bcoSnapInstallRoot :: !(Path Abs Dir)
  - bcoLocalInstallRoot :: !(Path Abs Dir)
  - bcoBuildOpts :: !BuildOpts
  - bcoBuildOptsCLI :: !BuildOptsCLI
  - bcoExtraDBs :: ![Path Abs Dir]
  }
- data Plan = Plan {
  - planTasks :: !(Map PackageName Task)
  - planFinals :: !(Map PackageName Task)
  - planUnregisterLocal :: !(Map GhcPkgId (PackageIdentifier, Text))
  - planInstallExes :: !(Map Text InstallLocation)
  }
- data TestOpts = TestOpts {
  - toRerunTests :: !Bool
  - toAdditionalArgs :: ![String]
  - toCoverage :: !Bool
  - toDisableRun :: !Bool
  }
- data BenchmarkOpts = BenchmarkOpts {
  - beoAdditionalArgs :: !(Maybe String)
  - beoDisableRun :: !Bool
  }
- data FileWatchOpts
  - = NoFileWatch
  - | FileWatch
  - | FileWatchPoll
- data BuildOpts = BuildOpts {
  - boptsLibProfile :: !Bool
  - boptsExeProfile :: !Bool
  - boptsLibStrip :: !Bool
  - boptsExeStrip :: !Bool
  - boptsHaddock :: !Bool
  - boptsHaddockOpts :: !HaddockOpts
  - boptsOpenHaddocks :: !Bool
  - boptsHaddockDeps :: !(Maybe Bool)
  - boptsHaddockInternal :: !Bool
  - boptsInstallExes :: !Bool
  - boptsPreFetch :: !Bool
  - boptsKeepGoing :: !(Maybe Bool)
  - boptsForceDirty :: !Bool
  - boptsTests :: !Bool
  - boptsTestOpts :: !TestOpts
  - boptsBenchmarks :: !Bool
  - boptsBenchmarkOpts :: !BenchmarkOpts
  - boptsReconfigure :: !Bool
  - boptsCabalVerbose :: !Bool
  - boptsSplitObjs :: !Bool
  }
- data BuildSubset
  - = BSAll
  - | BSOnlySnapshot
  - | BSOnlyDependencies
- defaultBuildOpts :: BuildOpts
- data TaskType
  - = TTLocal LocalPackage
  - | TTUpstream Package InstallLocation (Maybe GitSHA1)
- data TaskConfigOpts = TaskConfigOpts {
  - tcoMissing :: !(Set PackageIdentifier)
  - tcoOpts :: !(Map PackageIdentifier GhcPkgId -> ConfigureOpts)
  }
- newtype BuildCache = BuildCache {
  - buildCacheTimes :: Map FilePath FileCacheInfo
  }
- buildCacheVC :: VersionConfig BuildCache
- data ConfigCache = ConfigCache {
  - configCacheOpts :: !ConfigureOpts
  - configCacheDeps :: !(Set GhcPkgId)
  - configCacheComponents :: !(Set ByteString)
  - configCacheHaddock :: !Bool
  }
- configCacheVC :: VersionConfig ConfigCache
- configureOpts :: EnvConfig -> BaseConfigOpts -> Map PackageIdentifier GhcPkgId -> Bool -> InstallLocation -> Package -> ConfigureOpts
- isStackOpt :: Text -> Bool
- wantedLocalPackages :: [LocalPackage] -> Set PackageName
- data FileCacheInfo = FileCacheInfo {
  - fciModTime :: !ModTime
  - fciSize :: !Word64
  - fciHash :: !ByteString
  }
- data ConfigureOpts = ConfigureOpts {
  - coDirs :: ![String]
  - coNoDirs :: ![String]
  }
- data PrecompiledCache = PrecompiledCache {
  - pcLibrary :: !(Maybe FilePath)
  - pcExes :: ![FilePath]
  }
- precompiledCacheVC :: VersionConfig PrecompiledCache

# Documentation

data StackBuildException #

Constructors

Couldn'tFindPkgId PackageName |
CompilerVersionMismatch (Maybe (CompilerVersion, Arch)) (CompilerVersion, Arch) GHCVariant CompilerBuild VersionCheck (Maybe (Path Abs File)) Text |
Couldn'tParseTargets [Text] |
UnknownTargets (Set PackageName) (Map PackageName Version) (Path Abs File) |
TestSuiteFailure PackageIdentifier (Map Text (Maybe ExitCode)) (Maybe (Path Abs File)) ByteString |
TestSuiteTypeUnsupported TestSuiteInterface |
ConstructPlanFailed String |
CabalExitedUnsuccessfully ExitCode PackageIdentifier (Path Abs File) [String] (Maybe (Path Abs File)) [Text] |
ExecutionFailure [SomeException] |
LocalPackageDoesn'tMatchTarget PackageName Version Version |
NoSetupHsFound (Path Abs Dir) |
InvalidFlagSpecification (Set UnusedFlags) |
TargetParseException [Text] |
DuplicateLocalPackageNames [(PackageName, [Path Abs Dir])] |
SolverGiveUp String |
SolverMissingCabalInstall |
SomeTargetsNotBuildable [(PackageName, NamedComponent)] |
TestSuiteExeMissing Bool String String String |
CabalCopyFailed Bool String |
LocalPackagesPresent [PackageIdentifier] |

Instances

Show StackBuildException # |
Methods showsPrec :: Int -> StackBuildException -> ShowS # show :: StackBuildException -> String # showList :: [StackBuildException] -> ShowS #
Exception StackBuildException # |
Methods toException :: StackBuildException -> SomeException # fromException :: SomeException -> Maybe StackBuildException # displayException :: StackBuildException -> String #

data FlagSource #

Constructors

FSCommandLine |
FSStackYaml |

Instances

Eq FlagSource # |
Methods (==) :: FlagSource -> FlagSource -> Bool # (/=) :: FlagSource -> FlagSource -> Bool #
Ord FlagSource # |
Methods compare :: FlagSource -> FlagSource -> Ordering # (<) :: FlagSource -> FlagSource -> Bool # (<=) :: FlagSource -> FlagSource -> Bool # (>) :: FlagSource -> FlagSource -> Bool # (>=) :: FlagSource -> FlagSource -> Bool # max :: FlagSource -> FlagSource -> FlagSource # min :: FlagSource -> FlagSource -> FlagSource #
Show FlagSource # |
Methods showsPrec :: Int -> FlagSource -> ShowS # show :: FlagSource -> String # showList :: [FlagSource] -> ShowS #

data UnusedFlags #

Constructors

UFNoPackage FlagSource PackageName |
UFFlagsNotDefined FlagSource Package (Set FlagName) |
UFSnapshot PackageName |

Instances

Eq UnusedFlags # |
Methods (==) :: UnusedFlags -> UnusedFlags -> Bool # (/=) :: UnusedFlags -> UnusedFlags -> Bool #
Ord UnusedFlags # |
Methods compare :: UnusedFlags -> UnusedFlags -> Ordering # (<) :: UnusedFlags -> UnusedFlags -> Bool # (<=) :: UnusedFlags -> UnusedFlags -> Bool # (>) :: UnusedFlags -> UnusedFlags -> Bool # (>=) :: UnusedFlags -> UnusedFlags -> Bool # max :: UnusedFlags -> UnusedFlags -> UnusedFlags # min :: UnusedFlags -> UnusedFlags -> UnusedFlags #
Show UnusedFlags # |
Methods showsPrec :: Int -> UnusedFlags -> ShowS # show :: UnusedFlags -> String # showList :: [UnusedFlags] -> ShowS #

data InstallLocation #

A location to install a package into, either snapshot or local

Constructors

Snap |
Local |

Instances

Eq InstallLocation # |
Methods (==) :: InstallLocation -> InstallLocation -> Bool # (/=) :: InstallLocation -> InstallLocation -> Bool #
Show InstallLocation # |
Methods showsPrec :: Int -> InstallLocation -> ShowS # show :: InstallLocation -> String # showList :: [InstallLocation] -> ShowS #
Monoid InstallLocation # |
Methods mempty :: InstallLocation # mappend :: InstallLocation -> InstallLocation -> InstallLocation # mconcat :: [InstallLocation] -> InstallLocation #

data ModTime #

Used for storage and comparison.

Instances

Eq ModTime # |
Methods (==) :: ModTime -> ModTime -> Bool # (/=) :: ModTime -> ModTime -> Bool #
Data ModTime # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModTime -> c ModTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModTime # toConstr :: ModTime -> Constr # dataTypeOf :: ModTime -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ModTime) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModTime) # gmapT :: (forall b. Data b => b -> b) -> ModTime -> ModTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModTime -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModTime -> r # gmapQ :: (forall d. Data d => d -> u) -> ModTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ModTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModTime -> m ModTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModTime -> m ModTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModTime -> m ModTime #
Ord ModTime # |
Methods compare :: ModTime -> ModTime -> Ordering # (<) :: ModTime -> ModTime -> Bool # (<=) :: ModTime -> ModTime -> Bool # (>) :: ModTime -> ModTime -> Bool # (>=) :: ModTime -> ModTime -> Bool # max :: ModTime -> ModTime -> ModTime # min :: ModTime -> ModTime -> ModTime #
Show ModTime # |
Methods showsPrec :: Int -> ModTime -> ShowS # show :: ModTime -> String # showList :: [ModTime] -> ShowS #
Generic ModTime # |
Associated Types type Rep ModTime :: * -> * # Methods from :: ModTime -> Rep ModTime x # to :: Rep ModTime x -> ModTime #
NFData ModTime # |
Methods rnf :: ModTime -> () #
Store ModTime # |
Methods size :: Size ModTime # poke :: ModTime -> Poke () # peek :: Peek ModTime #
type Rep ModTime # |
type Rep ModTime = D1 (MetaData "ModTime" "Stack.Types.Package" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" True) (C1 (MetaCons "ModTime" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Integer, Rational))))

modTime :: UTCTime -> ModTime #

One-way conversion to serialized time.

data Installed #

Constructors

Library PackageIdentifier GhcPkgId |
Executable PackageIdentifier |

Instances

Eq Installed # |
Methods (==) :: Installed -> Installed -> Bool # (/=) :: Installed -> Installed -> Bool #
Ord Installed # |
Methods compare :: Installed -> Installed -> Ordering # (<) :: Installed -> Installed -> Bool # (<=) :: Installed -> Installed -> Bool # (>) :: Installed -> Installed -> Bool # (>=) :: Installed -> Installed -> Bool # max :: Installed -> Installed -> Installed # min :: Installed -> Installed -> Installed #
Show Installed # |
Methods showsPrec :: Int -> Installed -> ShowS # show :: Installed -> String # showList :: [Installed] -> ShowS #

class PackageInstallInfo a where #

Datatype which tells how which version of a package to install and where to install it into

Minimal complete definition

piiVersion, piiLocation

Methods

piiVersion :: a -> Version #

piiLocation :: a -> InstallLocation #

Instances

PackageInstallInfo PackageSource # |
Methods piiVersion :: PackageSource -> Version # piiLocation :: PackageSource -> InstallLocation #

data Task #

A task to perform when building

Constructors

Task |
Fields taskProvides :: !PackageIdentifier the package/version to be built taskType :: !TaskType the task type, telling us how to build this taskConfigOpts :: !TaskConfigOpts taskPresent :: !(Map PackageIdentifier GhcPkgId) GhcPkgIds of already-installed dependencies taskAllInOne :: !Bool indicates that the package can be built in one step

Instances

Show Task # |
Methods showsPrec :: Int -> Task -> ShowS # show :: Task -> String # showList :: [Task] -> ShowS #

taskLocation :: Task -> InstallLocation #

data LocalPackage #

Information on a locally available package of source code

Constructors

LocalPackage |
Fields lpPackage :: !Package The `Package` info itself, after resolution with package flags, with tests and benchmarks disabled lpComponents :: !(Set NamedComponent) Components to build, not including the library component. lpUnbuildable :: !(Set NamedComponent) Components explicitly requested for build, that are marked "buildable: false". lpWanted :: !Bool Whether this package is wanted as a target. lpTestDeps :: !(Map PackageName VersionRange) Used for determining if we can use --enable-tests in a normal build. lpBenchDeps :: !(Map PackageName VersionRange) Used for determining if we can use --enable-benchmarks in a normal build. lpTestBench :: !(Maybe Package) This stores the `Package` with tests and benchmarks enabled, if either is asked for by the user. lpDir :: !(Path Abs Dir) Directory of the package. lpCabalFile :: !(Path Abs File) The .cabal file lpForceDirty :: !Bool lpDirtyFiles :: !(Maybe (Set FilePath)) Nothing == not dirty, Just == dirty. Note that the Set may be empty if we forced the build to treat packages as dirty. Also, the Set may not include all modified files. lpNewBuildCache :: !(Map FilePath FileCacheInfo) current state of the files lpFiles :: !(Set (Path Abs File)) all files used by this package

Instances

Show LocalPackage # |
Methods showsPrec :: Int -> LocalPackage -> ShowS # show :: LocalPackage -> String # showList :: [LocalPackage] -> ShowS #

data BaseConfigOpts #

Basic information used to calculate what the configure options are

Constructors

BaseConfigOpts |
Fields bcoSnapDB :: !(Path Abs Dir) bcoLocalDB :: !(Path Abs Dir) bcoSnapInstallRoot :: !(Path Abs Dir) bcoLocalInstallRoot :: !(Path Abs Dir) bcoBuildOpts :: !BuildOpts bcoBuildOptsCLI :: !BuildOptsCLI bcoExtraDBs :: ![Path Abs Dir]

Instances

Show BaseConfigOpts # |
Methods showsPrec :: Int -> BaseConfigOpts -> ShowS # show :: BaseConfigOpts -> String # showList :: [BaseConfigOpts] -> ShowS #

data Plan #

A complete plan of what needs to be built and how to do it

Constructors

Plan |
Fields planTasks :: !(Map PackageName Task) planFinals :: !(Map PackageName Task) Final actions to be taken (test, benchmark, etc) planUnregisterLocal :: !(Map GhcPkgId (PackageIdentifier, Text)) Text is reason we're unregistering, for display only planInstallExes :: !(Map Text InstallLocation) Executables that should be installed after successful building

Instances

Show Plan # |
Methods showsPrec :: Int -> Plan -> ShowS # show :: Plan -> String # showList :: [Plan] -> ShowS #

data TestOpts #

Options for the `FinalAction` `DoTests`

Constructors

TestOpts |
Fields toRerunTests :: !Bool Whether successful tests will be run gain toAdditionalArgs :: ![String] Arguments passed to the test program toCoverage :: !Bool Generate a code coverage report toDisableRun :: !Bool Disable running of tests

Instances

Eq TestOpts # |
Methods (==) :: TestOpts -> TestOpts -> Bool # (/=) :: TestOpts -> TestOpts -> Bool #
Show TestOpts # |
Methods showsPrec :: Int -> TestOpts -> ShowS # show :: TestOpts -> String # showList :: [TestOpts] -> ShowS #

data BenchmarkOpts #

Options for the `FinalAction` `DoBenchmarks`

Constructors

BenchmarkOpts |
Fields beoAdditionalArgs :: !(Maybe String) Arguments passed to the benchmark program beoDisableRun :: !Bool Disable running of benchmarks

Instances

Eq BenchmarkOpts # |
Methods (==) :: BenchmarkOpts -> BenchmarkOpts -> Bool # (/=) :: BenchmarkOpts -> BenchmarkOpts -> Bool #
Show BenchmarkOpts # |
Methods showsPrec :: Int -> BenchmarkOpts -> ShowS # show :: BenchmarkOpts -> String # showList :: [BenchmarkOpts] -> ShowS #

data FileWatchOpts #

Constructors

NoFileWatch |
FileWatch |
FileWatchPoll |

Instances

Eq FileWatchOpts # |
Methods (==) :: FileWatchOpts -> FileWatchOpts -> Bool # (/=) :: FileWatchOpts -> FileWatchOpts -> Bool #
Show FileWatchOpts # |
Methods showsPrec :: Int -> FileWatchOpts -> ShowS # show :: FileWatchOpts -> String # showList :: [FileWatchOpts] -> ShowS #

data BuildOpts #

Build options that is interpreted by the build command. This is built up from BuildOptsCLI and BuildOptsMonoid

Constructors

BuildOpts |
Fields boptsLibProfile :: !Bool boptsExeProfile :: !Bool boptsLibStrip :: !Bool boptsExeStrip :: !Bool boptsHaddock :: !Bool Build haddocks? boptsHaddockOpts :: !HaddockOpts Options to pass to haddock boptsOpenHaddocks :: !Bool Open haddocks in the browser? boptsHaddockDeps :: !(Maybe Bool) Build haddocks for dependencies? boptsHaddockInternal :: !Bool Build haddocks for all symbols and packages, like `cabal haddock --internal` boptsInstallExes :: !Bool Install executables to user path after building? boptsPreFetch :: !Bool Fetch all packages immediately ^ Watch files for changes and automatically rebuild boptsKeepGoing :: !(Maybe Bool) Keep building/running after failure boptsForceDirty :: !Bool Force treating all local packages as having dirty files boptsTests :: !Bool Turn on tests for local targets boptsTestOpts :: !TestOpts Additional test arguments boptsBenchmarks :: !Bool Turn on benchmarks for local targets boptsBenchmarkOpts :: !BenchmarkOpts Additional test arguments ^ Commands (with arguments) to run after a successful build ^ Only perform the configure step when building boptsReconfigure :: !Bool Perform the configure step even if already configured boptsCabalVerbose :: !Bool Ask Cabal to be verbose in its builds boptsSplitObjs :: !Bool Whether to enable split-objs.

Instances

Show BuildOpts # |
Methods showsPrec :: Int -> BuildOpts -> ShowS # show :: BuildOpts -> String # showList :: [BuildOpts] -> ShowS #

data BuildSubset #

Which subset of packages to build

Constructors

BSAll |
BSOnlySnapshot | Only install packages in the snapshot database, skipping packages intended for the local database.
BSOnlyDependencies |

Instances

Eq BuildSubset # |
Methods (==) :: BuildSubset -> BuildSubset -> Bool # (/=) :: BuildSubset -> BuildSubset -> Bool #
Show BuildSubset # |
Methods showsPrec :: Int -> BuildSubset -> ShowS # show :: BuildSubset -> String # showList :: [BuildSubset] -> ShowS #

defaultBuildOpts :: BuildOpts #

data TaskType #

The type of a task, either building local code or something from the package index (upstream)

Constructors

TTLocal LocalPackage |
TTUpstream Package InstallLocation (Maybe GitSHA1) |

Instances

Show TaskType # |
Methods showsPrec :: Int -> TaskType -> ShowS # show :: TaskType -> String # showList :: [TaskType] -> ShowS #

data TaskConfigOpts #

Given the IDs of any missing packages, produce the configure options

Constructors

TaskConfigOpts |
Fields tcoMissing :: !(Set PackageIdentifier) Dependencies for which we don't yet have an GhcPkgId tcoOpts :: !(Map PackageIdentifier GhcPkgId -> ConfigureOpts) Produce the list of options given the missing `GhcPkgId`s

Instances

Show TaskConfigOpts # |
Methods showsPrec :: Int -> TaskConfigOpts -> ShowS # show :: TaskConfigOpts -> String # showList :: [TaskConfigOpts] -> ShowS #

newtype BuildCache #

Stored on disk to know whether the files have changed.

Constructors

BuildCache |
Fields buildCacheTimes :: Map FilePath FileCacheInfo Modification times of files.

Instances

Eq BuildCache # |
Methods (==) :: BuildCache -> BuildCache -> Bool # (/=) :: BuildCache -> BuildCache -> Bool #
Data BuildCache # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuildCache -> c BuildCache # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuildCache # toConstr :: BuildCache -> Constr # dataTypeOf :: BuildCache -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c BuildCache) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildCache) # gmapT :: (forall b. Data b => b -> b) -> BuildCache -> BuildCache # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuildCache -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuildCache -> r # gmapQ :: (forall d. Data d => d -> u) -> BuildCache -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuildCache -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuildCache -> m BuildCache # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildCache -> m BuildCache # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildCache -> m BuildCache #
Show BuildCache # |
Methods showsPrec :: Int -> BuildCache -> ShowS # show :: BuildCache -> String # showList :: [BuildCache] -> ShowS #
Generic BuildCache # |
Associated Types type Rep BuildCache :: * -> * # Methods from :: BuildCache -> Rep BuildCache x # to :: Rep BuildCache x -> BuildCache #
NFData BuildCache # |
Methods rnf :: BuildCache -> () #
Store BuildCache # |
Methods size :: Size BuildCache # poke :: BuildCache -> Poke () # peek :: Peek BuildCache #
type Rep BuildCache # |
type Rep BuildCache = D1 (MetaData "BuildCache" "Stack.Types.Build" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" True) (C1 (MetaCons "BuildCache" PrefixI True) (S1 (MetaSel (Just Symbol "buildCacheTimes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map FilePath FileCacheInfo))))

buildCacheVC :: VersionConfig BuildCache #

data ConfigCache #

Stored on disk to know whether the flags have changed.

Constructors

ConfigCache |
Fields configCacheOpts :: !ConfigureOpts All options used for this package. configCacheDeps :: !(Set GhcPkgId) The GhcPkgIds of all of the dependencies. Since Cabal doesn't take the complete GhcPkgId (only a PackageIdentifier) in the configure options, just using the previous value is insufficient to know if dependencies have changed. configCacheComponents :: !(Set ByteString) The components to be built. It's a bit of a hack to include this in here, as it's not a configure option (just a build option), but this is a convenient way to force compilation when the components change. configCacheHaddock :: !Bool Are haddocks to be built?

Instances

Eq ConfigCache # |
Methods (==) :: ConfigCache -> ConfigCache -> Bool # (/=) :: ConfigCache -> ConfigCache -> Bool #
Data ConfigCache # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConfigCache -> c ConfigCache # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConfigCache # toConstr :: ConfigCache -> Constr # dataTypeOf :: ConfigCache -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ConfigCache) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConfigCache) # gmapT :: (forall b. Data b => b -> b) -> ConfigCache -> ConfigCache # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConfigCache -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConfigCache -> r # gmapQ :: (forall d. Data d => d -> u) -> ConfigCache -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConfigCache -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConfigCache -> m ConfigCache # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfigCache -> m ConfigCache # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfigCache -> m ConfigCache #
Show ConfigCache # |
Methods showsPrec :: Int -> ConfigCache -> ShowS # show :: ConfigCache -> String # showList :: [ConfigCache] -> ShowS #
Generic ConfigCache # |
Associated Types type Rep ConfigCache :: * -> * # Methods from :: ConfigCache -> Rep ConfigCache x # to :: Rep ConfigCache x -> ConfigCache #
NFData ConfigCache # |
Methods rnf :: ConfigCache -> () #
Store ConfigCache # |
Methods size :: Size ConfigCache # poke :: ConfigCache -> Poke () # peek :: Peek ConfigCache #
type Rep ConfigCache # |
type Rep ConfigCache = D1 (MetaData "ConfigCache" "Stack.Types.Build" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" False) (C1 (MetaCons "ConfigCache" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "configCacheOpts") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ConfigureOpts)) (S1 (MetaSel (Just Symbol "configCacheDeps") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Set GhcPkgId)))) ((:*:) (S1 (MetaSel (Just Symbol "configCacheComponents") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Set ByteString))) (S1 (MetaSel (Just Symbol "configCacheHaddock") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)))))

configCacheVC :: VersionConfig ConfigCache #

configureOpts #

Arguments

:: EnvConfig |
-> BaseConfigOpts |
-> Map PackageIdentifier GhcPkgId | dependencies
-> Bool | local non-extra-dep?
-> InstallLocation |
-> Package |
-> ConfigureOpts |

Render a `BaseConfigOpts` to an actual list of options

isStackOpt :: Text -> Bool #

wantedLocalPackages :: [LocalPackage] -> Set PackageName #

Get set of wanted package names from locals.

data FileCacheInfo #

Constructors

FileCacheInfo |
Fields fciModTime :: !ModTime fciSize :: !Word64 fciHash :: !ByteString

Instances

Eq FileCacheInfo # |
Methods (==) :: FileCacheInfo -> FileCacheInfo -> Bool # (/=) :: FileCacheInfo -> FileCacheInfo -> Bool #
Data FileCacheInfo # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FileCacheInfo -> c FileCacheInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FileCacheInfo # toConstr :: FileCacheInfo -> Constr # dataTypeOf :: FileCacheInfo -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c FileCacheInfo) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FileCacheInfo) # gmapT :: (forall b. Data b => b -> b) -> FileCacheInfo -> FileCacheInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FileCacheInfo -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FileCacheInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> FileCacheInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FileCacheInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FileCacheInfo -> m FileCacheInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FileCacheInfo -> m FileCacheInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FileCacheInfo -> m FileCacheInfo #
Show FileCacheInfo # |
Methods showsPrec :: Int -> FileCacheInfo -> ShowS # show :: FileCacheInfo -> String # showList :: [FileCacheInfo] -> ShowS #
Generic FileCacheInfo # |
Associated Types type Rep FileCacheInfo :: * -> * # Methods from :: FileCacheInfo -> Rep FileCacheInfo x # to :: Rep FileCacheInfo x -> FileCacheInfo #
NFData FileCacheInfo # |
Methods rnf :: FileCacheInfo -> () #
Store FileCacheInfo # |
Methods size :: Size FileCacheInfo # poke :: FileCacheInfo -> Poke () # peek :: Peek FileCacheInfo #
type Rep FileCacheInfo # |
type Rep FileCacheInfo = D1 (MetaData "FileCacheInfo" "Stack.Types.Package" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" False) (C1 (MetaCons "FileCacheInfo" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "fciModTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ModTime)) ((:*:) (S1 (MetaSel (Just Symbol "fciSize") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "fciHash") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString)))))

data ConfigureOpts #

Configure options to be sent to Setup.hs configure

Constructors

ConfigureOpts |
Fields coDirs :: ![String] Options related to various paths. We separate these out since they do not have an impact on the contents of the compiled binary for checking if we can use an existing precompiled cache. coNoDirs :: ![String]

Instances

Eq ConfigureOpts # |
Methods (==) :: ConfigureOpts -> ConfigureOpts -> Bool # (/=) :: ConfigureOpts -> ConfigureOpts -> Bool #
Data ConfigureOpts # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConfigureOpts -> c ConfigureOpts # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConfigureOpts # toConstr :: ConfigureOpts -> Constr # dataTypeOf :: ConfigureOpts -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ConfigureOpts) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConfigureOpts) # gmapT :: (forall b. Data b => b -> b) -> ConfigureOpts -> ConfigureOpts # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConfigureOpts -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConfigureOpts -> r # gmapQ :: (forall d. Data d => d -> u) -> ConfigureOpts -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConfigureOpts -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConfigureOpts -> m ConfigureOpts # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfigureOpts -> m ConfigureOpts # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfigureOpts -> m ConfigureOpts #
Show ConfigureOpts # |
Methods showsPrec :: Int -> ConfigureOpts -> ShowS # show :: ConfigureOpts -> String # showList :: [ConfigureOpts] -> ShowS #
Generic ConfigureOpts # |
Associated Types type Rep ConfigureOpts :: * -> * # Methods from :: ConfigureOpts -> Rep ConfigureOpts x # to :: Rep ConfigureOpts x -> ConfigureOpts #
NFData ConfigureOpts # |
Methods rnf :: ConfigureOpts -> () #
Store ConfigureOpts # |
Methods size :: Size ConfigureOpts # poke :: ConfigureOpts -> Poke () # peek :: Peek ConfigureOpts #
type Rep ConfigureOpts # |
type Rep ConfigureOpts = D1 (MetaData "ConfigureOpts" "Stack.Types.Build" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" False) (C1 (MetaCons "ConfigureOpts" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "coDirs") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [String])) (S1 (MetaSel (Just Symbol "coNoDirs") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [String]))))

data PrecompiledCache #

Information on a compiled package: the library conf file (if relevant), and all of the executable paths.

Constructors

PrecompiledCache |
Fields pcLibrary :: !(Maybe FilePath) .conf file inside the package database pcExes :: ![FilePath] Full paths to executables

Instances

Eq PrecompiledCache # |
Methods (==) :: PrecompiledCache -> PrecompiledCache -> Bool # (/=) :: PrecompiledCache -> PrecompiledCache -> Bool #
Data PrecompiledCache # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PrecompiledCache -> c PrecompiledCache # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PrecompiledCache # toConstr :: PrecompiledCache -> Constr # dataTypeOf :: PrecompiledCache -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PrecompiledCache) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PrecompiledCache) # gmapT :: (forall b. Data b => b -> b) -> PrecompiledCache -> PrecompiledCache # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PrecompiledCache -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PrecompiledCache -> r # gmapQ :: (forall d. Data d => d -> u) -> PrecompiledCache -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> PrecompiledCache -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PrecompiledCache -> m PrecompiledCache # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PrecompiledCache -> m PrecompiledCache # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PrecompiledCache -> m PrecompiledCache #
Show PrecompiledCache # |
Methods showsPrec :: Int -> PrecompiledCache -> ShowS # show :: PrecompiledCache -> String # showList :: [PrecompiledCache] -> ShowS #
Generic PrecompiledCache # |
Associated Types type Rep PrecompiledCache :: * -> * # Methods from :: PrecompiledCache -> Rep PrecompiledCache x # to :: Rep PrecompiledCache x -> PrecompiledCache #
Binary PrecompiledCache # |
Methods put :: PrecompiledCache -> Put # get :: Get PrecompiledCache # putList :: [PrecompiledCache] -> Put #
HasStructuralInfo PrecompiledCache # |
Methods structuralInfo :: Proxy * PrecompiledCache -> StructuralInfo #
HasSemanticVersion PrecompiledCache # |
Associated Types type SemanticVersion PrecompiledCache :: Nat #
NFData PrecompiledCache # |
Methods rnf :: PrecompiledCache -> () #
Store PrecompiledCache # |
Methods size :: Size PrecompiledCache # poke :: PrecompiledCache -> Poke () # peek :: Peek PrecompiledCache #
type Rep PrecompiledCache # |
type Rep PrecompiledCache = D1 (MetaData "PrecompiledCache" "Stack.Types.Build" "stack-1.4.0-5VbagGyw9hyAgBJq8WQvrq" False) (C1 (MetaCons "PrecompiledCache" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "pcLibrary") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe FilePath))) (S1 (MetaSel (Just Symbol "pcExes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [FilePath]))))
type SemanticVersion PrecompiledCache # |
type SemanticVersion PrecompiledCache = 0

precompiledCacheVC :: VersionConfig PrecompiledCache #