Ticket #7516 (closed bug: fixed)

Opened 5 months ago

Last modified 5 months ago

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) (diff)

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

Changed 5 months ago by simonpj

  • difficulty set to Unknown
  • description modified (diff)

Changed 5 months ago by simonpj

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.