stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Build.Cache

Description

Cache information about previous builds

Synopsis

- tryGetBuildCache :: (MonadIO m, MonadReader env m, MonadThrow m, MonadLogger m, HasEnvConfig env, MonadBaseControl IO m) => Path Abs Dir -> m (Maybe (Map FilePath FileCacheInfo))
- tryGetConfigCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m (Maybe ConfigCache)
- tryGetCabalMod :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m (Maybe ModTime)
- getInstalledExes :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadThrow m) => InstallLocation -> m [PackageIdentifier]
- tryGetFlagCache :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Installed -> m (Maybe ConfigCache)
- deleteCaches :: (MonadIO m, MonadReader env m, MonadCatch m, HasEnvConfig env) => Path Abs Dir -> m ()
- markExeInstalled :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadCatch m) => InstallLocation -> PackageIdentifier -> m ()
- markExeNotInstalled :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadCatch m) => InstallLocation -> PackageIdentifier -> m ()
- writeFlagCache :: (MonadIO m, MonadReader env m, HasEnvConfig env, MonadThrow m, MonadLogger m) => Installed -> ConfigCache -> m ()
- writeBuildCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> Map FilePath FileCacheInfo -> m ()
- writeConfigCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> ConfigCache -> m ()
- writeCabalMod :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> ModTime -> m ()
- setTestSuccess :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> m ()
- unsetTestSuccess :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> m ()
- checkTestSuccess :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m Bool
- writePrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m, MonadLogger m) => BaseConfigOpts -> PackageIdentifier -> ConfigureOpts -> Set GhcPkgId -> Installed -> Set Text -> m ()
- readPrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m, MonadLogger m, MonadBaseControl IO m) => PackageIdentifier -> ConfigureOpts -> Set GhcPkgId -> m (Maybe PrecompiledCache)
- data BuildCache = BuildCache {
  - buildCacheTimes :: !(Map FilePath FileCacheInfo)
  }

# Documentation

tryGetBuildCache :: (MonadIO m, MonadReader env m, MonadThrow m, MonadLogger m, HasEnvConfig env, MonadBaseControl IO m) => Path Abs Dir -> m (Maybe (Map FilePath FileCacheInfo)) #

Try to read the dirtiness cache for the given package directory.

tryGetConfigCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m (Maybe ConfigCache) #

Try to read the dirtiness cache for the given package directory.

tryGetCabalMod :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m (Maybe ModTime) #

Try to read the mod time of the cabal file from the last build

getInstalledExes :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadThrow m) => InstallLocation -> m [PackageIdentifier] #

Get all of the installed executables

tryGetFlagCache :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Installed -> m (Maybe ConfigCache) #

Loads the flag cache for the given installed extra-deps

deleteCaches :: (MonadIO m, MonadReader env m, MonadCatch m, HasEnvConfig env) => Path Abs Dir -> m () #

Delete the caches for the project.

markExeInstalled :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadCatch m) => InstallLocation -> PackageIdentifier -> m () #

Mark the given executable as installed

markExeNotInstalled :: (MonadReader env m, HasEnvConfig env, MonadIO m, MonadCatch m) => InstallLocation -> PackageIdentifier -> m () #

Mark the given executable as not installed

writeFlagCache :: (MonadIO m, MonadReader env m, HasEnvConfig env, MonadThrow m, MonadLogger m) => Installed -> ConfigCache -> m () #

writeBuildCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> Map FilePath FileCacheInfo -> m () #

Write the dirtiness cache for this package's files.

writeConfigCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> ConfigCache -> m () #

Write the dirtiness cache for this package's configuration.

writeCabalMod :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> ModTime -> m () #

See `tryGetCabalMod`

setTestSuccess :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> m () #

Mark a test suite as having succeeded

unsetTestSuccess :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadLogger m) => Path Abs Dir -> m () #

Mark a test suite as not having succeeded

checkTestSuccess :: (MonadIO m, MonadThrow m, MonadReader env m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m Bool #

Check if the test suite already passed

writePrecompiledCache #

Arguments

:: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m, MonadLogger m) |
=> BaseConfigOpts |
-> PackageIdentifier |
-> ConfigureOpts |
-> Set GhcPkgId | dependencies
-> Installed | library
-> Set Text | executables
-> m () |

Write out information about a newly built package

readPrecompiledCache #

Arguments

:: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m, MonadLogger m, MonadBaseControl IO m) |
=> PackageIdentifier | target package
-> ConfigureOpts |
-> Set GhcPkgId | dependencies
-> m (Maybe PrecompiledCache) |

Check the cache for a precompiled package matching the given configuration.

data 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.3.2-BJTOe4yfRNq2cDDPL8b7LK" False) (C1 (MetaCons "BuildCache" PrefixI True) (S1 (MetaSel (Just Symbol "buildCacheTimes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Map FilePath FileCacheInfo))))