doc: change order of stack integration recommendations

This commit is contained in:
Adam Bergmark 2023-10-11 14:15:30 +02:00 committed by GitHub
parent 2f107197d4
commit 8696a1c710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,17 +214,7 @@ url-source:
Stack manages GHC versions internally by default. In order to make it use ghcup installed Stack manages GHC versions internally by default. In order to make it use ghcup installed
GHC versions there are two strategies. GHC versions there are two strategies.
### Strategy 1: System GHC (works on all stack versions) ### Strategy 1: Stack hooks (new, recommended)
You can instruct stack to use "system" GHC versions (whatever is in PATH). To do so,
run the following commands:
```sh
stack config set install-ghc false --global
stack config set system-ghc true --global
```
### Strategy 2: Stack hooks (new, recommended)
Since stack 2.9.1 you can customize the installation logic of GHC completely, see [https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation](https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation). Since stack 2.9.1 you can customize the installation logic of GHC completely, see [https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation](https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-installation-customisation).
@ -246,6 +236,16 @@ stack config set system-ghc false --global
By default, when the hook fails for whatever reason, stack will fall back to its own installation logic. To disable By default, when the hook fails for whatever reason, stack will fall back to its own installation logic. To disable
this, run `stack config set install-ghc false --global`. this, run `stack config set install-ghc false --global`.
### Strategy 2: System GHC (works on all stack versions)
You can instruct stack to use "system" GHC versions (whatever is in PATH). To do so,
run the following commands:
```sh
stack config set install-ghc false --global
stack config set system-ghc true --global
```
### Windows ### Windows
On windows, you may find the following config options useful too: On windows, you may find the following config options useful too: