Haskell · toolchain · setup
Install Haskell with GHCup: the 2026 toolchain guide
If you are starting with Haskell in 2026, the question "how do I install it?" has one clear answer: GHCup. It is the official, cross-platform installer and version manager for the whole toolchain — the compiler (GHC), the build tool (cabal-install), Stack, and the editor backend (HLS, the Haskell Language Server). This guide walks through a clean install, switching versions, and the pitfalls people hit most often.
What GHCup actually manages
GHCup is a single tool that installs and switches between multiple versions of each component, so you are never locked to one compiler:
- GHC — the Glasgow Haskell Compiler.
- cabal-install — the
cabalbuild tool and dependency resolver. - Stack — an alternative build tool with curated snapshots.
- HLS — the Haskell Language Server, which powers autocompletion, type info and refactors in VS Code, Neovim and other editors.
It replaced the older "Haskell Platform" bundle precisely because real projects need different GHC versions, and GHCup makes switching trivial.
Installing GHCup
On Linux and macOS, the official one-liner fetches an interactive installer:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh As with any install script, read what it does first — the source is on GitHub (haskell/ghcup-hs). On Windows, run the PowerShell installer documented on the GHCup site; it sets up the same toolchain plus the required MSYS2 environment.
The installer offers to add GHCup to your shell profile so ghc, cabal and friends are on your PATH. Accept that, then restart your shell.
The interactive way: ghcup tui
The fastest way to manage versions is the terminal UI:
ghcup tui It lists every available GHC, Cabal, Stack and HLS version with their status (installed, set, recommended). You select what to install or activate with the keyboard — no need to memorise commands.
The command-line equivalents
If you prefer scripts or CI, the same actions are plain commands:
# install the recommended versions
ghcup install ghc recommended
ghcup install cabal recommended
ghcup install hls recommended
# make a specific GHC the active one
ghcup set ghc 9.10.1
# see what is installed
ghcup list Use the version numbers GHCup marks as recommended unless a project pins something specific in its cabal.project or stack.yaml.
First build, to confirm it works
cabal update # refresh the package index
mkdir hello && cd hello
cabal init --simple --non-interactive
cabal run If that prints output, your toolchain is healthy. From here, the build itself is parallel by default — see our guide on how Cabal uses your cores, and the deeper changes that landed in Cabal 2.0 and the new-build model.
Common pitfalls
- PATH not updated. If
ghc"command not found" after install, you skipped the profile step — re-run the installer or source~/.ghcup/env. - HLS version mismatch. The Haskell Language Server must support your active GHC. If your editor's HLS fails to load, install the HLS build that matches your GHC via
ghcup tui. - System GHC shadowing GHCup. A GHC installed from your OS package manager can take precedence on
PATH. Prefer the GHCup-managed one and remove or de-prioritise the system package. - Stale package index. Resolution errors after a long gap usually just need
cabal update.
For the vocabulary used across these guides — install plans, snapshots, sandboxes — the older Cabal sandboxes guide covers how isolation evolved into today's per-project builds.
Stack or Cabal after GHCup?
GHCup installs both, so the choice is yours. Cabal with its modern per-project build model is the default most newcomers should start with; Stack adds curated package snapshots that some teams prefer for reproducibility. Both work with the GHC that GHCup manages, and you can switch later without reinstalling the compiler.
FAQ
Is GHCup the official way to install Haskell? Yes — it is the recommended installer on haskell.org and the standard entry point for the toolchain in 2026.
Does GHCup work on Windows? Yes, via its PowerShell installer, which also sets up the MSYS2 environment GHC needs on Windows.
Can I have several GHC versions at once? Yes — that is the whole point. Install many, switch the active one with ghcup set ghc <version>.
Do I still need the Haskell Platform? No. GHCup superseded it; install the components you need individually.