This APT repository provides convenient .deb packages for GHC & Cabal releases which can also be installed side-by-side for convenient working/testing with multiple/older GHCs and/or CI systems.
These packages are structured as follows:
ghc-$VER | (core package, contains ghc and executables such as haddock) |
ghc-$VER-dyn | (contains dynamic libraries for version prior to GHC 7.8) |
ghc-$VER-prof | (contains profiling libs) |
ghc-$VER-htmldocs | (contains generated HTML Haddock output) |
The GHC packages install into a respective version-indexed /opt/ghc/$VER/ folder and so in order to use them, one way is to bring a particular GHC version into scope by placing the respective /opt/ghc/$VER/bin folder early in the PATH environment variable.
There's also a /opt/ghc/bin (& /opt/cabal/bin) folder which contains version-suffixed symlinks to all currently installed GHC versions for convenient use with Cabal where you can select the desired GHC version simply by the -w CLI flag like in cabal v2-build -w ghc-7.8.4
The default ghc symlinks are idiomatically managed by update-alternatives(1) and can be configured via
sudo update-alternatives --config opt-ghc
sudo update-alternatives --config opt-cabal
Note that /opt/ghc/bin also contains a default symlink for cabal, so it's enough to include /opt/ghc/bin in your PATH to get access to both cabal and ghc.
If you have any feature requests or encounter any issues, please report them here.
For Ubuntu, please refer to the ppa:hvr/ghc PPA.
NOTE: Currently, only amd64 binaries are provided; let us know if there's demand for other architectures.
apt edit-sources
and add the respective line for your Debian release:
deb http://downloads.haskell.org/debian bullseye main
deb http://downloads.haskell.org/debian buster main
deb http://downloads.haskell.org/debian stretch main
deb http://downloads.haskell.org/debian jessie main
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574
or alternatively
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BA3CBA3FFE22B574
in case port 11371 is blocked by your firewall
apt update
apt install ghc-8.4.4 cabal-install-3.0
update-alternatives --config opt-ghc
update-alternatives --config opt-cabal
Unless configured manually, the default symlinks point to the latest stable version in "auto mode".
NOTE: Debian 11 includes packages named ghc and cabal-install which provide GHC 8.8.4 and Cabal 3.0.0.0 respectively (and which install to /usr/bin/).
See version tables at the bottom of this page for details.NOTE: Debian 10 includes packages named ghc and cabal-install which provide GHC 8.4.4 and Cabal 2.2.0.0 respectively (and which install to /usr/bin/).
See version tables at the bottom of this page for details.NOTE: Debian 9 includes packages named ghc and cabal-install which provide GHC 8.0.1 and Cabal 1.24.0.1 respectively (and which install to /usr/bin/).
See version tables at the bottom of this page for details.NOTE: Debian 8 includes packages named ghc and cabal-install which provide GHC 7.6.3 and Cabal 1.20.0.3 respectively (and which install to /usr/bin/).
See version tables at the bottom of this page for details.GHC releases for which the respective Cabal version is also available (albeit packaged differently) as part of the Debian distribution are highlighted blue in the table below.
Debian 11 "bullseye" |
Debian 10 "buster" |
Debian 9 "stretch" |
Debian 8 "jessie" |
|
---|---|---|---|---|
cabal-install-3.6 | 3.6+git20220303.2.6046687-6~deb11 | 3.6+git20220303.2.6046687-6~deb10 | 3.6+git20220303.2.6046687-6~deb9 | ∅ |
cabal-install-3.4 | 3.4.0.0+git20210220.2.be18bb7-6~deb11 | 3.4.0.0+git20210220.2.be18bb7-6~deb10 | 3.4.0.0+git20210220.2.be18bb7-6~deb9 | ∅ |
cabal-install-3.2 | ∅ | 3.2+git20200214.2.b353baa-6~deb10 | 3.2+git20200214.2.b353baa-6~deb9 | ∅ |
cabal-install-3.0 | ∅ | 3.0+git20200215.2.78f9ec2-6~deb10 | 3.0+git20200215.2.78f9ec2-6~deb9 | ∅ |
cabal-install-2.4 | ∅ | ∅ | 2.4+git20181125.1.5e65672-6~deb9 | ∅ |
cabal-install-2.2 | ∅ | ∅ | 2.2+git20180328.0.987570d-6~deb9 | ∅ |
cabal-install-1.24 | ∅ | ∅ | ∅ | 1.24+git20161009.0.5ae289e-1~deb8 |
GHC releases for which the respective GHC version is also available (albeit packaged differently) as part of the Debian distribution are highlighted blue in the table below.
Debian 11 "bullseye" |
Debian 10 "buster" |
Debian 9 "stretch" |
Debian 8 "jessie" |
|
---|---|---|---|---|
ghc-9.0.1{,-dyn,-htmldocs,-prof} | 9.0.1-10~deb11 | 9.0.1-10~deb10 | 9.0.1-10~deb9 | ∅ |
ghc-8.10.4{,-dyn,-htmldocs,-prof} | 8.10.4-19~deb11 | 8.10.4-19~deb10 | 8.10.4-19~deb9 | ∅ |
ghc-8.10.3{,-dyn,-htmldocs,-prof} | ∅ | 8.10.3-19~deb10 | 8.10.3-19~deb9 | ∅ |
ghc-8.10.2{,-dyn,-htmldocs,-prof} | ∅ | 8.10.2-17~deb10 | 8.10.2-17~deb9 | ∅ |
ghc-8.10.1{,-dyn,-htmldocs,-prof} | ∅ | 8.10.1-17~deb10 | 8.10.1-17~deb9 | ∅ |
ghc-8.8.4{,-dyn,-htmldocs,-prof} | 8.8.4-17~deb11 | 8.8.4-17~deb10 | 8.8.4-17~deb9 | ∅ |
ghc-8.8.3{,-dyn,-htmldocs,-prof} | ∅ | 8.8.3-17~deb10 | 8.8.3-17~deb9 | ∅ |
ghc-8.8.2{,-dyn,-htmldocs,-prof} | ∅ | 8.8.2-17~deb10 | 8.8.2-17~deb9 | ∅ |
ghc-8.8.1{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.8.1-12~deb9 | ∅ |
ghc-8.6.5{,-dyn,-htmldocs,-prof} | 8.6.5-16~deb11 | 8.6.5-16~deb10 | 8.6.5-9~deb9 | ∅ |
ghc-8.6.4{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.6.4-9~deb9 | ∅ |
ghc-8.6.3{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.6.3-9~deb9 | ∅ |
ghc-8.6.2{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.6.2-9~deb9 | ∅ |
ghc-8.6.1{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.6.1-9~deb9 | ∅ |
ghc-8.4.4{,-dyn,-htmldocs,-prof} | 8.4.4-16~deb11 | 8.4.4-16~deb10 | 8.4.4-9~deb9 | ∅ |
ghc-8.4.3{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.4.3-8~deb9 | ∅ |
ghc-8.4.2{,-dyn,-htmldocs,-prof} | ∅ | ∅ | 8.4.2-7~deb9 | ∅ |
ghc-8.2.2{,-dyn,-htmldocs,-prof} | 8.2.2-16~deb11 | 8.2.2-16~deb10 | 8.2.2-3~deb9 | ∅ |
ghc-8.0.2{,-dyn,-htmldocs,-prof} | 8.0.2-16~deb11 | 8.0.2-16~deb10 | 8.0.2-14~deb9 | ∅ |
ghc-8.0.1{,-dyn,-htmldocs,-prof} | ∅ | ∅ | ∅ | 8.0.1-13~deb8 |
ghc-7.10.3{,-dyn,-htmldocs,-prof} | 7.10.3-16~deb11 | 7.10.3-16~deb10 | 7.10.3-14~deb9 | 7.10.3-13~deb8 |
ghc-7.8.4{,-dyn,-htmldocs,-prof} | ∅ | 7.8.4-16~deb10 | 7.8.4-14~deb9 | 7.8.4-13~deb8 |
ghc-7.6.3{,-dyn,-htmldocs,-prof} | ∅ | 7.6.3-16~deb10† | 7.6.3-14~deb9† | 7.6.3-13~deb8 |
ghc-7.4.2{,-dyn,-htmldocs,-prof} | ∅ | 7.4.2-16~deb10† | 7.4.2-14~deb9† | 7.4.2-13~deb8 |
ghc-7.2.2{,-dyn,-htmldocs,-prof} | 7.2.2-16~deb11† | ∅ | ∅ | 7.2.2-13~deb8 |
ghc-7.0.4{,-dyn,-htmldocs,-prof} | 7.0.4-16~deb11† | 7.0.4-16~deb10† | 7.0.4-14~deb9† | 7.0.4-13~deb8 |
ghc-7.0.1{,-dyn,-htmldocs,-prof} | 7.0.1-16~deb11† | 7.0.1-16~deb10† | 7.0.1-14~deb9† | ∅ |
† Due to technical limitiations the respective ghc-x.y.z-dyn package for this release is not available.