Safe Haskell | None |
---|---|
Language | Haskell2010 |
The general Stack configuration that starts everything off. This should be smart to falback if there is no stack.yaml, instead relying on whatever files are available.
If there is no stack.yaml, and there is a cabal.config, we read in those constraints, and if there's a cabal.sandbox.config, we read any constraints from there and also find the package database from there, etc. And if there's nothing, we should probably default to behaving like cabal, possibly with spitting out a warning that "you should run `stk init` to make things better".
- data MiniConfig
- loadConfig :: (MonadLogger m, MonadIO m, MonadMask m, MonadThrow m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasTerminal env) => ConfigMonoid -> Maybe (Path Abs File) -> Maybe AbstractResolver -> m (LoadConfig m)
- loadMiniConfig :: (MonadIO m, HasHttpManager a, MonadReader a m, MonadBaseControl IO m, MonadCatch m, MonadLogger m) => Config -> m MiniConfig
- packagesParser :: Parser [String]
- resolvePackageEntry :: (MonadIO m, MonadThrow m, MonadReader env m, HasHttpManager env, MonadLogger m, MonadCatch m, MonadBaseControl IO m, HasConfig env) => EnvOverride -> Path Abs Dir -> PackageEntry -> m [(Path Abs Dir, TreatLikeExtraDep)]
- getImplicitGlobalProjectDir :: (MonadIO m, MonadLogger m) => Config -> m (Path Abs Dir)
- getIsGMP4 :: (MonadIO m, MonadBaseControl IO m, MonadCatch m, MonadLogger m) => EnvOverride -> m Bool
- getSnapshots :: (MonadThrow m, MonadMask m, MonadIO m, MonadReader env m, HasHttpManager env, HasStackRoot env, HasConfig env, MonadLogger m) => m Snapshots
- makeConcreteResolver :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m, MonadMask m, HasHttpManager env, MonadLogger m) => AbstractResolver -> m Resolver
- checkOwnership :: (MonadIO m, MonadCatch m) => Path Abs Dir -> m ()
- getInContainer :: MonadIO m => m Bool
Documentation
data MiniConfig Source
An environment with a subset of BuildConfig used for setup.
:: (MonadLogger m, MonadIO m, MonadMask m, MonadThrow m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasTerminal env) | |
=> ConfigMonoid | Config monoid from parsed command-line arguments |
-> Maybe (Path Abs File) | Override stack.yaml |
-> Maybe AbstractResolver | Override resolver |
-> m (LoadConfig m) |
Load the configuration, using current directory, environment variables, and defaults as necessary.
loadMiniConfig :: (MonadIO m, HasHttpManager a, MonadReader a m, MonadBaseControl IO m, MonadCatch m, MonadLogger m) => Config -> m MiniConfig Source
Load the MiniConfig
.
packagesParser :: Parser [String] Source
:: (MonadIO m, MonadThrow m, MonadReader env m, HasHttpManager env, MonadLogger m, MonadCatch m, MonadBaseControl IO m, HasConfig env) | |
=> EnvOverride | |
-> Path Abs Dir | project root |
-> PackageEntry | |
-> m [(Path Abs Dir, TreatLikeExtraDep)] |
Resolve a PackageEntry into a list of paths, downloading and cloning as necessary.
getImplicitGlobalProjectDir :: (MonadIO m, MonadLogger m) => Config -> m (Path Abs Dir) Source
Get the location of the implicit global project directory. If the directory already exists at the deprecated location, its location is returned. Otherwise, the new location is returned.
getIsGMP4 :: (MonadIO m, MonadBaseControl IO m, MonadCatch m, MonadLogger m) => EnvOverride -> m Bool Source
getSnapshots :: (MonadThrow m, MonadMask m, MonadIO m, MonadReader env m, HasHttpManager env, HasStackRoot env, HasConfig env, MonadLogger m) => m Snapshots Source
Download the Snapshots
value from stackage.org.
makeConcreteResolver :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m, MonadMask m, HasHttpManager env, MonadLogger m) => AbstractResolver -> m Resolver Source
Turn an AbstractResolver
into a Resolver
.
checkOwnership :: (MonadIO m, MonadCatch m) => Path Abs Dir -> m () Source
throws checkOwnership
dirUserDoesn'tOwnDirectory
if dir
isn't owned by the current user.
If dir
doesn't exist, its parent directory is checked instead.
If the parent directory doesn't exist either,
is thrown.NoSuchDirectory
(parent
dir)
getInContainer :: MonadIO m => m Bool Source
True
if we are currently running inside a Docker container.