DEV Community

Lautaro Lobo
Lautaro Lobo

Posted on • Originally published at on

Installing Haskell Compiler in Linux

Assuming that you know what Haskell is (if not, read this brief introduction, and you know what the Glasgow Haskell Compiler is (check this if you don’t), I’ll show you how to get GHC up and running in your computer.

First things first, open the terminal and type:

sudo apt-get install haskell-platform

This command should work on the most common Linux distros out there (Debian, Mint, Ubuntu).

Press Enter, and you will be asked to type your password, after you type it you’ll see a list of sugested packages, those won’t be installed, and a list of the packages that will be installed, with the amount of space that they are willing to occupe in your drive. Classic pre-installation info. Then you must type s if you want to proceed with the installation, or n if you regret.

Have in mind that the installation process once you type s, may take some time depending in your internet conection.

Following this simple operation, you have your Glasgow Haskell Compiler installed, ready to use.

If you want to make sure that it’s installed, just open the terminal and simply type:


Therefore you should see in your console something like this:

GHCi, version x.y.z: :? for help

Didn’t work? Tell me in the comments and I'll be glad to help you out!

If you want to write your first Haskell function and test it with GHC, click me!

Top comments (0)