Haskell
Code written in Haskell is guaranteed to have no side effects ... because no one will ever run it? -- XKCD 1312
Install Haskell
- Winget
- GHCup (officially supported)
Simply run the following command in PowerShell:
winget install -e --id commercialhaskell.stack
Haskell recently changed the recommended installation method to installing GHCup. These instructions are based off https://www.haskell.org/downloads/.
- Install GHC, cabal-install, stack and haskell-language-server via GHCup with the script below:
Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true
There's also a youtube video explaining installation on Windows.
Let's test your installation!
- Type
ghci
in PowerShell. This will open Prelude - Haskell's interactive shell. - Type
2022 + 1
and hitEnter
. - Enjoy Haskell telling you the current year! Woooah! 🥳
Get the VS Code extension
JetBrains do not have an IDE for Haskell, but VS Code works very well with the official Haskell extension!
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! 📚