share
Stack OverflowWhat are my IDE/Editor choices for Haskell?
[+190] [18] Jason Dagit
[2008-09-16 01:21:28]
[ haskell ide editor ]
[ http://stackoverflow.com/questions/68504/what-are-my-ide-editor-choices-for-haskell ]

I typically use Emacs with hasktags for editing Haskell but I would like to enumerate all the choices and hopefully get feedback on each.

If you've used one of the above, please tell me what you liked and didn't like about using it as a Haskell editor. I'm especially looking for something that gives me control over lots of the project management issues. Hopefully it can quickly navigate to source, show me haddock snippets on demand, look up type signatures and even help with refactoring. Further integration with hoogle and lambdabot are appreciated as well.

(9) Should be community wiki. - sastanin
gedit and ghci for me - PyRulez
Hide and Visual Haskell are probably discontinued - NoIdeaHowToFixThis
Chris Done has written a wiki for Emacs & Haskell mode : github.com/haskell/haskell-mode/wiki and chrisdone.com/posts/haskell-mode-docs - artella
[+94] [2010-12-08 23:25:29] Dan Burton

I've been trying out Leksah (Haskell backwards with one L, in case you didn't notice). As I've worked through (among other things) the "99 problems for Haskell" and "20 intermediate Haskell problems", after some adjustment I've been fairly satisfied with Leksah.

Likes

By default, it attempts to compile your code every time you stop typing for about two seconds. It has some useful features for finding compile-time bugs and fixing them. It lets you execute code from within the editor, which is nice.

Another bonus is that it turns -> and => into actual arrow symbols, \ turns into a lambda symbol, and the . function is also transformed into its little circle symbol. The actual source file is unchanged, but inside the editor the symbols appear. It gives me a strange sense of superiority and pleasure to see these symbols in my code, and it's nice that I don't have to go copy/paste or hunt down the unicode symbol in order to get these symbols in there.

Also, I like how I can just cabal install leksah. Or if you're not into cabal, installers exist [1] for Windows, Mac, and various Linux distros. It's open sourced under a GPL licence on hackage [2].

Dislikes

Annoyances include the requirement to set up a new "package" even if you just want to code up a quick little .hs script. It's a heavyweight compared to vim or emacs, which again is annoying for someone like me who frequently likes to try out snippets of .hs code that are slightly longer than is comfortable to write straight in ghci. Autocomplete is also quite zealous. Since type signatures in haskell often look something like a -> a , when you type the final 'a' and hit enter, it chooses the first autocomplete thing it finds that starts with 'a', which is ridiculous. Autocomplete has been improved upon since I wrote that.

Conclusion

If you get the same odd pleasure from symbols in your code and constant compilation, then you're like me, and you will like Leksah. Leksah has lots of useful tools if you intend to create packages and libraries and such; I highly recommend you at least try it out to see if it serves your needs.

[1] http://leksah.org/download.html
[2] http://hackage.haskell.org/package/leksah

(5) +1 for Leksah, my new IDE of choice for any cabalized Haskell project. It's overkill for small scripts (for which I use either Notepad++ or Geany, depending on if I'm in Windows or Linux). And I've actually turned off the eye candy -- turning \ into lambda, etc. -- because I find it distracting. Autocompletion is definitely overeager. But a great tool nonetheless. - rtperson
(15) Also, just thought I'd mention: bonus points for Leksah because it is written in Haskell. - Dan Burton
(2) Does Leksah have a lambdabot, hlint, and hoogle integration? - missingfaktor
(1) It hasn't been updated for ~ 1 year, which worries me, and it seems to want you to use its version of ghc. - alternative
@monadic it seems you spoke just barely too soon: ANNOUNCE : Leksah 0.12, though I do agree it would be better if you could pick which version of ghc is used. - Dan Burton
@Dan Burton Awesome! Just need an ebuild for it now ;) - alternative
Unfortunately the 'candy' doesn't seem to work on OS X, but otherwise I agree with this answer. I've been doing some web development in Leksah with Snap and overall it's a great IDE. - Zach Conn
(1) @ZachConn The candy does work on OS X if you switch to a font with the appropriate glyphs. Deja Vu Sans Mono works for me. - Dylan
1
[+52] [2008-09-16 13:00:44] Dan Dyer

I've mostly been using Vim. There are some instructions here [1] about how to tweak your Vim config for Haskell.

I did also try using IntelliJ IDEA, which I use for Java. I found a syntax-highlighting extension [2] for it.

EDIT: You can also add Haskell refactoring support to Vim and Emacs with the HaRe [3] (Haskell Refactorer) project. I haven't tried it myself.

[1] http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/Vim/vim.html
[2] http://wiki.workingmouse.com/index.php/IntelliJ_IDEA_Haskell
[3] http://www.cs.kent.ac.uk/projects/refactor-fp/hare.html

What did you like and dislike about using Vim for this task? - Jason Dagit
(13) Vim is Vim. You probably already know whether you love it or hate it. It's available on all the platforms that I use and it isn't Emacs. A combination of Vim and GHCi works reasonably well for me when developing Haskell. I can navigate between multiple files fairly painlessly. - Dan Dyer
(2) i second the comment about the Vim learning curve - Matt
(2) The Workingmouse link is now down. Try ideah for Haskell support in IntelliJ IDEA. - Daniel Alexiuc
ideah either doesn't seem to work with the latest Haskell Platform, or with the latest (12.x) version of IntelliJ. - Fractal
(1) The link for tweaking your vim config appears to be a former staff page at Kent Uni, i restored to github.com/laurilehmijoki/haskellmode-vim - Opentuned
I don't think it's worth arguing about the steep learning curve of vim in the context of haskell... - SztupY
2
[+40] [2013-09-05 22:55:21] Dan Burton

The FP Haskell Center [1], developed by FP Complete, claims to be:

The world’s first commercial Haskell IDE and deployment platform.

It's in the cloud, and comes with all of the libraries on Stackage [2] ready to go. (Basically, the Haskell Platform on steroids.)

It's "in the cloud," which has its pros and cons. The editor is entirely in your browser, and has integration with Github. One particularly cool feature is that you can spin up temporary web servers to test out the Haskell-powered website you might be coding up. It's really easy, and you can pay for FP Complete to host your permanent application, too.

There's a free trial, with free academic licenses and paid commercial licenses. According to a recent email from FP Complete, there will be "personal" licenses in a few weeks as well, since the commercial pricing is a bit steep for hobbyists.

[1] https://www.fpcomplete.com/business/haskell-center/overview/
[2] https://github.com/fpco/stackage

(2) There is no REPL yet :-( - Dmitry Sobolev
3
[+32] [2010-10-01 06:10:37] Phob

The Haskell mode for Emacs is nice. The auto-indentation works pretty well and it has nice in-editor support for sending your code to the Haskell interpreter or searching Hoogle for a function name or type.

Edit: Did I mention it has support for literate Haskell files? Also, I forgot to mention it, but it obviously has syntax highlighting.


4
[+23] [2009-09-08 16:35:53] Francis

I am surprised no one has mentioned notepad++. Can't really be called an IDE (but that's the case for most of those that were named in this thread anyway) but it highlights haskell syntax and has nice features as an editor.


(13) -1: I'll sacrifice wasted points and downvote to bump Vim answer (notepad++ is far more poor). - gorsky
(17) Vim is only beneficial to those who want to take the time and effort to learn it. Its not exactly a shallow learning curve. Notepad++ provides a reasonably good editor without the learning curve. - Daniel Brotherston
(1) -1 I cannot consider Notepad++ a serious IDE. I like to use it for small things like briefly looking at some HTML source, but would never use it for a large project. - Alex Baranosky
(11) I think Notepad++ is windows only. Most Haskell hackers appear to be on different platforms than windows, so to a large degree that probably kills its popularity here. - Jason Dagit
(10) Notepad++ has so few features compared to Vim, this comment is like suggesting to clean a Bathroom with a toothbrush instead of all the better tools because, after all, they're both just cleaning tools are they not. No, use Vim because in the long run I can guarantee that you will see why; the moment that you really start to use Vim's true feature set. - Robert Massaioli
(1) Notepad++ is not a good tool for intensive haskell programming =p - Alessandro Stamatto
(5) I'm a die hard VIM user but I must say most of us are very religious. I actually agree that VIM's learning curve is too steep to suggest anyone not already using it. Notepad++ seems to be a viable alternative (though my personal favorite would be EclipseFP) - kizzx2
I do use Notepad++ at work. It is either this or regular notepad. - Alexandre C.
-1: <sarcasm> And I am surprised no one has mentioned nano or xedit. </sarcasm> By name, Notepad++ wants to be compared to Notepad (salesman trick: thing is better than sth popular), which is like the most incompatible ancient unloved worst-case-of-all-OS text editors. The question is about "what is good for programming Haskell?", not "what are the most lightweight text editors?". - comonad
5
[+17] [2012-12-15 17:22:51] SoleSoul

I found the best solution for me to be Sublime Text [1].

It is a modern, cross-platform (Mac, Linux and Windows) general purpose editor. You can't call it an IDE, but it has basic project management, and you can run your Haskell code from within the editor.

Why I use it instead of a real IDE?

  • It is lightweight and well designed.
  • I can use it across all of my operating systems.
  • When programming in Haskell I don't miss the IDE features which are so important when programming in C++.
  • Useful also for other languages.

Sublime Text is not free, but the evaluation period is unlimited so you can make sure you are comfortable with the software before buying it.

[1] http://www.sublimetext.com/

(4) add SublimeHaskell to SublimeText and you have almost a full Haskell-IDE :D - Carsten König
6
[+14] [2010-10-12 20:32:12] user293588
(2) This is just what I needed - a way to write code in a slightly more comfortable way than ghci (writing functions on separate lines). - teo
seems to be a lightweight Haskell editor (looks like geany.org) with GHCi and a TOC widget for Functions/DataTypes/... - comonad
7
[+11] [2008-10-13 10:06:50] Friedrich

I agree with the comments about FUD. Haskell is as ready as a language can be. Unfortunatly it's also true that the whole "support tools" -- one is used to e.g in Smalltalk, Java, C, C++, Delphi, Visual Basic etc etc. -- is lacking. There is just the beginning of a debugger, in that regard e.g Ocaml is miles ahead of Haskell. Browsing facilities are also very "doubtful".

I'm using XEmacs mostly, but am fully aware that I wished for better support. I guess in the end not too many are that "unhappy" with it. Maybe it's just me....

Regards


What are browsing facilities? - Jason Dagit
(2) Well in Smalltalks there is alwaya a browser to browse the hierachy of Classes, one has something similiar in Haskell like e.g Num etc. and of course you've types like lists etc, and I'd found it nice if one could easy browse those types. - Friedrich
(1) Leksah has good support for browsing. I've been pleasantly surprised by it. - rtperson
8
[+11] [2010-10-13 08:15:13] sastanin

I use both Vim and Emacs for Haskell. I feel myself more productive with Vim, but Emacs is better for literate Haskell, because it has mmm-mode (different indentation rules for code chunks).

As for editors with no learning curve, gedit edits Haskell well too.

I don't use an IDE, but I keep an editor window and a terminal with ghci open side by side. This allows me to try and experiment with the code as I write it, or try something in GHCi first, and then write the code. I build the program with cabal and test it in another terminal tab. The browser with documentation and references usually stays open on the other virtual desktop, one key press away.


