Ubuntu – Cannot compile Glasgow Haskell Compiler

compilinghaskell

./configure
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for ghc... no
configure: error: GHC is required unless bootstrapping from .hc files.
256

I want to install Glasgow Haskell Compiler, and ./configure asks for GHC. What kind of GHC is it asking for? Global Hadron Collider?
I downloaded the source from http://www.haskell.org/ghc/download_ghc_7_6_3

Best Answer

From the results of apt-cache show ghc :

The Glasgow Haskell Compilation system (GHC) is a compiler for Haskell.  

To install ghc open the terminal and type:

sudo apt-get install ghc  

Create an example Haskell source file, example.hs, containing: main = putStrLn "Hello, World!" To compile example.hs change directories using cd to the directory containing example.hs and type:

ghc -o example example.hs  

To run the executable:

./example  
Related Question