Hacker News new | ask | show | jobs
by InvOfSmallC 2506 days ago
What would be the best IDE/editor for Haskell?
11 comments

We're gonna have AGI before we have a good IDE for Haskell. Spacemacs seems to be the best option at the moment with https://github.com/haskell/haskell-ide-engine.
I'm curious about this too.

Every once in a while I try going through the editor setups in this chart - https://github.com/rainbyte/haskell-ide-chart. But I run into lots of friction in any one I try. Between using the REPL, getting harmony in the project libraries and the IDE engine libraries, and learning a new editor, I run out of energy to also learn the language ecosystem (libraries, concepts, idioms, package managers).

An IDE that that surfaced everything the language encodes seems like it would lower the learning curve of Haskell. And every year it seems a little closer. Is there anything close to a jetbrains/visual studio/xcode yet?

It seems like all the type safety would be valuable enough that companies would pay for/invest in the ecosystem. Learning the ecosystem has been more challenging than learning the language at this point for me.

Emacs works very well. Haskell is the second best emacs experience I've ever had, second only to Lisp.

Things were not always this way. Just a few years ago, it was a bad experience, so if you have bad memories, it may be time to try again.

I used Haskell on Emacs a few weeks ago and there still seems to be some issues with regards indentation.
Ouch, it has been so long that I have forgot about this. Add this to your emacs init script somewhere:

    (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
It is also not compatible with older versions of intero and haskell-mode, so if you have old configuration there, you may want to remove it.

Honestly, it's even weird this isn't on by default.

That's strange. I don't have anything like that in my .emacs but I do get indentation automatically for Haskell files. I do have a recent dante-mode though. Perhaps dante-mode turns it on automatically?
Thanks!
Editor of your choice in one window and ghcid, which shows compiler errors and warnings on change of file, in another window.

From time to time a web browser to search a function in hoogle [1] and ghci (the interpreter console) to interactively try something out.

Honestly, I come to the conclusion, that at least for Haskell I do NOT need an IDE. I would need it for Java and other imperative languages that have huge libraries.

Haskell is one of the languages where it is a better investment of learning the language that spending time searching a good IDE.

You can use a language server with Atom. Beware of stuff breaking (barely any ABI compatibility), and it taking like 12G ram, however.

Otherwise you can also integrate a language server with Vim or Emacs.

Anything that highlights other instances of what you highlight yourself.

My pick is Kate on KDE. But I've been using vscode as well so I'm not tied to OSs that can run Kate.

I used to love Emacs + Intero but now I use VSCode with the Haskell plugins for syntax hilighting, code completion, and syntax error flagging.
Vim.
Yup, that's what I use. Just like for any other language, it works great.
I tried spacemacs with intero for a while, but I'm now using https://github.com/haskell/haskell-ide-engine + vscode + vimmode. Mostly because I'm using vscode in my work and I don't want to invest more into emacs.
I use the exact same setup and like it a lot.
I would contest the other commenters and say that vscode + haskero (intero integration) is the simplest and most robust method of Haskell programming at the moment.

Add in ghcid for continuous builds and it's almost ideal.

I used Sublime and it was just fine, I didn't feel the need for anything else.