Haskell development stack: installation guide

Haskell development stack: An installation guide

Here’s my quick how to install the Haskell development stack in your local machine.

The installation of the Haskell toolchain, consists of the following tools:

  • GHC : the Glasgow Haskell Compiler
  • cabal-install : the Cabal installation tool for managing Haskell software
  • stack : a cross-platform program for developing Haskell projects
  • haskell-language-server  (optional): A language server for developers to integrate with their editor/IDE

MacOS#

Install GHC, cabal-install, with option to install stack and haskell-language-server via GHCup

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

It’ll be installed to

$HOME/.ghcup

Once completed, you’ll get

All done!

To start a simple repl, run:
  ghci

To start a new haskell project in the current directory, run:
  cabal init --interactive

To install other GHC versions and tools, run:
  ghcup tui

If you are new to Haskell, check out https://www.haskell.org/ghcup/install/#first-steps

References

https://www.haskell.org/downloads/

https://www.haskell.org/ghcup/install/#installation

Windows#

Install the applications package manager Chocolatey (Chocolatey is a machine-level, command-line package manager and installer for Windows software)

choco install haskell-dev haskell-stack

Followed by

refreshenv

References

https://chocolatey.org/install#individual

comments powered by Disqus