stack-3.7.1: The Haskell Tool Stack
LicenseBSD-3-Clause
Safe HaskellNone
LanguageGHC2021

Stack.Setup

Description

 
Synopsis

Documentation

setupEnv Source #

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

data SetupOpts Source #

Type representing setup configurations.

Constructors

SetupOpts 

Fields

Instances

Instances details
Show SetupOpts Source # 
Instance details

Defined in Stack.Setup

Methods

showsPrec :: Int -> SetupOpts -> ShowS

show :: SetupOpts -> String #

showList :: [SetupOpts] -> ShowS

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.

downloadStackExe Source #

Arguments

:: HasConfig env 
=> [(Bool, String)]

acceptable platforms

-> StackReleaseInfo 
-> Path Abs Dir

destination directory

-> Bool

perform PATH-aware checking, see #3232

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

test the temp exe before renaming

-> RIO env () 

Download a Stack executable.