Skip to content

Instantly share code, notes, and snippets.

@Microtribute
Last active November 12, 2021 00:09
Show Gist options
  • Save Microtribute/e75052466831582e15d86815cead1e92 to your computer and use it in GitHub Desktop.
Save Microtribute/e75052466831582e15d86815cead1e92 to your computer and use it in GitHub Desktop.
Haskell Environment Separate Installation

A few notes on haskell environment setup

GHC needs the following packages pre-installed:

sudo apt install gcc g++ build-essential curl libffi-dev zlib1g-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5

It might be a good idea to stick to ghcup as it lets us know whenever an upgrade is available. For example:

New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'

Install GHCUP

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

Separate Installation

  • Haskell Stack
curl -sSL https://get.haskellstack.org/ | sh -s - -d /me/Applications/Haskell/stack-latest
  • Glasgow Haskell Compiler

Download the binary distribution from the official download page.

./configure --prefix=/me/Applications/Haskell/ghc-latest
make install
  • Cabal

Download the prebuilt binary package from the download page.

Notes for Windows

You can simply use chocolatery.

choco install haskell-language-server # will also install ghc
# choco install ghc
choco install haskell-stack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment