Contact FutureLearn for Support
Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.
ghc screenshot
Running ghc in a terminal

Installing Haskell for Yourself

GHC stands for the ‘Glasgow Haskell Compiler’. This is actually a set of components that allow you to execute Haskell programs on your local machine.

GHC works on Windows, Mac and Linux - although you will need to follow different instructions below for each operating system. Sadly, it does not currently run on mobile devices. There are alternative systems available, like Raskell for iOS.

The two bundled distributions of GHC are the Haskell Platform and Stack. We give instructions for installing the Haskell Platform below, since this is what we use. However many people prefer Stack. Perhaps it’s best to consult the comments section to see what other learners are saying, then make your choice.

Windows

Download the installation program and follow the instructions. If you have a recent Windows version (7 or later) you will probably use the 64-bit Haskell. If you have an earlier Windows, you might need the 32-bit version.

Mac OS X

Download the installation program and follow the instructions. You can also use MacPorts or build from source if you are feeling more adventurous.

Linux

Follow the instructions for your distro. Most common distros have haskell-platform as a package in their package managers. You could also build from source if you are feeling more adventurous.

How do I know it works?

You will need to open a terminal (cmd.exe on Windows, terminal on Mac OS, xterm on Linux) and type in ghci then press enter. If you see the prompt as in the screenshot above, then everything is ok. Type :help then press enter for an overview of the available commands; type :quit then press enter to finish ghci.

What if it doesn’t work?

Check the comments below. If you seem to be having a different problem, then post your own comment below and we will get back to you as soon as possible.

Share this article:

This article is from the free online course:

Functional Programming in Haskell: Supercharge Your Coding

University of Glasgow

Course highlights Get a taste of this course before you join:

  • Brief History of Haskell
    Brief History of Haskell
    article

    What are the origins of the Haskell programming language? In this article, Dr Jeremy Singer explores the history of Haskell.