Monday, March 21, 2011

EclipseFP 2.0.4 released: supports GHC 7!

Hello, the demand was HUGE (well, everything is relative :-)) for a version of EclipseFP that could build and run on GHC7. Since the 2.0.3 release there is now a Haskell Platform release that contains GHC7, so we had no excuse... And there it is! Thanks have to go mainly to Alejandro Serrano, for getting Scion to compile with GHC7 and to Thomas Schilling and Matti Niemenmaa, who upgraded their libraries for GHC7.

So what we have is a scion backend that should build both with 6.12 and 7.0, and hopefully work the same on both. We now support test-suite sections in Cabal files, with limited support for running test suites (running just cabal test with no options).

On my To Do list are full support for test-suites (having full launch configurations for Cabal defined tests) and HLint integration. But I'd also like to work on my own project, so don't expect that a release every two weeks is going to be our normal cruising speed.

As usual, just install from the Eclipse update site:, and bug reports or feature requests should go to the SourceForge forum or the development mailing list.

Happy Haskell Hacking!


Tom Crockett said...


JLoma said...

Please, keep up the good work!!

Tom Crockett said...
This comment has been removed by the author.
Tom Crockett said...
This comment has been removed by the author.
Tom Crockett said...

Works fantastic, this plugin has come a long way!

JP Moresmau said...

Tom, other people have suggested we do a cabal update automatically before building scion, it would certainly be useful in cased (-: Thanks for the kind words!

Tom Crockett said...

A couple of issues with the hover tooltip. Let's say I have a simple definition like this:

len :: [a] -> Int -- (1)
len [] = 0 -- (2)
len (x:xs) = 1 + len xs -- (3)

If I hover over any part of the type annotation (line 1), I get this in the tooltip:

AbsBinds [a] [] [len <= [a] len]
len :: forall a. [a] -> Int
{ len [] = 0
len (x : xs) = (+) 1 len xs }

Hovering over the left side of the first equation (line 2), I get the expected type information:

len :: [a] -> Int

Hovering over the left side of the *second* equation, however, produces this tooltip:

bind: /Users/crockett/Documents/eclipse/workspaces/haskell/foo/src/Main.hs:(7,1)-(8,23)
len [] = 0
len (x : xs) = (+) 1 len xs

It seems like in all three cases, I should get "len :: [a] -> Int"

Tom Crockett said...

One other thing, I tried to check out your latest Scion and cabal install it, but it seems to be looking for an older version of cabal than what comes with the Haskell platform 2011:

cabal: dependencies conflict: ghc-7.0.2 requires Cabal == however
Cabal- was excluded because scion- requires Cabal ==1.6.*

The Scion server that comes built in with EclipseFP works, but I was hoping to get a setup for hacking so that I might learn my way around Scion/EclipseFP and maybe eventually be able to contribute something to this noble endeavor :)

JP Moresmau said...

Tom, yes, there are some issues about the hover and about the type of some expressions, and GHC 7 has changed some things (some issues may even be due to GHC7 bugs, I've asked on the GHC mailing list). I'll try to see what we can do.
If you want to build scion separately, mind that there are flags that set the Cabal version. So you need to configure with -fCabal_1_10 or something. What I do is that I use EclipseFP to hack scion itself...

cg said...

I have some trouble with eclipsefp ..
I have been trying to install it a few times and succeeded, but
have a problem: Whenever I click on a, say, type name such as Integer in a source file, I get a popup telling me there was a java.lang.NullPointerException.
What can be the problem?
I am running eclipse Helios SR2.


JP Moresmau said...

Please provide the Eclipse log file so we can see where the NullPointerException occurs.
As well, go the the Haskell preferences and check that your GHC and your Cabal are properly referenced. Do you see consoles named "Scion server for project ..." ? Maybe the sourceforge forum is a better place to post your issues.

cg said...

I'm new to eclipse, sorry .. where does it store the log file?

cg said...

Ah .. I think I found it; this is the last entry:

!ENTRY org.eclipse.ui 4 4 2011-04-07 10:56:15.171
!MESSAGE An internal error has occurred.
at net.sf.eclipsefp.haskell.scion.client.ScionPlugin.getScionInstance(
at net.sf.eclipsefp.haskell.ui.util.text.WordFinder.getEditorThing(
at net.sf.eclipsefp.haskell.ui.internal.editors.text.MarkOccurrenceComputer.compute(
at net.sf.eclipsefp.haskell.ui.internal.editors.haskell.HaskellEditor$3$1.runInUIThread(
at org.eclipse.ui.progress.UIJob$
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(
at org.eclipse.swt.widgets.Display.runAsyncMessages(
at org.eclipse.swt.widgets.Display.readAndDispatch(
at org.eclipse.ui.internal.Workbench.runEventLoop(
at org.eclipse.ui.internal.Workbench.runUI(
at org.eclipse.ui.internal.Workbench.access$4(
at org.eclipse.ui.internal.Workbench$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
at org.eclipse.ui.internal.ide.application.IDEApplication.start(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(

cg said...

ah .. sorry again, I posted it in the SF forum.

Anonymous said...

I've tried to install Eclipse FP on Fedora but it's not working. Here is the error (reproduced by running cabal directly):

$ cabal install scion-browser
Resolving dependencies...
cabal: cannot configure scion-browser-0.1.3. It requires ghc >=7

$ ghc -V
The Glorious Glasgow Haskell Compilation System, version 7.0.4

$ cabal -V
cabal-install version 0.10.2
using version of the Cabal library

JP Moresmau said...

gtirloni, the version of scion-browser that ships inside EclipseFP is not the one currently up on Hackage. What error are you getting when scion-browser gets installed through EclipseFP? And here is probably not the best place to post issues like this. Try the sourceforge forum, or contact the scion-browser maintainer.