Skip to main content

Haskell

Code written in Haskell is guaranteed to have no side effects ... because no one will ever run it? -- XKCD 1312

Install Haskell

Paste the following command to your Terminal window:

brew install ghc cabal-install haskell-stack haskell-language-server

This make take a while to install all necessary Haskell components. Once finished, let's test your installation:

  1. Type ghci in terminal. This will open Prelude - Haskell's interactive shell.
  2. Type 2022 + 1 and hit Enter.
  3. Enjoy Haskell telling you the current year! Woooah! 🥳
tip

To close Prelude, simply hit Ctrl+D. Just like in Python!

Get VS Code extension

JetBrains do not have an IDE for Haskell, but VS Code works very well with the official Haskell extension!

haskell extensions

tip

Cool! You're all set to start your journey with functional programming. Psst... There is a pretty good online guide to Haskell: Learn You A Haskell for Great Good! 📚