Skip to content

Instantly share code, notes, and snippets.

@mathiasverraes
Created June 19, 2016 17:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathiasverraes/ef5b52cccdc6094b6d3e56529745e995 to your computer and use it in GitHub Desktop.
Save mathiasverraes/ef5b52cccdc6094b6d3e56529745e995 to your computer and use it in GitHub Desktop.
haskell intellij + stack setup

https://github.com/rikvdkleij/intellij-haskell

General setup

  • Install latest versions of ghc-mod and haskell-docs;
  • Set file paths to ghc-mod, hlint, stack and haskell-docs in the menu Settings/Other Settings/Haskell.
  • Be sure in Editor/Filetypes that Haskell language file is registered with pattern *.hs and Literate Haskell language file with pattern *.lhs;

Project

  • stack build
  • stack install
  • create project in IntelliJ: File/New/Project...
  • New Project wizard: Haskell module and check Haskell in Additional Libraries and Frameworks;
  • Create GHC SDK with path e.g. /usr/local/bin;
  • In Project structure/Project settings/Modules exclude .stack-work dist, set Source and Test (normally src and test).
  • Tools/Add Haskell package dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment