lunes, 22 de agosto de 2011

End of the summer

The Summer of Code has come to its end. It has been three wonderful months, in which I've learnt and hacked a lot. I hope the improvements to EclipseFP will be used and have made it a useful tool for all the Haskell programmers out there :D

One of the tasks I've also done during the summer is building a new webpage for EclipseFP. You can find it in In the next days, a new release of EclipseFP with all the changes I've done though the summer will be made available.

I cannot end my summer whithout thanking my mentor, Thomas Schilling, who has been responsive and helped me a lot with the Haskell coding; and JP Moresmau, the current EclipseFP maintainer, who helped me in my first steps diving into the Eclipse Platform. I also have a debt with A O Van Emmenis and Chris Done for the discussions we had about IDEs and Haskell during the last CamHac and the pile of suggestions they gave me.

I hope you have enjoyed the show, and I'll be delighted of hearing how people used EclipseFP, and willing to implemented more features during the next months.

Quick Assist and new builders

This last week of GSoC has been really productive in terms of user interface additions. Apart from completion, which I showed a couple of days ago, EclipseFP now has quick assist support. Quick assist means that for some kinds of errors, a small light bulb is shown in the left side of the editor. When you click it, ways to correct the error are suggested, and if you click on it, automatically applied.

Most of these fixes were already implemented by JP Moresmau, like adding a package to the Cabal file, removing redundant imports or adding a Language pragma to the file. My work in those has been to make them more discoverable and available through the light bulb icon. Apart from those, you will get the ability to add an import for a function that is not found (it even works if you qualify the item, making the new import qualified).

The rest of the work I want to present today was done between CamHac and the end of the last week. I've always felt that Haskell programming was not only writing Haskell code, but also writing code in tools like Alex, Happy or the UU Attribute Grammar system. Those tools allow you to express some constructions better and more concisely, and I thought that it would be nice to have them in EclipseFP.
So now you have syntax higlighting and automatic building of those files.

Last year I was studying at Utrecht University and really liked their Attribute Grammar System. The tool has a lot of options, and now you can configure them inside EclipseFP. Even more, the configuration is saved in the same format that the one used in uuagc-cabal package.

This has been all for the summer. A new EclipseFP release with all the features should be available very soon :D

miércoles, 17 de agosto de 2011

Autocompletion and more

In the past week I've continued adding features to EclipseFP. For example, now you can edit Alex, Happy or UUAGC files directly in EclipseFP, and you will get syntax highlighting (taking into accounts which zones are Haskell code and which others are non-Haskell). Last weekend I've attend CamHac. That was a wonderful experience to know new people, and also to collect suggestions and improvements for the plug-in. Two of those suggestions have already been implemented.
The first one is a tighter integration with some of the web frameworks available in Haskell-land. In particular, you can create Snap and Yesod projects directly from the New Project wizard in Eclipse, provided the neccessary tools are installed. Also, I've linked some content-types to existing web editors, so you will get HTML editor for a Heist template, CSS editor for a Lucius template and so on.
The other feature that most of the people requested was autocompletion. I didn't implement that before because my knowledge of both Eclipse and Scion was lower, and didn't really know where to start. But after these 3 months I've been able to come to a solution to the problem, and I'm delighted to present the new revamped Haskell code assist for EclipseFP:

In the following days I plan to implement more of the suggestions in my TODO list :D

martes, 9 de agosto de 2011

EclipseFP build error on Ubuntu Oneiric

UPDATE: the bug has been solved in Oneiric, so this PPA is no longer needed. I leave this here only for reference.

If you try to install EclipseFP on a Ubuntu Oneiric (the next release which will have the number 11.10) you may get the following error when scion-browser is built:
ghc: panic! (the 'impossible' happened)
 (GHC version 7.0.3 for x86_64-unknown-linux):
       loadArchive "/usr/lib/ghc-7.0.3/ghc-7.0.3/libHSghc-7.0.3.a": failed
This is due to GHC 7.0.3 being packed in Debian with a stripped libHSghc. I don't know well what that means, but makes impossible to use have ghc as a dependency while using Template Haskell (something scion-browser does). In Debian unstable this has been fixed upgrading to a new GHC version, but in Ubuntu it seems that we will have to wait until the bug is fixed.
In the meanwhile, I've created a PPA archive with the GHC version in Debian (7.0.4-4) and rebuilt the haskell-platform package and its dependencies. This means that you can get a working Haskell Platform with a working version of GHC following the instructions about installing.
The downside is that the PPA only contains the core Haskell packages and the rest of libghc-* packages in Ubuntu are not compatible with these version. So you will have to use cabal install to get any other package in a system using the PPA, even if the library has been packaged in Ubuntu.