[GHC] #8936: Irrefutable pattern failed in ghc 7.4.1

GHC ghc-devs at haskell.org
Mon Mar 31 10:23:54 UTC 2014


#8936: Irrefutable pattern failed in ghc 7.4.1
---------------------------------+----------------------------------
        Reporter:  gahuber95     |            Owner:
            Type:  bug           |           Status:  closed
        Priority:  normal        |        Milestone:  7.6.1
       Component:  Compiler      |          Version:  7.4.1
      Resolution:  duplicate     |         Keywords:
Operating System:  Linux         |     Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown  |       Difficulty:  Unknown
       Test Case:                |       Blocked By:
        Blocking:                |  Related Tickets:
---------------------------------+----------------------------------
Changes (by hvr):

 * cc: hvr (removed)
 * component:  GHCi => Compiler
 * milestone:   => 7.6.1


Old description:

> Thanks for your attention!  Gary (newbie)
>
> ##########################################
> class Show a => Show_Listable a where
>   show_list ::  [a] -> IO()
>

> instance Show_Listable a -> Show a where
>   show_list lst = do
>     print "gen list";
>     print lst
>
> lst :: Int -> [Int]
> lst i = [1,2,3]
>
> main = do
>     show_list (lst 1)
>
> ######################################################
> Output:
>
> $ ghc bull.hs -o bull
> [1 of 1] Compiling Main             ( bull.hs, bull.o )
> ghc: panic! (the 'impossible' happened)
>   (GHC version 7.4.1 for x86_64-unknown-linux):
>         compiler/rename/RnSource.lhs:429:14-81: Irrefutable pattern
> failed for pattern Data.Maybe.Just (inst_tyvars,
>                                                         _,
>                                                         SrcLoc.L _ cls,
>                                                         _)
>

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

New description:

 Thanks for your attention!  Gary (newbie)

 {{{#!haskell
 class Show a => Show_Listable a where
   show_list ::  [a] -> IO()


 instance Show_Listable a -> Show a where
   show_list lst = do
     print "gen list";
     print lst

 lst :: Int -> [Int]
 lst i = [1,2,3]

 main = do
     show_list (lst 1)
 }}}

 Output:

 {{{
 $ ghc bull.hs -o bull
 [1 of 1] Compiling Main             ( bull.hs, bull.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.4.1 for x86_64-unknown-linux):
         compiler/rename/RnSource.lhs:429:14-81: Irrefutable pattern failed
 for pattern Data.Maybe.Just (inst_tyvars,
                                                         _,
                                                         SrcLoc.L _ cls,
                                                         _)


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

--

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


More information about the ghc-tickets mailing list