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: http://eclipsefp.sf.net/updates, and bug reports or feature requests should go to the SourceForge forum or the development mailing list.


Happy Haskell Hacking!

16 comments:

Tom Crockett said...

Awesome!

Francisco Javier L. said...

Please, keep up the good work!!
Thanks

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:

bind:
AbsBinds [a] [] [len <= [a] len]
len :: forall a. [a] -> Int
[LclId]
{ 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 ==1.10.1.0 however
Cabal-1.10.1.0 was excluded because scion-0.1.0.9 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...

Unknown 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.

Cheers!

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.

Unknown said...

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

Unknown 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.
!STACK 0
java.lang.NullPointerException
at net.sf.eclipsefp.haskell.scion.client.ScionPlugin.getScionInstance(ScionPlugin.java:209)
at net.sf.eclipsefp.haskell.ui.util.text.WordFinder.getEditorThing(WordFinder.java:82)
at net.sf.eclipsefp.haskell.ui.internal.editors.text.MarkOccurrenceComputer.compute(MarkOccurrenceComputer.java:50)
at net.sf.eclipsefp.haskell.ui.internal.editors.haskell.HaskellEditor$3$1.runInUIThread(HaskellEditor.java:328)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

Unknown 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 1.10.2.0 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.