#7516 closed bug (fixed)

GHC panic

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by simonpj)

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

Change History (2)

comment:1 Changed 16 months ago by simonpj

  • Description modified (diff)
  • Difficulty set to Unknown

comment:2 Changed 16 months ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

Thanks; this is a duplicate of #7183, now fixed.

Note: See TracTickets for help on using tickets.