9
[+11] [2010-11-25 04:20:59] Roman A. Taycher

I use Kate, it has good syntax highlighting support and an embedded terminal to load/test things in ghci.

It also has a fairly simple support for sessions(groups of files).


10
[+10] [2008-11-21 22:45:18] Chris

I've used EclipseFP and I thought it was "good enough", but I surely wouldn't call it great. Basic syntax highlighting (including the preamble but annoyingly hopeless at helping me with parentheses) and it integrates with the standard Outline view for navigation and a console view for an interactive GHCi or hugs session. That's pretty much it. It's a bit quirky depending on which Eclipse perspective you try to do things in, and I've had cases where the background compilation has either returned unhelpful error messages or simply stopped working at all.

Other than that, it doesn't offer much over a vanilla text editor. I still end up using :t and :r in the interactive session a lot, and still end up in a shell and digging out command-line options from the html help. There still seems to be a massive void for good 'visual' tools.


11
[+7] [2011-10-17 19:52:48] Neil Mayhew

Nobody mentioned Scion [1] yet. Although not an IDE itself, it's a library and server that adds significant functionality to editors such as Emacs and Vim. It's written in Haskell, and aims to avoid duplication of IDE functionality in lots of independent projects.

Support for Emacs and Vim is included within Scion itself, but there is some community-produced code for other editors, and it looks like it wouldn't be too hard to develop plug-ins for other editors such as gedit [2].

I haven't used Scion myself yet, but I will be giving it a try soon. It might be more suitable for the one-file projects for which Leksah is overkill.

[1] https://github.com/nominolo/scion/tree#readme
[2] http://projects.gnome.org/gedit/

12
[+5] [2008-11-04 18:55:07] Chuck Vose

Try out E/TextMate. It has a Haskell Bundle for highlighting/folding, snippets of commonly used code and very tight integration with the shell for quick commands and building your own commands.

It doesn't auto-complete code, but it is light as hell and stays out of your way in the same way as Vi/Emacs (for which we love them).

main program (OS X) [1]

main program (Windows) [2]

get the haskell language bundle [3]

[1] http://macromates.com
[2] http://e-texteditor.com
[3] http://blog.macromates.com/2006/getting-more-bundles/

13
[+5] [2010-10-26 07:07:33] napoleonss

I have been working with Notepad++ & GHCi. I am trying leksah which have some IDE features as auto compiling and some cool features as indicating \ with greek letter(λ), -> with right arrow.


14
[+3] [2008-12-18 14:48:54] haggai_e

I used both EclipseFP and VIM. I liked the background compilation feature in eclipse where you get annotations about possible compilation error during typing.

Can't say much about VIM - its just a matter of personal taste :)


15
[+3] [2012-07-05 19:06:41] Gintautas Miliauskas

If you are just learning Haskell by working on small, one-file projects, try http://haskellonline.org . The editor is plain, but it's completely web based (so: zero local configuration), and it typechecks your code on the fly as you type, which is extremely helpful in the early learning phase. There's also an option to run the code online as well (using http://codepad.org).


16
[+3] [2012-12-15 20:55:59] Vektorweg

i use Geany [1]. it's a very easy graphical editor with some basic features.

[1] http://www.geany.org/

17
[+1] [2013-07-20 10:53:17] Lii

Colorer plugin for Eclipse IDE

Syntax highlighting in Eclipse can be achieved using the Colorer plugin. This is more light weight than using the EclipseFP plugin which has much functionality but can be messy to install and has sometimes been a bit shaky.

Eclipse Colorer is a plugin that enables syntax highlighting for a wide range of languages. It uses its own XML-based language for describing syntactic regions of languages. It does not include support for Haskell by default, but this can be added using a custom syntax description file.

For instructions see the Haskell wiki: http://www.haskell.org/haskellwiki/IDE#Colorer_plugin_for_Eclipse_IDE


18