Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8936 closed bug (duplicate)

Irrefutable pattern failed in ghc 7.4.1

Reported by: gahuber95 Owned by:
Priority: normal Milestone: 7.6.1
Component: Compiler Version: 7.4.1
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by hvr)

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)


$ 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:

Change History (2)

comment:1 Changed 4 years ago by monoidal

Resolution: duplicate
Status: newclosed

Thanks for the report. This is already fixed in GHC 7.6: #5951. In instances you should use "=>", not "->" (though, this is not the only issue).

Last edited 4 years ago by monoidal (previous) (diff)

comment:2 Changed 4 years ago by hvr

Cc: hvr removed
Component: GHCiCompiler
Description: modified (diff)
Milestone: 7.6.1
Note: See TracTickets for help on using tickets.