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. - [EMAIL PROTECTED]
---------------------------------------------------------------------------
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to