New build instructions

Because of many problems I experienced with Darcs, I converted the EclipseFP repository to Git. I really like the clean and simple model and UI of Darcs, and I’m sorry to see it go, but it was simply too slow and too unreliable. Also, I removed all dependencies on Cohatoe. Without further ado, here are the new and improved instructions in case anyone wants to test-drive my current work.

As usual, this assumes that you have GHC, cabal-install, and git. I tested only on Ubuntu 9.4, but there is no reason why it shouldn’t work on other Unix platforms. There may still be some issues on Windows.

  1. Get Eclipse Galileo (3.5), the distribution named “Eclipse for RCP/Plug-in Developers”. Extraction equals installation.
  2. Get the Scion source:
    git clone git://
    (My master branch corresponds to nominolo’s multi_proto_server branch.)
  3. Build and install Scion, the library as well as the server program:
    cd scion/lib
    cabal install
    cd ../server
    cabal install
  4. Get the EclipseFP source:
    git clone git://
  5. Import all Eclipse projects from these repositories into Eclipse. There are 26, so the Multi Project Import/Export plugin might come in handy.
  6. Wait for the build to fail. Yes, that’s right. It will complain about missing files, because ANTLR generated some that Eclipse doesn’t yet know about. Select all projects, right-click and click Refresh, then wait for the build to succeed. (Thanks to Björn Peemöller for pointing this out!)
  7. Hit Run, Run Configurations. Add a new launch “Eclipse Application” launch configuration. The default settings for this launch configuration should work, so just click Run. (Previous instructions were wrong; thanks to Axeman6 for pointing this out!)
  8. In the new Eclipse window that (hopefully) pops up, set the location of the Scion server via Window, Preferences, Haskell, Scion. If you installed it in a fairly standard location, the Autodetect button should do the trick; otherwise, just Browse.
  9. If something doesn’t work, turn on tracing. In the Run Configurations dialog, on the Tracing tab, you can enable tracing options for various plug-ins. These will output to the Console at the bottom of the host Eclipse window. To see the traffic between the Scion client and server, turn on the logs for net.sf.eclipsefp.haskell.scion.client.

A known issue is that you have to save a file before it gets loaded into Scion, so you don’t get type tooltips and go-to-definition until then. This will be resolved in the near future, maybe tomorrow. After nine consecutive days of work, I’m taking a day off now.

Again, please let me know if you tried this. Also let me know if something didn’t work, so I can improve it!


Public code release

These instructions are outdated. See the new instructions!

My code is now in a sufficiently clean state that I can push it out to the world. For anyone who wants to give it a try, here are the instructions that should get you up and running. This assumes that you have GHC, cabal-install, darcs, and git. I tested only on Ubuntu 9.4, but there is no reason why it should not work on Windows as well.

  1. Get my branch of the Scion sources:
    git clone git://
    (It should also work with nominolo’s original sources.)
  2. Build and install Scion, the library as well as the server program:
    cd lib
    cabal install
    cd ../server
    cabal install
  3. Get Eclipse Galileo (3.5 RC4 or later), the distribution named “Eclipse for RCP/Plug-in Developers”. Extraction equals installation.
  4. Get my branch of the EclipseFP sources:
    darcs get
    darcs get
    (Although Cohatoe is probably going to be removed, this version of EclipseFP still depends on it. Build the Cohatoe server if you like; it segfaults on my system.)
  5. Import all Eclipse projects from these repositories into Eclipse. There are over forty, so the Multi Project Import/Export plugin might come in handy.
  6. Wait for the build to finish, then… Run!
  7. In the new Eclipse window that (hopefully) pops up, set the location of the Scion server via Window, Preferences. If you installed it locally, it should be in ~/.cabal/bin/scion_server. (Eclipse does not understand the tilde, so give the full path to your home directory.)

It’s quite some work to get it all up and running, and I probably forgot a step or two. Making the process easier is not currently a priority, but I envision a complete Eclipse release that is easy to set up and has everything you need to get Haskelling quickly.

If you try these steps, and run into any problems, please let me know, so that I can help you out, and improve the instructions and maybe even the code at the same time.

Project description

In this post, I will describe what my project is all about. What is it that I intend to do, why do I intend to do it, and how?

