License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | GHC2021 |
Stack.Setup
Contents
Description
Synopsis
- setupEnv :: NeedTargets -> BuildOptsCLI -> Maybe StyleDoc -> RIO BuildConfig EnvConfig
- ensureCompilerAndMsys :: (HasBuildConfig env, HasGHCVariant env) => SetupOpts -> RIO env (CompilerPaths, ExtraDirs)
- ensureDockerStackExe :: HasConfig env => Platform -> RIO env (Path Abs File)
- data SetupOpts = SetupOpts {
- installGhcIfMissing :: !Bool
- installMsysIfMissing :: !Bool
- useSystem :: !Bool
- wantedCompiler :: !WantedCompiler
- compilerCheck :: !VersionCheck
- configFile :: !(Maybe (Path Abs File))
- forceReinstall :: !Bool
- sanityCheck :: !Bool
- skipGhcCheck :: !Bool
- skipMsys :: !Bool
- resolveMissingGHC :: !(Maybe StyleDoc)
- ghcBindistURL :: !(Maybe String)
- defaultSetupInfoYaml :: String
- withNewLocalBuildTargets :: HasEnvConfig env => [Text] -> RIO env a -> RIO env a
- data StackReleaseInfo
- getDownloadVersion :: StackReleaseInfo -> Maybe Version
- stackVersion :: Version
- preferredPlatforms :: (MonadReader env m, HasPlatform env, MonadThrow m) => m [(Bool, String)]
- downloadStackReleaseInfo :: (HasLogFunc env, HasPlatform env) => Maybe String -> Maybe String -> Maybe String -> RIO env StackReleaseInfo
- downloadStackExe :: HasConfig env => [(Bool, String)] -> StackReleaseInfo -> Path Abs Dir -> Bool -> (Path Abs File -> IO ()) -> RIO env ()
Documentation
Arguments
:: NeedTargets | |
-> BuildOptsCLI | |
-> Maybe StyleDoc | Message to give user when necessary GHC is not available. |
-> RIO BuildConfig EnvConfig |
Modify the environment variables (like PATH) appropriately, possibly doing installation too
ensureCompilerAndMsys :: (HasBuildConfig env, HasGHCVariant env) => SetupOpts -> RIO env (CompilerPaths, ExtraDirs) Source #
Ensure both the compiler and the msys toolchain are installed and provide the PATHs to add if necessary
ensureDockerStackExe :: HasConfig env => Platform -> RIO env (Path Abs File) Source #
Ensure Docker container-compatible 'stack' executable is downloaded
Type representing setup configurations.
Constructors
SetupOpts | |
Fields
|
defaultSetupInfoYaml :: String Source #
Default location of the stack-setup.yaml file
withNewLocalBuildTargets :: HasEnvConfig env => [Text] -> RIO env a -> RIO env a Source #
Some commands (script, ghci and exec) set targets dynamically see also the note about only local targets for rebuildEnv
Stack binary download
data StackReleaseInfo Source #
Information on a binary release of Stack.
getDownloadVersion :: StackReleaseInfo -> Maybe Version Source #
If available, yields the version of the given binary release of Stack.
stackVersion :: Version Source #
Current Stack version
preferredPlatforms :: (MonadReader env m, HasPlatform env, MonadThrow m) => m [(Bool, String)] Source #
Yield a list of the preferred GHC variants for the platform. The first item
of each pair indicates if the operating system is Windows. The second item
is the name of the GHC variant in Stack's setup-info
dictionary.
downloadStackReleaseInfo Source #
Arguments
:: (HasLogFunc env, HasPlatform env) | |
=> Maybe String | Optional GitHub user. |
-> Maybe String | Optional GitHub repository. |
-> Maybe String | Optional version. |
-> RIO env StackReleaseInfo |
Download information on a binary release of Stack. If there is no given
GitHub user, GitHub repository and version, then first tries
haskellstack.org
.