In this blog I talk about some of the personal work I do in programming. I mainly do Java and JavaScript, but I'm learning functional programming in Haskell too...

Wednesday, December 01, 2010

EclipseFP 2.0.2 released

I am pleased to announce another release of EclipseFP. Version 2.0.2 should make installation of Scion easier, improve stability and performance of the parsing and building operations, and provide a few new functionalities. You can now configure where the "Open Definition" action will look for definitions (these can be in Haskell source code or Haddock pages): by default it will look in the dependent projects, in your GHC install doc folder, and on Hackage, but you can add more locations in the preferences. You can also generate source distribution via a project export command (that calls cabal sdist).

The release notes are here. To install or upgrade, just point your Eclipse to http://eclipsefp.sf.net/updates. Be sure to configure both the GHC path and the Cabal path in the preferences.

You can look in the console for the scion output for your project is something happens. And check the error log. Building should, ahem, build the exe or library in in the .dist-scion folder in your project.

I'm using ghc 6.10.4 and have been able to work around the cabal dependency mess by installing some 6.10 compatible packages by hand:- cabal install list-tries-0.1- cabal install attoparsec-0.8.1.0 (to allow AttoJSON to build)- cabal install multiset-0.2- cabal install derive-2.3.0

This solves all the dependencies. However, now scion 0.1.0.6 does not build.- First problem is that ghc 6.10 does not know the -fno-warn-unused-do-bind flag. That's easily fixed.- Second problem is in Find.hs:

Frodo, it appears that you're right, some of the latest code changes make scion 6.12 compatible only. We will try to install 6.10 on a test machine and gain back compatibility, but it will take a while, with the holiday season and everything. Sorry!

@Frodo: Are you using MacPorts? If so, you might seriously want to consider uninstalling the entirety of the haskell-platform package and instaling the haskell.org Haskell Platform with the 6.12 compiler.

I've re-installed 6.10 on my Mac and tried to resolve your issues. Unfortunately, many of the packages upon which scion-server relies will no longer compile with 6.10. I couldn't get past compiling the dependencies -- in particular, multiset uses a renamed function, mkNoRepType, that used to be called mkNorepType in the 6.10 base libraries.

If you can't install the Haskell Platform from haskell.org, I'd suggest whining at the MacPorts maintainer. Personally, I like MacPorts, but some of the maintainers can be slow to refresh or update the ports.

I'm using Haskell platform 2009.2, which includes ghc 6.10.4. I need 6.10.4 to keep wxhaskell working under ghci, although with ghc7 on the horizon, i'm considering taking that loss. If you install the cabal dependencies as in the order I described above, it is possible to compile scion 0.1.0.4. I guess later changes also require a new multiset etc.

Btw, I also tried EclipseFP with ghc 6.12, which correctly builds. However, I'm unable to use the eclipse debugger. I can't set breakpoints. If I set them in the console, it does break at the breakpoint, but stepping is a bit unreliable. Is this a known issue?

I've managed to set it all up and built scion from sources, but it cannot find my ~/.cabal/bin directory.

searching for c2hs in path.Cannot find c2hs on the pathsearching for cpphs in path.Cannot find cpphs on the pathsearching for ffihugs in path.Cannot find ffihugs on the pathsearching for gcc in path.found gcc at /usr/bin/gcc("/usr/bin/gcc",["-dumpversion"])/usr/bin/gcc is version 4.4.5searching for greencard in path.Cannot find greencard on the pathsearching for haddock in path.Cannot find haddock on the pathsearching for happy in path.Cannot find happy on the pathsearching for hmake in path.Cannot find hmake on the pathsearching for hsc2hs in path.Cannot find hsc2hs on the pathsearching for HsColour in path.

and so on..

but most of them are in my ~/.cabal/bin. How do I specify this to scion-server which (I built it from source)? If I copy them to /usr/bin he suddenly can see them.

I already added ~/.cabal/bin to my $PATH in /etc/bash.bashrc file and it's contents are perfectly visible from any console window.