Load a Haskell project into IntelliJ IDEA

🎉I am writing these notes at Brick, a magical mystery no-bullshit publishing platform. Turns out writing goes much faster when I don't have to hit “Publish” or do git commit.

You can use it too — check it out at Brick.do.


Valid as of April 21, 2020


Install IntelliJ-Haskell.

Assuming you have it — it is not enough to simply open the folder with the project. You have to do this:

  • Press Ctl+Shift+A or Cmd+Shift+A (doesn't matter if you already have a project open or you're on the welcome screen). If you're on macOS — you might need to disable this shortcut in Keyboard → Shortcuts → Services, otherwise it will conflict.
  • Type Import Project from Existing Sources, choose the folder.
  • “Haskell Stack”, press Next.
  • Project SDK: “Haskell Tool Stack”, press Finish.

Now IDE support will actually work. Note that it seems to be impossible to do this with an existing project — you have to set it up from scratch.

For more info, see Getting Started in the IntelliJ-Haskell documentation.