[Haskell-cafe] Editors for Haskell

Daniel McAllansmith dm.maillists at gmail.com
Tue May 30 20:19:40 EDT 2006

On Wednesday 31 May 2006 11:32, George Beshers wrote:
> Well, my thesis (many moons ago I assure you) was on syntax
> directed editors.  I came to the conclusion that letting the user
> do what they want is a requirement, but that "heuristics" and
> other "smarts" were to be avoided on the grounds that at least
> for my implementation they were more trouble than they were
> worth.  Thus I would avoid error correcting parsers unless you
> are very confident that the correction used is at least type-safe
> and that it is not "sticking things in" that are unwanted
> (or even more maddening removing what I just typed and
> which **was** what I wanted).

I certainly agree.  I've ended up loathing any editor which unilaterally 
decides to change what I've typed.  That _might_ be because they weren't done 
properly... maybe.

> So my recommendation is that pointing out where the syntax
> and typing errors are without having to leave the editor
> would be great.  Then the time required to actually make the
> corrections is minimal in terms of overall development time.

It might have been mentioned before but I think IntelliJ's 'Idea' does an 
excellent job as a java editor.  It'd be worth looking at for... ideas, as it 
It doesn't automatically correct anything, when it detects an error it makes 
it obvious by highlighting the offending code, putting marks on the scrollbar 
and colouring an indicator.
When the cursor is on an error you can hit a key-combo to bring up a list of 
potential remedial actions.

> The "interesting" (graveyard laugh) problems revolve around
> editing a library and the program that uses it at the same time
> with a few obvious extensions.  The "graveyard laugh" is because
> I rapidly found I needed transactions and as the implementation
> was in C++ it had some very nasty pointer issues going to and
> from disk.  Performance was also an issue --- but that was a
> a pre-sparc  SUN, M68020 w/ 4Meg of RAM if memory serves
> me correctly.

Idea is, more or less, transactional.  It's 'refactorings' can affect multiple 
entities, and they're stored in a local history so you can rollback when you 
want to.
I'm not sure it'd run too well on that sort of machine though. :)

For what it's worth, I'd love a Haskell editor the likes of Idea (and better).  
Lots of refactory-goodness, auto-importing of functions, function suggestion 
from type, display of inferred types, etc, etc, etc


More information about the Haskell-Cafe mailing list