Editor Tab Expansion

John Meacham john@repetae.net
Thu, 5 Dec 2002 15:54:58 -0800


I used to run into more problems with layout until i switched to a
simple set of layout rules which make it very easy to keep everything
laid out on tab boundrys. 
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.
the end result is everything is always indented to a tab boundry and
cutting and pasting code is nice and simple. example:

main = do
	foo bar
	test
	withMVar mv $ \v -> do
		something
	done

this makes your code independent of the tabstop and much easier to work
with IMHO.
	John

more examples:
http://repetae.net/john/computer/haskell/GenUtil.hs
http://repetae.net/john/computer/haskell/Format.hs
http://repetae.net/john/computer/haskell/ErrorLog.hs

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@foo.net
---------------------------------------------------------------------------