stack-1.3.2: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.PackageIndex

Description

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

Synopsis

Documentation

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

Update all of the package indices

getPackageCaches :: (StackMiniM env m, HasConfig env) => m (Map PackageIdentifier (PackageIndex, PackageCache)) 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.

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

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) Source

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)) Source

Lookup a package's versions from IO.