| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Stack.PackageIndex
Description
Dealing with the 01-index file and all its cabal files.
Synopsis
- updateAllIndices :: HasCabalLoader env => RIO env ()
 - getPackageCaches :: HasCabalLoader env => RIO env (PackageCache PackageIndex)
 - getPackageVersions :: HasCabalLoader env => PackageName -> RIO env (HashMap Version (Maybe CabalHash))
 - lookupPackageVersions :: PackageName -> PackageCache index -> HashMap Version (Maybe CabalHash)
 - data CabalLoader = CabalLoader {
- clCache :: !(IORef (Maybe (PackageCache PackageIndex)))
 - clIndices :: ![PackageIndex]
 - clStackRoot :: !(Path Abs Dir)
 - clUpdateRef :: !(MVar Bool)
 - clConnectionCount :: !Int
 - clIgnoreRevisionMismatch :: !Bool
 
 - class HasRunner env => HasCabalLoader env where
- cabalLoaderL :: Lens' env CabalLoader
 
 - configPackageIndex :: HasCabalLoader env => IndexName -> RIO env (Path Abs File)
 - configPackageIndexRoot :: HasCabalLoader env => IndexName -> RIO env (Path Abs Dir)
 
Documentation
updateAllIndices :: HasCabalLoader env => RIO env () Source #
Update all of the package indices
getPackageCaches :: HasCabalLoader env => RIO env (PackageCache PackageIndex) Source #
Load the package caches, or create the caches if necessary.
This has two levels of caching: in memory, and the on-disk cache. So, feel free to call this function multiple times.
getPackageVersions :: HasCabalLoader env => PackageName -> RIO env (HashMap Version (Maybe CabalHash)) Source #
Get the known versions for a given package from the package caches.
See getPackageCaches for performance notes.
lookupPackageVersions :: PackageName -> PackageCache index -> HashMap Version (Maybe CabalHash) Source #
data CabalLoader Source #
Constructors
| CabalLoader | |
Fields 
  | |
class HasRunner env => HasCabalLoader env where Source #
Methods
cabalLoaderL :: Lens' env CabalLoader Source #
Instances
| HasCabalLoader LoadConfig Source # | |
Defined in Stack.Types.Config Methods  | |
| HasCabalLoader EnvConfig Source # | |
Defined in Stack.Types.Config Methods  | |
| HasCabalLoader BuildConfig Source # | |
Defined in Stack.Types.Config Methods  | |
| HasCabalLoader Config Source # | |
Defined in Stack.Types.Config Methods  | |
| HasCabalLoader MiniConfig Source # | |
Defined in Stack.Config Methods  | |
configPackageIndex :: HasCabalLoader env => IndexName -> RIO env (Path Abs File) Source #
Location of the 01-index.tar file
configPackageIndexRoot :: HasCabalLoader env => IndexName -> RIO env (Path Abs Dir) Source #
Root for a specific package index