[GHC] #7614: tc_hs_type: bang : The impossible happened

GHC cvs-ghc at haskell.org
Tue Jan 22 21:03:34 CET 2013


#7614: tc_hs_type: bang : The impossible happened
-------------------------------+--------------------------------------------
Reporter:  erikd               |          Owner:                  
    Type:  bug                 |         Status:  new             
Priority:  normal              |      Component:  Compiler        
 Version:  7.6.1               |       Keywords:                  
      Os:  Unknown/Multiple    |   Architecture:  Unknown/Multiple
 Failure:  Compile-time crash  |      Blockedby:                  
Blocking:                      |        Related:                  
-------------------------------+--------------------------------------------
 A simple data structure with bang patterns like the following:

 {{{
 data MyType
     = MyType
         { a :: !Int
         , b :: !Maybe Int
         }
 }}}

 results in:

 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.6.1 for x86_64-unknown-linux):
         tc_hs_type: bang
 }}}

 Adding parentheses around the "Maybe Int" like this:

 {{{
 data MyType
     = MyType
         { a :: !Int
         , b :: !(Maybe Int)
         }
 }}}

 is accepted, but it would be nice if the former example printed a syntax
 error or some sort of other warning rather than just a panic.

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



More information about the ghc-tickets mailing list