- optionally installing a version of [ghc](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/) and [cabal](https://www.haskell.org/cabal/) and adding to PATH.
- optionally installing a version of [Stack](https://haskellstack.org) and adding to PATH.
The GitHub runners come with [pre-installed versions of GHC and Cabal](https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners). Those will be used whenever possible.
For all other versions, this action utilizes [`ppa:hvr/ghc`](https://launchpad.net/~hvr/+archive/ubuntu/ghc), [`ghcup`](https://gitlab.haskell.com/ghcup), and [`chocolatey`](https://chocolatey.org/packages/ghc).
| `ghc-version` | | GHC version to use, ex. `8.8.3` | string | 8.8.3 |
| `cabal-version` | | Cabal version to use, ex. `3.0.0.0` | string | 3.0.0.0 |
| `stack-version` | | Stack version to use, ex. `latest`. Stack will only be installed if this option is set | string | |
| `stack-no-global` | | If specified, stack-version must be set. Prevents installing GHC and Cabal globally | "boolean" | |
| `stack-setup-ghc` | | If specified, stack-version must be set. Runs stack setup to install the specified GHC. (Note: setting this does _not_ imply `stack-no-global`) | "boolean" | 3.0.0.0 |
Recommendation: Cabal is almost always fully backwards compatible and so for most purposes, using the latest available version is sufficient
**Stack:**
-`latest` (recommended) -- follows the latest release automatically.
-`2.1.3`
-`2.1.1`
-`1.9.3.1`
-`1.9.1.1`
-`1.7.1`
-`1.6.5`
-`1.6.3.1`
-`1.6.1.1`
-`1.5.1`
-`1.5.0`
Recommendation: Stack follows SemVer, and additionally attempts to remain backwards compatible across major versions whenever reasonable. Using the latest available version is almost always sufficient
The full list of available versions of GHC, Cabal, and Stack are as follows:
Note: There are _technically_ some descrepencies here. For example, "8.10.1-alpha1" will work for a ghc version for windows but not for Linux and macOS. For your sanity, I suggest sticking with the version lists above which are supported across all three operating systems.