[GHC] #984: Syntax error shows in the wrong position

GHC cvs-ghc at haskell.org
Mon Jan 21 02:11:15 CET 2013


#984: Syntax error shows in the wrong position
-------------------------------------+--------------------------------------
    Reporter:  guest                 |       Owner:                  
        Type:  bug                   |      Status:  new             
    Priority:  low                   |   Milestone:  _|_             
   Component:  Compiler (Parser)     |     Version:  6.4.2           
    Keywords:  syntax parse case do  |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple      |     Failure:  None/Unknown    
  Difficulty:  Unknown               |    Testcase:  N/A             
   Blockedby:                        |    Blocking:                  
     Related:                        |  
-------------------------------------+--------------------------------------
Changes (by morabbin):

  * failure:  => None/Unknown


Comment:

 Confirmed behavior is still in GHC 7.6.1:
 {{{
 Orac:~/work/ghc $ cat > test.hs
 f _ = do
         x <- computation
         case () of
                 _ ->
                         result <- computation
                         case () of () -> undefined
 Orac:~/work/ghc $ ghci test.hs
 GHCi, version 7.6.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 [1 of 1] Compiling Main             ( test.hs, interpreted )

 test.hs:3:9: Parse error in pattern: case () of { _ -> result }
 Failed, modules loaded: none.
 Prelude>
 }}}
 Mark as dup of #459?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/984#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list