[Haskell-cafe] Problems with do notation
Henning Thielemann
lemming at henning-thielemann.de
Thu Nov 22 06:25:25 EST 2007
On Thu, 22 Nov 2007, Peter Verswyvelen wrote:
> worksFine =
> if True
> then putStrLn "True"
> else putStrLn "False"
>
> worksNOT = do
> if True
> then putStrLn "True"
> else putStrLn "False"
>
> worksAgain = do
> if True
> then putStrLn "True"
> else putStrLn "False"
>
> Of course the worksFine function returns an IO action, so has different
> behavior, but I mean the indentation is different. Is this by design?
That's somehow related to:
http://www.haskell.org/pipermail/haskell-prime/2006-October/001771.html
More information about the Haskell-Cafe
mailing list