#3775: Pattern matching on Word literals in GHCi crashes.
-------------------------------+--------------------------------------------
Reporter: diatchki | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 6.10.4 | Keywords:
Os: Linux | Testcase:
Architecture: x86_64 (amd64) | Failure: GHCi crash
-------------------------------+--------------------------------------------
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
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3775>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs