[GHC] #2033: GHC-6.9 panics rather than parse error, related to view patterns.

GHC trac at galois.com
Fri Jan 11 14:10:26 EST 2008


#2033: GHC-6.9 panics rather than parse error, related to view patterns.
-------------------------+--------------------------------------------------
    Reporter:  apeacock  |       Owner:         
        Type:  bug       |      Status:  new    
    Priority:  normal    |   Milestone:         
   Component:  Compiler  |     Version:  6.9    
    Severity:  normal    |    Keywords:         
  Difficulty:  Unknown   |    Testcase:         
Architecture:  x86       |          Os:  Windows
-------------------------+--------------------------------------------------
 Try to compile the below program, ghc panics rather than giving a parse
 error (in the program I was trying to write, wrapper's argument should be
 a lambda function).

 main = do
   wrapper (_ -> putStrLn "_")

 wrapper :: (String -> IO ()) -> IO ()
 wrapper f = f ""

 Output:

 [1 of 1] Compiling Main             ( Test.hs, interpreted )
 : panic! (the 'impossible' happened)
   (GHC version 6.9.20071111 for i386-unknown-mingw32):
         rnExpr: unexpected expression: panic! (the 'impossible' happened)
   (GHC version 6.9.20071111 for i386-unknown-mingw32):
         hsSyn/HsExpr.lhs:(320,0)-(467,72): Non-exhaustive patterns in
 functi
 pr_expr

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


More information about the Glasgow-haskell-bugs mailing list