stack-1.1.0: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Fetch

Description

Functionality for downloading packages securely for cabal's usage.

Synopsis

Documentation

unpackPackages Source

Arguments

:: (MonadIO m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m) 
=> EnvOverride 
-> FilePath

destination

-> [String]

names or identifiers

-> m () 

Intended to work for the command line command.

unpackPackageIdents Source

Ensure that all of the given package idents are unpacked into the build unpack directory, and return the paths to all of the subdirectories.

fetchPackages :: (MonadIO m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m) => EnvOverride -> Set PackageIdentifier -> m () Source

Fetch packages into the cache without unpacking

resolvePackages :: (MonadIO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> Set PackageIdentifier -> Set PackageName -> m (Map PackageIdentifier ResolvedPackage) Source

Resolve a set of package names and identifiers into FetchPackage values.

withCabalFiles :: (MonadThrow m, MonadIO m, MonadReader env m, HasConfig env) => IndexName -> [(PackageIdentifier, PackageCache, a)] -> (PackageIdentifier -> a -> ByteString -> IO b) -> m [b] Source

Add the cabal files to a list of idents with their caches.

withCabalLoader :: (MonadIO m, MonadReader env m, HasConfig env, MonadLogger m, HasHttpManager env, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> ((PackageIdentifier -> IO ByteString) -> m a) -> m a Source

Provide a function which will load up a cabal ByteString from the package indices.