Re: DoAndIfThenElse

2009-11-27 Thread Christian Maeder
S. Doaitse Swierstra schrieb: [..] \begin{code} main = do if True then putStrLn 1; else putStrLn 2 \end{code} This does also not work with hugs (; at the end) This does not work since now you have two ;'s; one because you wrote one and one because you did not indent the else. Allowing

DoAndIfThenElse

2009-11-26 Thread Christian Maeder
Hi, seeing Haskell 2010 and http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse saying: Compiler support ¶ GHC full (no flag) I wonder why I still get a parse error (possibly incorrect indentation) for: \begin{code} main = do if True then putStrLn 1 else putStrLn 2 \end

Re: DoAndIfThenElse

2009-11-26 Thread David Virebayre
On Thu, Nov 26, 2009 at 10:29 AM, Christian Maeder christian.mae...@dfki.de wrote: I wonder why I still get a parse error (possibly incorrect indentation) for: \begin{code} main = do if True then putStrLn 1 else putStrLn 2 \end{code} Isn't the proposal about : \begin{code} main = do

Re: DoAndIfThenElse

2009-11-26 Thread Ian Lynagh
Hi Christian, On Thu, Nov 26, 2009 at 10:29:10AM +0100, Christian Maeder wrote: seeing Haskell 2010 and http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse saying: Compiler support ¶ GHC full (no flag) I wonder why I still get a parse error (possibly incorrect

Re: DoAndIfThenElse

2009-11-26 Thread Christian Maeder
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