- Install Xcode 5.1 and enabling command line tools
- Create GHC directory
- I choose it as /opt/local/ghc-7.8.2 and chown’ed to me. 1
$ curl http://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-apple-darwin-mavericks.tar.xz -o ghc-7.8.2.tar.xz
$ xz -dc ghc-7.8.2.tar.xz | tar -xvf -
$ cd ghc-7.8.2
$ ./configure —prefix=/opt/local/ghc-7.8.2
$ make install
Add /opt/local/ghc-7.8.2 to your $PATH (for building cabal)
$ git clone https://github.com/haskell/cabal.git
$ cd cabal/Cabal
$ ghc -threaded --make Setup
$ ./Setup configure --user
$ ./Setup build
$ ./Setup install
Build and Install cabal-install 2
$ cd cabal/cabal-install
$ ./bootstrap.sh --user --no-doc
Add $HOME/.cabal/bin to your $PATH
$ cabal update
$ cabal install haddock
$ cabal install hlint
$ cabal install stylish-haskell
$ cabal install haddock
$ cabal install ghc-mod
Note: Using above installation method, cabal controlled directory structure differs from HaskellPlatform’s one.3