domingo, 19 de junio de 2011

Installing EclipseFP with Haskell Browser support [very experimental]

In this last week I've been integrating the work I've done in scion-browser into EclipseFP. This means that now you can browse the definitions inside your locally installed packages inside the environment, and also ask to the fabulous Hoogle for information.
However, I don't feel confident to ask for merging my changes into the main branch of EclipseFP yet. That's why I'm posting instructions on how to get an Eclipse with the Haskell Browser so everybody can check by their own and send suggestions and bugs (both of them are very welcome).
So, here are the instructions (they seem very long but I've tried to go step by step so people not used to Eclipse could follow them without problems):

  • Install Hoogle in you computer: just open a console and run "cabal install hoogle"
  • Hoogle needs some data to work which can be retrieved by running "hoogle data"
  • Get a copy of the scion-browser code by running "git clone git://github.com/serras/scion-class-browser.git"
  • Build it: "cd scion-class-browser && cabal configure && cabal build"
  • In the previous configure step Cabal may tell you that some prerequisites are not installed. If so, install them by running "cabal install <package-name>"
  • Download Eclipse. Any version would do, although my recommendation is to get the one for C/C++ developers, because it's a bit smaller than the others
  • Download EclipseFP 2011-06-19 archive
  • Extract the Eclipse archive you downloaded and run "eclipse" inside the folder that will be created. That is all the installation needed by Eclipse :)
  • Once you are in Eclipse (if you are new to it, the first time it will ask you for a workspace, which is the folder used to save configurations and projects), click Help > Install New Software...
  • In the window that will appear, click on the Add... button next to the Work with textbox
  • You will end into the Add Repository window. Click Archive... and select the EclipseFP 2011-06-19 archive you downloaded. Click OK afterwards
  • If you see the message There are no categorized items, uncheck the Group items by category checkbox
  • Check FP: Haskell support for Eclipse in the available items list and click Next
  • After pressing Next a couple of times more and saying yes to install unsigned software, Eclipse will ask you to restart. Do it
  • You will see the next window. Don't panic, it just tells you that we need to configure scion-browser
  • After clicking OK, the Scion server (the one providing compilation services to EclipseFP) will start compiling. I recommend you to wait until it finishes
  • Once it finished, click Window > Preferences... and navigate to Haskell > Scion, Cabal and Browser page
  • For the Browser executable, select the scion-browser you compiled before, which will be in <folder where you cloned the repository>/dist/build/scion-browser/scion-browser
  • Click the Open Perspective... button in the upper right corner, select Other... and in the Perspectives window, select Haskell or Haskell Browser
  • The next window asking to rebuild the database will be shown. If it doesn't, just close Eclipse and open it again. Of course, answer Yes to the dialog, so the information for the Browser is created

And that's all. When the rebuilding process finishes, you can start using the Browser perspective or the Hoogle view. More information about the features in the next post.

No hay comentarios:

Publicar un comentario