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.
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.htmlI'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.htmlThe 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/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.
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.
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?
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/Also see HEAT http://www.cs.kent.ac.uk/projects/heat/
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
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.
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).
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.
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#readmeTry 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).
get the haskell language bundle [3]
[1] http://macromates.comI 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.
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 :)
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).
i use Geany [1]. it's a very easy graphical editor with some basic features.
[1] http://www.geany.org/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