stack-1.3.0: The Haskell Tool Stack

Safe HaskellNone





setupEnv Source


:: (StackM env m, HasBuildConfig env, HasGHCVariant env) 
=> Maybe Text

Message to give user when necessary GHC is not available

-> m EnvConfig 

Modify the environment variables (like PATH) appropriately, possibly doing installation too

ensureCompiler :: (StackM env m, HasConfig env, HasGHCVariant env) => SetupOpts -> m (Maybe ExtraDirs, CompilerBuild) Source

Ensure compiler (ghc or ghcjs) is installed and provide the PATHs to add if necessary

ensureDockerStackExe :: (StackM env m, HasConfig env) => Platform -> m (Path Abs File) Source

Ensure Docker container-compatible stack executable is downloaded

getSystemCompiler :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m (Maybe (CompilerVersion, Arch)) Source

Get the version of the system compiler, if available

data SetupOpts Source




soptsInstallIfMissing :: !Bool
soptsUseSystem :: !Bool

Should we use a system compiler installation, if available?

soptsWantedCompiler :: !CompilerVersion
soptsCompilerCheck :: !VersionCheck
soptsStackYaml :: !(Maybe (Path Abs File))

If we got the desired GHC version from that file

soptsForceReinstall :: !Bool
soptsSanityCheck :: !Bool

Run a sanity check on the selected GHC

soptsSkipGhcCheck :: !Bool

Don't check for a compatible GHC version/architecture

soptsSkipMsys :: !Bool

Do not use a custom msys installation on Windows

soptsUpgradeCabal :: !Bool

Upgrade the global Cabal library in the database to the newest version. Only works reliably with a stack-managed installation.

soptsResolveMissingGHC :: !(Maybe Text)

Message shown to user for how to resolve the missing GHC

soptsSetupInfoYaml :: !FilePath

Location of the main stack-setup.yaml file

soptsGHCBindistURL :: !(Maybe String)

Alternate GHC binary distribution (requires custom GHCVariant)


defaultSetupInfoYaml :: String Source

Default location of the stack-setup.yaml file

Stack binary download

downloadStackExe Source


:: (MonadIO m, MonadLogger m, MonadReader env m, HasConfig env) 
=> [(Bool, String)]

acceptable platforms

-> StackReleaseInfo 
-> Path Abs Dir

destination directory

-> (Path Abs File -> IO ())

test the temp exe before renaming

-> m ()