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.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s