[Haskell-cafe] breaking too long lines

Claus Reinke claus.reinke at talk21.com
Sat Apr 25 10:24:03 EDT 2009

> * with practically every modern IDE (say, Eclipse for Java), indentation is a
> non-issue. 

How so? In future IDEs, source code might just be a view on an internal
representation, but we've have that kind of IDE in the past, and some users
developed a definite dislike to tools that wouldn't let them adjust layout to
whatever they thought best suited to the task at hand.

Unless you mean semantics-based editing, where the IDE should be
able to compensate for unwanted side-effects of, say, renaming, or adding/
removing parameters, without resorting to just pretty-printing everything.

But as long as programmers need to resort to text editing, IDEs can at
best guess their intentions, and some layout styles will be less prone than
other to needing adjustments after typical editing tasks.

> * indentation should be by fixed amounts (e.g. 4 spaces for each level)
> and not depend on lengths of identifiers (because you might later change
> them)
> (well, actually you won't because we don't have Refactor->Rename
> that would be aware of namespaces, modules etc.)

I hasn't been maintained for quite a while, and was only Haskell'98,
but Renaming was the first refactoring implemented in HaRe, and 
HaRe was module-aware from about version 0.2:


HaRe also adjusted indentation if Rename changed identifier lengths.
According to its homepage, support for hierarchical modules was added
in version 0.3 (the language concept, not the hierarchical libraries code 
tended to depend on even then, let alone the cabal/hackage of today)

More information about the Haskell-Cafe mailing list