Editor Tab Expansion
Ketil Z. Malde
ketil@ii.uib.no
06 Dec 2002 09:50:33 +0100
John Meacham <john@repetae.net> writes:
> rather than start layout blocks right after the 'let' 'do' or 'where',
> put them on the next line with one more tabstop than the current
> line.
I've also a bit baffled by all the people apparently struggling with
layout; I realize the rules are a bit complex, but it's something that
"just works" for me.
But then I also use this convention, (except in really simple cases:
f x = let y = g x in h y
f x = h y where y = g x
(It could be because I use Emacs, though, where the hs mode has TAB
cycling through the possible indentations.)
> this makes your code independent of the tabstop and much easier to work
> with IMHO.
Also it is safer if you are using non-ASCII characters, e.g.
f \x06de = case \x06de of foo -> bar
blah -> -- where to align this?
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants