A quick start guide to Haskell programming with Eclipse

This document shows how you would create and run the 'Hello World' application in Eclipse with Haskell support. It also explains some of the main user interface elements in Eclipse. The focus is on helping developers who are not familiar with Eclipse to quickly get started with it as an IDE that supports Haskell development.

Note: This is work in progress, which means that some of the features described here may not yet be in place. Have a look at the feature plan for information about what is already contained and what is planned.

Preparations

Create and edit source files

Add source files to the project source folder.

If you give the files a Haskell-specific extension (like .hs or .lhs (for literate Haskell), you can open the files with the Haskell source code editor from the Navigator View.

You can configure the editor in the main Preferences Dialog: Select Window > Preferences from the menu and choose the Functional Programming section.

Run the application

You can launch the compiled executable of your Haskell programs from within the IDE.

Running a program creates a new Launch configuration for that program. You can re-run a lauch configuration from the Run menu. Clicking the Run-icon re-launches always the last launched configuration.

If you choose Run ... from the menu, you get a dialog where you can edit launch configurations. For example, you may want to add parameters to the program launch.

Console input and output are handled by the Console View (at the bottom left of the workbench). You should see the 'Hello world' output appear there, and if your program takes console input, the Console View is where you can type in while developing.