Skip to content

Instantly share code, notes, and snippets.

@drewr
Last active August 29, 2015 14:06
Show Gist options
  • Save drewr/5cd21898c9c8571a7009 to your computer and use it in GitHub Desktop.
Save drewr/5cd21898c9c8571a7009 to your computer and use it in GitHub Desktop.
Haskell runtime on OS X

Install GHC

D=~/tmp/hs
mkdir -p $D/build
cd $D/build
curl -O http://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-x86_64-apple-darwin.tar.bz2
bzip2 -cd ghc-7.8.3-x86_64-apple-darwin.tar.bz2 | tar xf -
( cd ghc-7.8.3; ./configure --prefix=$D/ghc-7.8.3 && make install )
( cd ~/bin; ln -snf $D/ghc-7.8.3/bin/* . )  # season to taste if you want relative dirs ../tmp/hs/
echo make sure ~/bin is in \$PATH

Install cabal

git clone [email protected]:haskell/cabal.git
( cd cabal/cabal-install; git checkout cabal-install-v1.20.0.3 && NO_DOCUMENTATION=y ./bootstrap.sh )
echo make sure ~/.cabal/bin is in \$PATH
cabal update

Now, use in a project

cd ~/src/project
cabal sandbox init  # so you don't clobber ~/.cabal
cabal update
echo etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment