rodrigosantosbr

[Ubuntu >= 12.04] How to install Haskell Compiler

Dec 30th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Installing haskell ( ghc ) compiler

Ubuntu 12.04

sudo apt-get install ghc6

Ubuntu >= 14.04

sudo apt-get install ghc

Create a Hello World Haskell Program file

sudo nano hello.hs

Write a Hello World Haskell Program

-- hello world example
main = putStrLn "Hello, World!"

Compile the haskell program

ghc hello.hs -o hello

Execute the haskell Program

./hello
Add Comment
Please, Sign In to add comment