Haskell Installation
Its not as easy as installing node, but the docs made it clear and straightforward. There are 2 different ways to setup Haskell on your computer, using GHC or Stack. In this tutorial, we will use GHC (Glasgow Haskell Compiler).
There are 2 different ways to setup ghc on your computer. Depends on your Operating System; Widows or Linux/OS X/FreeBSD. You appear to be running Not known.
Linux, OS X and FreeBSD
- Install GHC, cabal-install and haskell-language-server via GHCup.
GHCup
ghcup is an installer for the general purpose language Haskell. Get started by installing ghcup.
Installing ghcup
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Make sure GHCup, GHC, Cabal is installed by running
ghcup --version
ghc --version
cabal --version
It should print
The GHCup Haskell installer, version v0.1.16.2
The Glorious Glasgow Haskell Compilation System, version 8.10.7
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
or other version.
Full ghcup
functionality via cli:
# list available ghc/cabal versions
ghcup list
# install the recommended GHC version
ghcup install ghc
# install a specific GHC version
ghcup install ghc 8.2.2
# set the currently "active" GHC version
ghcup set ghc 8.4.4
# install cabal-install
ghcup install cabal
# update ghcup itself
ghcup upgrade
Windows
- Configure Chocolatey on your machine.
- At an elevated command prompt, run
choco install haskell-dev
, followed byrefreshenv
.