6

I have a Haskell program that I want to run on my school's cluster, but their version of GHC is too old and they won't update it. I want to somehow package it with my source code, but by default it requires running an install script. Is there a way for me to get an up-to-date Haskell compiler executable that will still work if I send it to another machine?

I could just cross-compile my code locally and send the executable over, but I'd rather it be buildable on the cluster itself.

1 Answers1

11

When I had this problem, I just installed GHC in my home directory:

$ wget http://www.haskell.org/ghc/dist/7.6.1/ghc-7.6.1-i386-unknown-linux.tar.bz2
$ tar xjvf ghc-7.6.1-i386-unknown-linux.tar.bz2
$ cd ghc-7.6.1-i386-unknown-linux
$ ./configure --prefix=/home/user/bin/ghc-7.6.1
$ make install
$ export PATH=/home/user/bin/ghc-7.6.1/bin:$PATH

After that you'll be able to use the latest GHC on your account.