Opened 7 years ago

Closed 7 years ago

#7197 closed bug (duplicate)

ghc panic: Irrefutable pattern failed

Reported by: illusionoflife Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc: gcc (GCC) 4.7.1
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

I get following error, when trying to compile following snippet:

module BooleanFunction where

class BooleanFunction a where
  arity :: a -> Int

instance BooleanFunction Bool where
  arity _ = 0
instance BooleanFunction a => BooleanFunction  Bool -> a where
  arity _ = 1 + arity a
[1 of 1] Compiling BooleanFunction  ( BooleanFunction.hs, BooleanFunction.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.2 for x86_64-unknown-linux):
        compiler/rename/RnSource.lhs:430: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

Change History (1)

comment:1 Changed 7 years ago by simonpj

difficulty: Unknown
Resolution: duplicate
Status: newclosed

Thanks. Always worth searching Trac first... this is just a dup of #7093, #7079, #7039, #6051. Already fixed, happily.

Note: See TracTickets for help on using tickets.