#4234: GHC 6.13 doesn't support Haskell 2010's DoAndIfThenElse feature.
---------------------------------+------------------------------------------
    Reporter:  shelarcy          |       Owner:                   
        Type:  bug               |      Status:  new              
    Priority:  normal            |   Component:  Compiler (Parser)
     Version:  6.13              |    Keywords:                   
    Testcase:                    |   Blockedby:                   
          Os:  Unknown/Multiple  |    Blocking:                   
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown     
---------------------------------+------------------------------------------
 GHC doesn't accept DoAndIfThenElse feature's sample code.

 {{{
 foo :: Monad m => Bool -> m Int
 foo x = do
     if x then
         return 1
     else
         return 2
 }}}

 This code causes parse error.

 {{{
 Prelude> :load Test
 [1 of 1] Compiling Main             ( Test.hs, interpreted )

 Test.hs:5:4: parse error (possibly incorrect indentation)
 Failed, modules loaded: none.
 }}}

 Now, GHC support Haskell 2010 in HEAD ( #4098 ). So, GHC must accept above
 program.

 See also: #2259

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4234>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to