Opened 5 years ago

Closed 5 years ago

#7252 closed bug (duplicate)

Impossible error when deriving lower-cased type class (nameModule show{tv a9Y})

Reported by: sfogarty Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I had a student who incorrectly typed 'deriving (show)' instead of 'deriving (Show)', and got a very interesting error, as shown below. It happens in both ghc and ghci. The file should of course be rejected, but perhaps with a different error message.

$ cat Bug.hs module Types where data FuelEfficiency = MPG Float | LPHK Float deriving (show) $ ghc Bug.hs [1 of 1] Compiling Types ( Bug.hs, Bug.o ) ghc: panic! (the 'impossible' happened)

(GHC version 7.4.2 for x86_64-unknown-linux):

nameModule show{tv a9Y}

Change History (1)

comment:1 Changed 5 years ago by guest

Resolution: duplicate
Status: newclosed

This is already fixed in GHC 7.6, bug #5961.

Note: See TracTickets for help on using tickets.