stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.PackageIndex

Description

Dealing with the 00-index file and all its cabal files.

Synopsis

- updateAllIndices :: (StackMiniM env m, HasConfig env) => EnvOverride -> m ()
- getPackageCaches :: (StackMiniM env m, HasConfig env) => m (Map PackageIdentifier (PackageIndex, PackageCache))
- getPackageCachesIO :: (StackMiniM env m, HasConfig env) => m (IO (Map PackageIdentifier (PackageIndex, PackageCache)))
- getPackageVersions :: (StackMiniM env m, HasConfig env) => PackageName -> m (Set Version)
- getPackageVersionsIO :: (StackMiniM env m, HasConfig env) => m (PackageName -> IO (Set Version))
- lookupPackageVersions :: PackageName -> Map PackageIdentifier a -> Set Version

# Documentation

updateAllIndices :: (StackMiniM env m, HasConfig env) => EnvOverride -> m () #

Update all of the package indices

getPackageCaches :: (StackMiniM env m, HasConfig env) => m (Map PackageIdentifier (PackageIndex, PackageCache)) #

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.

getPackageCachesIO :: (StackMiniM env m, HasConfig env) => m (IO (Map PackageIdentifier (PackageIndex, PackageCache))) #

Access the package caches from `IO`.

FIXME: This is a temporary solution until a better solution to access the package caches from Stack.Build.ConstructPlan has been found.

getPackageVersions :: (StackMiniM env m, HasConfig env) => PackageName -> m (Set Version) #

Get the known versions for a given package from the package caches.

See `getPackageCaches` for performance notes.

getPackageVersionsIO :: (StackMiniM env m, HasConfig env) => m (PackageName -> IO (Set Version)) #

Lookup a package's versions from `IO`.

lookupPackageVersions :: PackageName -> Map PackageIdentifier a -> Set Version #