#7516: GHC panic -------------------------------+-------------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Keywords: | Os: Unknown/Multiple Architecture: x86_64 (amd64) | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | -------------------------------+-------------------------------------------- Changes (by simonpj):
* difficulty: => Unknown Old description: > data RunLength = Single Char | Multiple (Char, Int) deriving(show) > encode' :: String -> [RunLength] > encode' [] = [] > encode' (x:xs) = if len == 1 then Single x : encode' xs else Multiple > (x, len) : encode' rest > where (first, rest) = span (==x) xs > len = length first > > [1 of 1] Compiling Main ( 99_1.hs, interpreted ) > ghc: panic! (the 'impossible' happened) > (GHC version 7.4.2 for x86_64-apple-darwin): > nameModule show{tv abq4} > > Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug > > I notice I mistyped Show as show, but I think it's better to report it > since the compiler doesnt catch the error New description: {{{ data RunLength = Single Char | Multiple (Char, Int) deriving(show) encode' :: String -> [RunLength] encode' [] = [] encode' (x:xs) = if len == 1 then Single x : encode' xs else Multiple (x, len) : encode' rest where (first, rest) = span (==x) xs len = length first [1 of 1] Compiling Main ( 99_1.hs, interpreted ) ghc: panic! (the 'impossible' happened) (GHC version 7.4.2 for x86_64-apple-darwin): nameModule show{tv abq4} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} I notice I mistyped `Show` as `show`, but I think it's better to report it since the compiler doesnt catch the error -- -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7516#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs