2008-12-06 23:44:39 UTC
I assume hugs works outside of eclipse.
I had the same problem at first. I use Ubuntu 8.04, so my problem might be different than yours, and I also do have ghc installed. Under Window > Preference > FunctionalProgramming > Compiler, I had to make sure it pointed to /usr/bin/ghc for ghc and the same for /usr/bin/hugs for hugs. I also noticed that every once in a while Eclipse forgets where these are (usually after a couple of workspace switches), so I just go an retype it again. A little bit annoying, but this is so much nicer an ide than anything else out there, I don't mind at all.
You shouldn't need a main unless you want to compile to source. If you just want to interpret the file, just run the interpreter and call whatever method you want.