Install Haskell Compiler
Learn how to install the Haskell compiler on a local machine.
We'll cover the following
Haskell compiler
The most popular Haskell compiler is GHC (Glasgow Haskell Compiler). The Haskell website contains installation instructions for GHC on all major platforms including macOS, Linux, and Windows.
After the installation, verify that ghc
is available.
$ which ghc
/Users/quang/.ghcup/bin/ghc
For this course, you can use the ghci
REPL to write Haskell code and evaluate it directly.
$ which ghci
/Users/quang/.ghcup/bin/ghci
Run ghci
and enter some Haskell expressions.
Prelude> 1 + 2 * 3
7
To exit ghci
, use the :quit
command.
Get hands-on with 1200+ tech skills courses.