简体   繁体   中英

How to install and configure the EclipseFP Haskell plugin for Eclipse?

Can somone who has done this tell me exactly what to do? The documentation is lacking and what is there is incomplete and incorrect.

I've got the plugin installed, and told it to usethe GHC installation that I have as part of the Haskell Platform but Run As.. only shows me Run GHCi session. According to the cheat sheet, I should see Haskell Application.

Also missing are instructions for where to find the hugs executable, and the Cabal installation that the Haskell Preferences seems to suggest I should have.

Can anyone point out what I've missed?

I'm a Haskell beginner, hence trying to get Eclipse set up so I can play with it...

It seems that currently there is no way to create a non-interactive launch configuration via GUI. However, you can do that by manually editing config files. The following instructions work with Eclipse 3.5.2, EclipseFP 2.0.2:

  1. Make sure there exists a GHCI configuration.
  2. Close Eclipse.
  3. Go to directory .metadata/.plugins/org.eclipse.debug.core/launches in the root of your workspace.
  4. There should be a file named something like "Main (project src).launch". Copy it under whatever name you wish, for instance "Run Main.launch"
  5. Open your copied file in a text editor and replace the option --interactive with -e main .
  6. Save the file and start eclipse. You should see the new run configuration "Run Main". When you run it, EclipseFP executes your Main.hs file, redirecting both input and output to the console view.

Also, it seems that you haven't configured cabal yet. You first need to install it (from your distribution repositories, or here if you're using Windows). Then go to Scion and Cabal preferences and point them to your cabal executable. After you click OK the compilation of Scion should start. If it gives you errors, read what packages are missing and install them via cabal install pkg-name . (I had to install happy with --global flag, and for QuickCheck I had to manually set the 2.* version). To rerun Scion compilation, restart Eclipse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM