Pattern matching on Word literals in GHCi crashes.
GHCi 6.10.4 seems to be crashing with "impossible happened" when loading the program bellow. The problem seems to be related to pattern matching on Word literals, as it does not seem to happen if I change Word to Int.
module Bug where
import Data.Word(Word)
bug :: Word -> Bool
bug x = case x of
0 -> True
_ -> False
Output:
GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.4 for x86_64-unknown-linux):
schemeE(AnnCase).my_discr __word 0
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
-Iavor
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |