Skip to content

Instantly share code, notes, and snippets.

@robagar
Forked from wting/haskell.md
Created May 22, 2014 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robagar/4b706f8f94616c63c9a1 to your computer and use it in GitHub Desktop.
Save robagar/4b706f8f94616c63c9a1 to your computer and use it in GitHub Desktop.

Choices

  1. Install ghc 7.6.3 and Haskell Platform
  2. Install ghc 7.8.2 and Cabal

Option GHC 7.6.3 + Haskell Platform

GHC 7.6.3

Install Ubuntu 12.04 depencies:

$ sudo aptitude install -y libgmp3c2

Symlink the library:

$ sudo ln -s /usr/lib/libgmp.so.3 /usr/lib/libgmp

Afterwards, download, configure, and install GHC.

$ wget https://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-unknown-linux.tar.bz2
$ tar xvf ghc-7.6.3-x86_64-unknown-linux.tar.bz2
$ cd ghc-7.6.3
$ ./configure --prefix=/opt/ghc
$ make install      # sudo might be necessary

Add /opt/ghc/bin to $PATH.

Haskell Platform 2013.2.0.0

Install Ubuntu 12.04 depencies:

$ sudo aptitude install -y libglc-dev freeglut3 freeglut3-dev

Haskell Platform Ubuntu dependencies:

$ wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
$ tar xvf haskell-platform-2013.2.0.0.tar.gz
$ cd haskell-platform-2013.2.0.0
$ ./configure --prefix=/opt/haskell-platform --enable-unsupported-ghc-version
$ make -j4
$ make install      # sudo might be necessary

Add /opt/haskell-platform/bin to $PATH.

Cabal

Cabal is included as part of Haskell Platform. Go ahead and update it:

$ cabal update && cabal install cabal-install

Some useful packages:

$ cabal install ghc-mod hoogle hlint pointfree

Option GHC 7.8.2 + Cabal

GHC 7.8.2

You cannot currently build Haskell-Platform with 7.8.2, so ignore these build instructions.

Install Ubuntu 12.04 depencies:

$ sudo aptitude install -y libgmp3-dev

Afterwards, download, configure, and install GHC.

$ wget http://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-unknown-linux-deb7.tar.xz
$ tar xvf ghc-7.8.2-x86_64-unknown-linux-deb7.tar.xz
$ cd ghc-7.8.2
$ ./configure --prefix=/opt/ghc
$ make install      # sudo might be necessary

Add /opt/ghc/bin to $PATH.

Cabal

If you are running Ubuntu 12.04 AMD64 you can bootstrap cabal from this binary image.

Otherwise build it from source:

$ wget http://www.haskell.org/cabal/release/cabal-1.18.1.3/Cabal-1.18.1.3.tar.gz
$ tar xvf Cabal-1.18.1.3.tar.gz
$ cd cabal-1.18.1.3
$ ./bootstrap.sh --user

Update cabal:

$ cabal update && cabal install cabal-install

Some useful packages:

$ cabal install ghc-mod hoogle hlint pointfree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment