[GHC] #9721: RecordWildCards panic

GHC ghc-devs at haskell.org
Fri Oct 24 15:33:05 UTC 2014


#9721: RecordWildCards panic
-------------------------------------+-------------------------------------
       Reporter:  jorgemendes        |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler           |                 Version:  7.4.1
       Keywords:                     |        Operating System:  Linux
   Architecture:  x86                |         Type of failure:  Compile-
     Difficulty:  Unknown            |  time crash
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 GHC 7.4.1 (Debian 7.7 and Ubuntu 12.04.5 LTS) panics with:
 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.4.1 for i386-unknown-linux):
         compiler/rename/RnPat.lhs:535:39-79: Irrefutable pattern failed
 for pattern gres@(gre : _)
 }}}

 I found a minimal test case to exemplify this issue:

 {{{#!hs
 module Foo where

 import Bar (Bar (Bar))

 foo :: Bar -> ()
 foo Bar {..} = ()
 }}}

 {{{#!hs
 module Bar where

 data Bar = Bar { barA :: Int, barB :: Int }
 }}}

 A workaround is to import all data fields in module Foo:
 {{{#!hs
 import Bar (Bar (..))
 }}}

 I also tried this with GHC 7.6.3 (Mac OS X), with no warnings nor errors.

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


More information about the ghc-tickets mailing list