ghc panic: Irrefutable pattern failed
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
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | gcc (GCC) 4.7.1 |
Operating system | |
Architecture |