The IDE world in Haskell is incomplete, but is in motion. There are many choices. When choosing your IDE, there are the following things to consider.
- 1 Notable features of interest to consider
- 2 Software
- 3 See also
- 4 Outdated
Notable features of interest to consider
This is a list of features that any Haskell IDE could or should have. The IDEs listed above generally support some subset of these features. Please add more to this list if you think of anything. In future this should be expanded into separate headings with more description of how they would desirably work.
- Syntax highlighting (e.g. for Haskell, Cabal, Literate Haskell, Core, etc.)
- Macros (e.g. inserting imports/aligning/sorting imports, aligning up text, transposing/switching/moving things around)
- Type information (e.g. type at point, info at point, type of expression)
- Intellisense/completion (e.g. jump-to-definition, who-calls, calls-who, search by type, completion, etc.)
- Project management (e.g. understanding of Cabal, configuration/building/installing, package sandboxing)
- Interactive REPL (e.g. GHCi/Hugs interaction, expression evaluation and such)
- Knowledge of Haskell in the GHCi/GHC side (e.g. understanding error types, the REPL, REPL objects, object inspection)
- Indentation support (e.g. tab cycle, simple back-forward indentation, whole area indentation, structured editing, etc.)
- Proper syntactic awareness of Haskell (e.g. with a proper parser and proper editor transpositions a la the structured editors of the 80s and Isabel et al)
- Documentation support (e.g. ability to call up documentation of symbol or module, either in the editor, or in the browser)
- Debugger support (e.g. stepping, breakpoints, etc.)
- Refactoring support (e.g. symbol renaming, hlint, etc.)
- Templates (e.g. snippets, zencoding type stuff, filling in all the cases of a case, etc.)
- Visual Haskell is a complete development environment for Haskell software, based on Microsoft's Microsoft Visual Studio platform. Visual Haskell integrates with the Visual Studio editor to provide interactive features to aid Haskell development, and it enables the construction of projects consisting of multiple Haskell modules, using the Cabal building/packaging infrastructure.
- Eclipse is an open, extensible IDE platform for "everything and nothing in particular". It is implemented in Java and runs on several platforms. The Java IDE built on top of it has already become very popular among Java developers. The Haskell tools extend it to support editing (syntax coloring, code assist), compiling, and running Haskell programs from within the IDE. In more details, it features:
- Syntax highlighting and errors/warning highlighting
- A module browser showing all installed packages, their modules and the contents of the modules (functions, types, etc.)
- Integration with Hoogle: select an identifier in your code, press F4 and see the results in hoogle
- Code navigation: from within a Haskell source file, jump to the file where a symbol in declared, or everywhere a symbol is used (type sensitive search, not just a text search)
- Outline view: quickly jump to definitions in your file
- Quick fixes on common errors and import management
- A cabal file editor and integration with Cabal (uses cabal configure, cabal build under the covers), and a graphical view of installed packages
- Integration with GHCi: launch GHCi inside Eclipse on any module
- Integration with the GHCi debugger: performs the GHCi debugging commands for you from the standard Eclipse debugging interface
- Integration with HLint: gives you HLint warning on building and allows you to quick fix them
- Integration with Stylish-Haskell: format your code with stylish-haskell
- Test support: shows results of test-framework based test suite in a graphical format. HTF support to come soon.
- Rudimentary 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 the syntax description files attached below.
- Installation instructions
- Install the Colorer from the update site
http://colorer.sf.net/eclipsecolorer/(for more detailed instructions see the project page).
- Download the Haskell syntax description files in Haskell_Eclipse_Colorer.tar.gz.
- Extract its contents (haskell.hrc and proto.hrc) into the following directory (overwriting proto.hrc):
eclipse_installation_dir/plugins/net.sf.colorer_0.9.9/colorer/hrc(sometimes the wiki seems to create a nesting tar file, so you might have to unpack twise).
- Finished. A restart of Eclipse might be required. .hs files should open with syntax highlighting.
- Install the Colorer from the update site
- If .hs files open with another kind of syntax highlighting check that they are associated with the Colorer Editor (Preferences -> General -> Editors -> File Associations). Or right click on them and choose Open With -> Other -> Colorer Editor.
- Leksah is an IDE for Haskell written in Haskell. Leksah is intended as a practical tool to support the Haskell development process. It is an pre-release phase with bugs and open ends but actively developed and moving quickly. Hopefully, Leksah will already be interesting, useful and fun. Leksah uses GTK+ as GUI Toolkit with the gtk2hs binding. It is platform independent and should run on any platform where GTK+, gtk2hs and GHC can be installed. I have tested it on Windows and Linux. It only supports GHC.
"I found Leksah less than satisfactory on OS X Lion. I could not figure out how to reference Test.Unit in a very simple program after several hours of trying to find the right settings in Leksah, and Leksah crashes a lot. I was able to build the same program in Eclipse within a few minutes of installing Eclipse and Haskell support for Eclipse." -- Doug Ransom
- is the above still relevant? I did have to read the manual, the section concerning setting up a project (including dependencies), as leksah requires you to, but did not notice any issues, described above. Stability does not seem to be an issue either. -- Vladimir Lopatin.
- hIDE is a GUI-based Haskell IDE written using gtk+hs. It does not include an editor but instead interfaces with NEdit, vim or GNU emacs.
- Through the dark ages many a programmer has longed for the ultimate tool. In response to this most unnerving craving, of which we ourselves have had maybe more than our fair share, the dynamic trio of #Haskellaniacs (dons, dcoutts and Lemmih) hereby announce, to the relief of the community, that a fetus has been conceived: hIDE - the Haskell Integrated Development Environment. So far the unborn integrates source code recognition and a chameleon editor, resenting these in a snappy gtk2 environment. Although no seer has yet predicted the date of birth of our hIDEous creature, we hope that the mere knowledge of its existence will spread peace of mind throughout the community as oil on troubled waters. See also: HIDE/Screenshots of HIDE and HIDE
- N.B. The link above is to the Wayback Machine (Web Archive); it seem that JCreator is no longer supported.
- JCreator is a highly customizable Java IDE for Windows. Features include extensive project support, fully customizable toolbars (including the images of user tools) and menus, increase/decrease indent for a selected block of text (tab/shift+tab respectively). The Haskell support module adds syntax highlighting for Haskell files and WinHugs, hugs, a static checker (if you double click on the error message, JCreator will jump to the right file and line and highlight it yellow) and the Haskell 98 Report as tools. Platforms: Win95, Win98, WinNT and Win2000 (only Win95 not tested yet). Size: 6MB. JCreator is a trademark of Xinox Software; Copyright © 2000 Xinox Software. The Haskell support module is made by Rijk-Jan van Haaften.
- This IDE supports many languages. For Haskell it currently supports project management, syntax highlighting, building (with GHC) & executing within the IDE.
haste - Haskell TurboEdit
- haste - Haskell TurboEdit - was an IDE for the functional programming language Haskell, written in Haskell.
- Vital is a visual programming environment. It is particularly intended for supporting the open-ended, incremental style of development often preferred by end users (engineers, scientists, analysts, etc.).
- Pivotal 0.025 is an early prototype of a Vital-like environment for Haskell. Unlike Vital, however, Pivotal is implemented entirely in Haskell. The implementation is based on the use of the hs-plugins library to allow dynamic compilation and evaluation of Haskell expressions together with the gtk2hs library for implementing the GUI.
This may or may not be up to date. A Vim user should update it.
- Haskell mode for Vim by Claus Reinke - These plugins provide Vim integration with GHC and Haddock.
- Syntastic -- An extremely useful Vim plugin which will interact with ghc_mod (when editing a Haskell file) every time the source file is saved to check for syntax and type errors.
- SHIM by Lars Kotthoff -- Superior Haskell Interaction Mode (SHIM) plugin for Vim providing full GHCi integration (requires Vim compiled with Ruby support).
- Haskell Conceal -- shows Unicode symbols for common Haskell operators such as ++ and other lexical notation in Vim window (source file itself remains unchanged).
- by Ian Lynagh: distinguishes different literal Haskell styles (Vim 7.0 includes a syntax file which supersedes these plugins).
- There's a copy of lhaskell.vim on the Wiki.
- by Marc Weber -- Vim script-based function/module completion, cabal support, tagging by one command, context completion ( w<tab> -> where ), module outline, etc
- Vim indenting mode for Haskell
- neco-ghc pragma, module, function completion.
- Hdevtools - gives type information, quicker reloading and more.
The list below is incomplete. Please add to it with whatever you think of. This list should be expanded into sections, as above, with more details, with links to the actual documentation of the described features.
- Vim — PROS: Free. Works on Windows. Works in terminal. Decent alignment support. Tag-based completion and jumps. Very good syntax highlighting, flymake (via Syntastic), Cabal integration, Hoogle. Documentation for symbol at point CONS: Arcane, difficult for new users. Some complain of bad indentation support.
- Emacs— PROS: Free. Works on Windows. Works in terminal. Decent alignment, indentation, syntax highlighting. Limited type information (type and info of name at point). Cabal/GHC/GHCi awareness and Haskell-aware REPL. Completion and jump-to-definition (via ETAGS). Documentation of symbol at point. Hoogle. Documentation for symbol at point. Flymake (error checking on the fly). CONS: Arcane, difficult for new users.
- Sublime — PROS: Works on Windows. CONS: Poor alignment support (though there are packages to do indentation a little better). Proprietary.
- Yi — PROS: Written in Haskell. Works in terminal. CONS: Very immature, lacking features. Problems building generally, especially on Windows.
- Leksah — PROS: Syntax highlighting. Understands Cabal, Module browser, dependency knowledge, documentation display inside the IDE, jump-to-definition, flymake (error checking on the fly), limited evaluation of snippets, scratch buffer. Autocompletion. Not an arcane interface a la Emacs/Vim. CONS: Doesn't have a decent REPL. Are there any other cons? — This should be moved to the section above.
- Visual Haskell
- KDevelop — Decent project management.
- HEAT: An Interactive Development Environment for Learning & Teaching Haskell
- Geany PROS: Free. Works on Windows. Syntax highlighting, REPL. CONS: After using it for a while, Geany freezes quite often.
- Designing the Haskell IDE. FP Complete is working on a Haskell IDE.
- Results from the State of Haskell, 2011 Survey.
- Categorized Weaknesses from the State of Haskell 2011 Survey, which barely touched upon IDEs.
- Applications and libraries/Program development#Editor support
- Shim; the aim of the shim (Superior Haskell Interaction Mode) project is to provide better support for editing Haskell code in VIM and Emacs