GHCup

Updated: 28 July 2026

Post installation

https://www.haskell.org/ghcup/steps/
https://www.haskell.org/ghcup/steps/#using-external-packages-in-ghci
https://www.haskell.org/ghcup/steps/#creating-a-proper-package-with-modules

Start a REPL

ghci

Start a haskell project in the current directory

cabal init --interactive

Install other GHC versions and tools

ghcup tui

runghc interprets a source file instead of compiling it and does not create build artifacts

runghc hello.hs

Functional Programming

Updated: 17 September 2025

See Functional programming concepts

  • One of the most fundamental concepts of typed functional programming is immutability.
  • In practice, working with immutable values means that you change your approach to programming from, “I need to change something”, to “I need to produce a new value”
Pure functions
Always evaluate to the same value for the same input and have no side effects. This is analogous to a mathematical function.