Re: [Haskell-cafe] EclipseFP (Haskell IDE) 0.9.1 released

Quoting Thiago Arrais
[I should say that I haven't yet actually tried this software, though I'd
2006/2/1, Graham Klyne
: like to do so when I get some time.]
I really hope you find the time to do so. We would be glad to be hearing from you again.
I haven't found time (yet) to look at your new version, but I tried out the stable version from about a week ago and played with it a bit. I might as well tell you what I found then and why I'm unable to use EclipseFP at this time.
At some point of the wave, the integrated environments appear. They come, as the name says, to integrate the previous tools in an easy to use and productive environment. Not that the previous tools were hard to use or counter-productive, it is just that by integrating them much time is saved from the details and the programmer can spend more time on the creative and useful things only he can do.
I think it's important to keep this aspect, the ramping up and the integration. Particularly, I'm against tools that want to do things their way. I'd much rather have the tool automate the tools I already have instead of creating a new mechanism. For example, I'd rather have the IDE work with my makefiles than ignore them and use some builtin make system. I need to be able to separate from the IDE whenever it becomes cumbersome or when I want to share the code.
So is there a compelling feature in this Eclipse plugin that isn't easily achieved using simpler tools?
When we write an Eclipse plugin, we get a lot of things for free. Just to cite one, there is already CVS integration support within every Eclipse installation, which includes a very neat diff viewer. Adding support for other version control systems isn't very hard. There are plugins, for example, for Darcs and Subversion too.
I was trying the Darcs plugin in conjunction with EclipseFP as my first attempt at using eclispe. I found that waiting for eclipse to "autobuild" everything in _darcs was a waste of time and just plain silly. Hopefully, there is a way to avoid this excessive building and still use autobuild. I couldn't find it.
Another very nice feature of the Eclipse platform is the refactoring support. Wouldn't you like to refactor your Haskell code as easily as selecting some context-menu item? Not to mention code assistance and 'go to declaration support' (click a module/function/whatever reference and open its corresponding declaration). This has saved me a lot of time when browsing code.
This is the reason I sought out EclipseFP. I want to automate as much of the refactoring as I can while making it safe. But now let me turn to the reasons I'm not using it anymore. Some of the reasons have to do with eclipse itself (I think), some are related to the very nice plugin you have created, and some are related to the darcs plugin. Some of my problems may even be fixed in the announced version, but I haven't had a chance to check. I wanted to use EclipseFP to help with darcs development. The first problem I encountered was that darcs has a makefile which is growing in complexity. Some files are compiled with this flag, others with that flag. I couldn't figure out how to import the make rules. I did find a way to set the compilation options, but they were per project instead of per file as near as I could tell. I would a makefile import to be automated and to watch the makefile for changes. One direction would be fine for now, but ultimately I would want it to let me change build settings in Eclipse and have it mirrored in the makefile. Does eclipse have a makefile plugin? I also had a problem with autobuild building too much as noted above. I also couldn't figure out a way to ask eclipse to delegate to make for building. The next problem I encountered was the parser was not forgiving enough to parse the darcs source code, as a result everything was colored as a comment. Every file that contained "#include", "#define" or similar threw a lexical error. The code is meant to be run through ghc with the -cpp flag turned on. Is it possible to use ghc-api for parsing the code? I also noticed that when you click on an error so that eclipse will take you to the place of the error, it often took me to lines that were perfectly fine, in fact, I think it was often the wrong file. The first time I created a "Hello, World" project in win32 eclipseFP gave some odd errors that I didn't write down. I haven't seen that error since so I can't make a bug report, but it was certainly confusing. It was to the effect that ghc had crashed while generating the project. After I got that error, I stop using eclipse in windows and switched to OSX. I had some other problems, but don't think they were related enough to list them here. In the end, it was a horrible first experience with eclipse and I'm not looking forward to ever using eclipse again. On the other hand, I want some sort of IDE for Haskell to help automate certain things, like refactoring. I'm a long time fan of emacs, but the more I use emacs the more I see that it may never handle certain things well. For example, using regexp to do syntax highlighting is quick and easy it's also the source of many of the problems with using emacs for coding in Haskell. The indentation is off, block uncomment is not the inverse of block comment, if you use a string like "{-" it throws off the highlighting until a matching -} is found and so on. My advice would be to download the darcs source code and try to use darcs with EclipseFP. You'll see first hand some things that could use some fix'n :) And I think I could stand to use eclipse to test out your changes if you need a tester, but I doubt I'd have much more time to spare than testing.
Of course, you need to write the code to tell the platform about your language. That's what the EclipseFP team is trying to do.
Yes, and I'm very happy to see someone doing this. I wish you the best of luck and when the problems I encountered are fixed I will try eclipse again. Hopefully my rantings will be helpful to you and not make you lose hope :) I really want see you succeed. Thanks, Jason

Jason,
2006/2/2, dagit@eecs.oregonstate.edu
I think it's important to keep this aspect, the ramping up and the integration. Particularly, I'm against tools that want to do things their way.
Me too. Let's focus on some of the problems you found.
I wanted to use EclipseFP to help with darcs development.
That is indeed a very happy coincidence. Our main test source was the darcs source code. For instance, the main change on the last release was the parser rewrite (this leads to very interesting results, keep with me). One of the requirements we have imposed on ourselves was to only "officially" release the parser when it was able to parse all darcs source code (all hs and lhs's). I think the both teams (EclipseFP and Darcs) would win a lot with a partnership. FPers could provide Darcsers a high-quality IDE and they, in return, would provide the very useful feedback from a real-world project.
One direction would be fine for now, but ultimately I would want it to let me change build settings in Eclipse and have it mirrored in the makefile. Does eclipse have a makefile plugin?
CDT (Eclipse's C/C++ IDE) has makefile support. It is able to generate makefiles and to import already-made ones. I think it is promising to take a look at that.
The next problem I encountered was the parser was not forgiving enough to parse the darcs source code, as a result everything was colored as a comment. Every file that contained "#include", "#define" or similar threw a lexical error.
This is one of the bugs fixed provided by the new parser, included on the latest (0.9.1) release. For the time being, it simply ignores those lines. Maybe we could provide better support on the feature, if it seams useful. So, I'd recommend you to try the new release. There should be better support for this issue by now.
I also noticed that when you click on an error so that eclipse will take you to the place of the error, it often took me to lines that were perfectly fine, in fact, I think it was often the wrong file.
I can't say this one is solved on the latest version. We'll need a more detailed test case to fix this one. Would you mind registering a bug on our tracking system? http://sourceforge.net/tracker/?group_id=108233&atid=649852
After I got that error, I stop using eclipse in windows and switched to OSX.
I would say this has to do with the old parser. But that's a too specific issue to discuss here.
My advice would be to download the darcs source code and try to use darcs with EclipseFP. You'll see first hand some things that could use some fix'n :) And I think I could stand to use eclipse to test out your changes if you need a tester, but I doubt I'd have much more time to spare than testing.
We would love to get any kind of help.
Hopefully my rantings will be helpful to you and not make you lose hope :) I really want see you succeed.
They are actually much helpful. EclipseFP is work in progress, and I hope it wil always be. This kind of direct feedback from our users is very much appreciated. Thank you very much, Thiago Arrais
participants (2)
-
dagit@eecs.oregonstate.edu
-
Thiago Arrais