stack-2.5.1.1: The Haskell Tool Stack
Safe HaskellNone
LanguageHaskell2010

Stack.Storage.User

Description

Work with SQLite database used for caches across an entire user account.

Synopsis

Documentation

initUserStorage Source #

Arguments

:: HasLogFunc env 
=> Path Abs File

storage file

-> (UserStorage -> RIO env a) 
-> RIO env a 

Initialize the database.

type PrecompiledCacheKey = Unique PrecompiledCacheParent Source #

Key used to retrieve the precompiled cache

precompiledCacheKey :: Path Rel Dir -> ActualCompiler -> Version -> Text -> ByteString -> Bool -> PrecompiledCacheKey Source #

Build key used to retrieve the precompiled cache

savePrecompiledCache :: (HasConfig env, HasLogFunc env) => PrecompiledCacheKey -> PrecompiledCache Rel -> RIO env () Source #

Insert or update PrecompiledCache to the database.

loadDockerImageExeCache :: (HasConfig env, HasLogFunc env) => Text -> Path Abs File -> UTCTime -> RIO env (Maybe Bool) Source #

Get the record of whether an executable is compatible with a Docker image

saveDockerImageExeCache :: (HasConfig env, HasLogFunc env) => Text -> Path Abs File -> UTCTime -> Bool -> RIO env () Source #

Sest the record of whether an executable is compatible with a Docker image

loadCompilerPaths Source #

Arguments

:: HasConfig env 
=> Path Abs File

compiler executable

-> CompilerBuild 
-> Bool

sandboxed?

-> RIO env (Maybe CompilerPaths) 

Load compiler information, if available, and confirm that the referenced files are unchanged. May throw exceptions!

saveCompilerPaths :: HasConfig env => CompilerPaths -> RIO env () Source #

Save compiler information. May throw exceptions!

upgradeChecksSince :: HasConfig env => UTCTime -> RIO env Int Source #

How many upgrade checks have occurred since the given timestamp?

logUpgradeCheck :: HasConfig env => UTCTime -> RIO env () Source #

Log in the database that an upgrade check occurred at the given time.