Language.Haskell.Parser and layout rules

Mike Gunter m at ryangunter.com
Fri Feb 18 20:10:17 EST 2005


Hmm.  I find both examples significantly more difficult to read for
lack of standard indentation (the first more so than the second).  I'd
prefer my compiler to disallow such.

	mike


John Meacham <john at repetae.net> writes:

> I think of this as a very useful feature. it should be documented in the
> extensions section. mainly, I find it very useful in two circumstances:
>
> short circuit return:
>
> main = do
>         foo 
>         if bar then return baz else do
>         whizz 
>         bang
>
> with declarations
>
> main = do
>         withCString x $ \x' -> do
>         withCString y $ \y' -> do
>         c_func x' y'
>
>     John


More information about the Libraries mailing list