[GHC] #5961: GHC panic (nameModule) on malformed deriving clause

GHC cvs-ghc at haskell.org
Fri Mar 23 12:21:14 CET 2012


#5961: GHC panic (nameModule) on malformed deriving clause
--------------------------------+-------------------------------------------
 Reporter:  Philonous           |          Owner:                  
     Type:  bug                 |         Status:  new             
 Priority:  normal              |      Component:  Compiler        
  Version:  7.4.1               |       Keywords:                  
       Os:  Linux               |   Architecture:  Unknown/Multiple
  Failure:  Compile-time crash  |       Testcase:                  
Blockedby:                      |       Blocking:                  
  Related:                      |  
--------------------------------+-------------------------------------------
 Trying to derive a classname starting with a lower case letter and wrapped
 in parenthesis will lead to a ghc panic instead of generating an error

 minimal testcase:

 {{{
 module Foo where
 data Foo = Foo deriving (abc)
 }}}

 output:

 {{{
 [1 of 1] Compiling Foo              ( scratch3.hs, scratch3.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.4.1 for x86_64-unknown-linux):
         nameModule abc{tv a9I}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 }}}

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



More information about the Glasgow-haskell-bugs mailing list