Haskell

OSX: Setup Haskell on Intellij IDEA CE

These are my notes step by step to install haskell development kit on OSX.

After that we need install some package thru cabal (Haskell build tools)

$ cabal update && cabal install ghc-mod

Go back to intellij idea, select “Preferences > Language & Frameworks > Haskell”
then adjust with your configuration below.
Screen Shot 2016-08-09 at 10.20.36 AM

Update 30 August 2016:
Sometime you will get error once you installing “ghc-mod”, because I’m installing on another laptop and got this error.

cabal: Error: some packages failed to install:
ghc-mod-5.6.0.0 depends on haskell-src-exts-1.17.1 which failed to install.
haskell-src-exts-1.17.1 failed during the configure step. The exception was:
ExitFailure 1
hlint-1.9.35 depends on haskell-src-exts-1.17.1 which failed to install.

I fix this issue by installing “haskell-src-exts-1.17.1″ manually, but don’t forget to install “happy” because it’s required to install “haskell-src-exts”.

$ cabal install happy
$ cabal install haskell-src-exts-1.17.1
$ cabal install ghc-mod # continue the ghc-mod installation.