Thanks, Michael. For what it's worth, I actually do all of my scion-server development in EclipseFP to prove that I can proverbially "eat my own dog food".
Hi guys,After setting up three computers to use EclipseFP, I wrote the following to help others through the configuration, and thought I'd share this with you. Feel free to use any or all of this anywhere you find it helpful. It's somewhat Windows-centric, but should still be good enough for linux/mac users.A couple of feature requests based on some of these steps that would make the process much simpler:Run automatically or prompt the user to run "cabal update". Given the iffy nature of Cabal, better error messages in the Scion build would be useful also.Use the Preferences > General > Editors > Text Editors wherever possible. This keeps the editor more in line with what the user is used to elsewhere. Notably, you cannot toggle on and off line numbers simply by right clicking on where the line numbers go, this is a bug.Attempt to automatically populate the Haskell and Cabal installations. This ought to be easy to do since (in theory) ghci and cabal are already in the path. Power users can always change this later.I'm not sure how feasible this is, but it'd be really nice if the New Haskell Module dialog prompted the user to turn on or off the two automation options in the Run Configuration, so that they don't have to run it once then edit the run configuration to get what seems like core functionality.I hope this is helpful!Michael
---------- Forwarded message ----------
From: Michael Diamond <email@example.com>
Date: Tue, Feb 1, 2011 at 2:36 AM
Subject: Haskell in Eclipse
So I've been poking around looking for a good IDE to develop Haskell, on the assumption that there must be something more powerful than just a text editor with highlighting. If you're happy with how you're coding Haskell, have fun and ignore this email. But I wanted to share with you how to setup EclipseFP, since it is not trivial to set up, but gives you a pretty nice environment to work in once it is, including proper syntax highlighting (no mistaking (-->) for a comment or f' as the start of a char) automatic compilation (no need to do :r all the time) and error underlining in the file.Having played with Leksah, which was mentioned in class and which I found to be terribly cumbersome to use, EclipseFP is hands down better for anything except (maybe) very large Haskell projects.
- Install GHC/GHCi - but you've done that already, right?
- Install Eclipse 3.5+
If you haven't already got Eclipse (why not?!) download it - either the IDE for Java Developers if you're inclined to use it with Java as well, or just Eclipse Classic if not. "Installation" consists simply of extracting the eclipse folder somewhere and launching the eclipse executable, there is nothing to actually install. It prompts you to select a workspace, your user folder or your documents folder are good choices if you don't have a preference.
- Install the EclipseFP plugin
In Eclipse go to Help > Install New Software and paste http://eclipsefp.sf.net/updates into the Work with: field - hit enter. In the box below "Functional Programming" should show up after a few moments, cancel and retry it if it doesn't. Expand "Functional Programming" and check the 2.x.x Haskell Support plugin. Follow the rest of the steps, and EclipseFP will be installed, and will prompt you to restart Eclipse.
- Update Cabal
While you're waiting, launch a command prompt window (type cmd in the start bar on Win Vista/7) or terminal and enter 'cabal update'. This will update the packages Haskell needs in order to let EclipseFP work.
- Configure EclipseFP
Go to Window > Preferences and expand the Haskell section. Click on "Haskell Implementations" and click "Add". Enter a reasonable name (I called it "Haskell Platform") and then browse to the bin directory of your GHC installation, which on Windows is something like "C:\Program Files\Haskell Platform\2010.2.0.0\bin". It will populate the Version and Library folder items below, click Ok. Click OK to save these preferences, then open the preferences window again. Go to "Scion and Cabal" and click "Autodetect" on the right. It should add an item to the list of Installed Cabal implementations, but if it does not, click add, give it a name like "Cabal" and give it the path to the Cabal executable, which on Windows is something like "C:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\bin\cabal.exe". Hit OK, and click Rebuild on the right to tell EclipseFP to build the "Scion server" which handles the syntax highlighting and file parsing. Optionally under Editor check "Show line numbers" and uncheck "Show print margin", I think it makes the editor pane look better. Then hit OK to exit preferences.
- Build the Scion Server
In theory, upon exiting the preferences window, EclipseFP will start doing a lot of work to build the Scion server. If it does not, simply exit and restart Eclipse, and when it's restarted it will start building. With any luck, this will run for a few minutes and then be done, however you may run into some trouble due to the finicky nature of Haskell's/Cabal's versioning system. If it fails, try running "cabal update" again, or running something like "
- Michael Diamond
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
eclipsefp-develop mailing list