DoAndIfThenElse
Christian Maeder
Christian.Maeder at dfki.de
Thu Nov 26 07:23:50 EST 2009
David Virebayre schrieb:
> Isn't the proposal about :
>
> \begin{code}
> main = do
> if True then putStrLn "1"
> ;else putStrLn "2"
> \end{code}
This should go through, too, but also does not for me according to
http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse
<cite>
Change the syntax for conditionals to
exp -> if exp1 [;] then exp2 [;] else exp3
i.e., add optional semicolons before then and else, making the above
example legal. This has been recently added to jhc, GHC and Hugs, and so
far it has not caused any problems.
</cite>
But the main purpose of the proposal was to support the notation without
";" and the indentation by at least one character.
I just do not see that it "has been recently added to GHC"
I've checked ghc-6.10.4 and 6.12.0.20091010
Cheers Christian
More information about the Haskell-prime
mailing list