Haskell is a pure functional programming language. Pure functional means that the entire program is treated as the evaluation of an expression; the word pure indicates that such an expression can have no side effects. Hence, no modification of variables, no reading from disk, no drawing to the screen. Of course Haskell wouldn’t be very useful if it couldn’t do all those things, but indeed it can. The language is now growing out from its origins in computer science research, as more and more people begin to realize that purity and strict typing are good things. Although the initial effort that goes into a program may be a bit more than with more mainstream languages, these language features guarantee a certain degree of correctness that impure, dynamically typed, or imperative languages can never achieve.

However, I believe that the further acceptance of Haskell is held back by a lack of tooling. There is an great compiler, great libraries and a great package management system, but there is no really great IDE (Integrated Development Environment). A good IDE would not only be a great time saver for seasoned Haskell developers; it would also be of much assistance to newbies who want to learn the language.

There is Leksah (Haskell spelled backwards, missing an L), but it is still under heavy development and not yet in a really usable state. Yi is an editor written in Haskell, but it does not qualify as a full IDE. Either way, there is no reason to build yet another IDE from scratch when a perfectly good option is readily available.

Eclipse is one of the most popular IDEs  for the imperative programming language Java, and it is also written in Java. I worked with it years ago and hated it. It was unwieldy, incomprehensible and terribly slow to boot. But recently I was forced to work with it again, and I was pleasantly surprised. Because it is a very powerful IDE there are still many knobs and dials, but they are generally in sensible places and can be understood without a manual. The speed has also improved greatly. But the best thing about Eclipse is its feature set. It has clever code completion. It has a powerful build system. It has refactoring features that outdo even the latest Visual Studio releases from Microsoft. And it is not just about Java: rumour has it that Eclipse can also be used for C++ development, PHP… and Haskell.

Indeed it can. EclipseFP (which stands for Eclipse Functional Programming) is a plugin for Eclipse that allows for Haskell development. (It also contains discontinued support for OCaml.) Unfortunately, EclipseFP is only marginally usable, does not offer half as many useful features as it could, and has been standing still for almost a year. I figured that’s a shame, so I decided to try and see if I could improve this situation. Thomas Schilling a.k.a. nominolo has graciously offered to be my mentor, for which I am vary grateful. Leif Frenzel, the original author of EclipseFP, has also offered his help, so I am in good hands.

I will start by fixing small bugs and making little improvements here and there. This way, I will familiarize myself with the source code of EclipseFP and with the Eclipse plugin system.

Next, the real work will start. The current EclipseFP does its own parsing of Haskell, which is a duplication of work: there is already a perfectly good Haskell parser and typechecker available in the form of the compiler, GHC. The Scion library was developed (by the aforementioned nominolo) specifically for interfacing with GHC. Thus, my next course of action will be to hook EclipseFP up to Scion.

This opens up many exciting possibilities. The type of an identifier could be shown in a tooltip when you hover the mouse cursor over it. Inferred type signatures could be automatically added to functions. Type errors and other compile errors could be highlighted with red squiggly lines. It could be possible to Ctrl+click on an identifier to jump to its definition.

Near the end of the project, I will add support for the Haskell package manager and build system Cabal. EclipseFP currently uses its own build files, but using a Cabal file would greatly simplify the transition to Eclipse + EclipseFP and also allow for easier integration with existing libraries. Some IDE support in writing the Cabal file would also be great.

So, that’s the plan for the next months. It will be a bumpy ride. It will be difficult at times. But I’m definitely going to learn a lot, and will hopefully even turn out a useful product!

EclipseFP project accepted for GSoC 2009!

I’m happy to announce that my Google Summer of Code proposal, titled “Extend EclipseFP functionality for Haskell”, has been accepted! For the uninitiated, GSoC is a project in which Google sponsors a number of students each year to work on open source software. During the upcoming three months or so, I will be working on improving EclipseFP. In this blog, I will track my progress.

The target audience for this blog are Haskell programmers, Eclipse developers and any other software developer who happens to be interested. I will try to keep it readable for all interested parties, but it might sometimes get quite technical; in that case, feel free to ask what the hell I’m talking about, or just ignore me. Incidentally, I also just sent out a request to Planet Haskell and Planet Eclipse for this blog to be syndicated.

Anyway, since I target a fairly general audience, I have some explaining to do. In a next post, I describe what my project aims to do, how I want to accomplish it, and why I think it is important. But first, allow me to introduce myself.