LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ghcup

Universal installer for the Haskell toolchain

TLDR

Install GHC version
$ ghcup install ghc [9.4.7]
copy
Install latest GHC
$ ghcup install ghc
copy
Set default GHC
$ ghcup set ghc [9.4.7]
copy
Install Cabal
$ ghcup install cabal
copy
Install HLS
$ ghcup install hls
copy
List available and installed tools
$ ghcup list
copy
Remove a GHC version
$ ghcup rm ghc [9.4.7]
copy
Interactive TUI
$ ghcup tui
copy
Upgrade ghcup itself
$ ghcup upgrade
copy

SYNOPSIS

ghcup command [options]

DESCRIPTION

ghcup is the universal installer and version manager for the Haskell toolchain. It provides a centralized way to install, manage, and switch between multiple versions of GHC, Cabal, Stack, and HLS (Haskell Language Server).The tool handles downloading, installing, and setting up PATH entries for all Haskell development tools. It supports installing specific versions, setting global defaults, and maintaining multiple versions side-by-side. The interactive TUI mode provides a visual interface for managing installations.

PARAMETERS

ghc

Glasgow Haskell Compiler.
cabal
Cabal build tool.
hls
Haskell Language Server.
stack
Stack build tool.

CONFIGURATION

~/.ghcup/config.yaml

Configuration file for ghcup settings, download mirrors, and caching preferences.
~/.ghcup/bin/
Installation directory for all managed toolchain binaries.

SUBCOMMANDS

install

Install tool.
set
Set default version.
list
List versions.
rm
Remove version.
upgrade
Upgrade ghcup.
tui
Interactive interface.
whereis
Show tool location.
run
Run a command with a specific toolchain version.
gc
Garbage collect old versions.

SEE ALSO

ghc(1), cabal(1), stack(1)

Copied to clipboard
Kai