Skip to content

panic when using function in 'deriving' data declaration

Hello. I haven't found any matching bugs for this. To reproduce:

  1. Start up ghci

  2. Enter something like the following, which contains a typo 'show' instead of 'Show'.

data Test = Yes | No deriving (show, Eq)
  1. ghci will panic saying:
Prelude> data Test = Yes | No deriving (show, Eq)
ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.2 for i386-unknown-linux):
	nameModule show{tv aa0}

Notes:

  • The 'show' can be substituted with any other function name
  • It also happens on x86_64.
  • It also happens when putting such a line into a .hs file and trying to compile it
Trac metadata
Trac field Value
Version 7.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information