loading...

Installing Haskell Compiler in Linux

lautarolobo profile image Lautaro Lobo Originally published at lautarolobo.xyz on ・2 min read

Haskell (4 Part Series)

1) What's Haskell? 2) Installing Haskell Compiler in Linux 3) Your First Haskell Function 4) A Recursive Function in Haskell

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:

ghci

Therefore you should see in your console something like this:

GHCi, version x.y.z: http://www.haskell.org/ghc/ :? for help
Prelude>

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!

Haskell (4 Part Series)

1) What's Haskell? 2) Installing Haskell Compiler in Linux 3) Your First Haskell Function 4) A Recursive Function in Haskell

Posted on by:

lautarolobo profile

Lautaro Lobo

@lautarolobo

While you read this I'm learning something new. CS ♥️

Discussion

markdown guide