Cannot derive (show) from this expression

haskell

Solution

Type classes start with upper case letters, so that should be `Show`, not `show`. Though, GHC should be giving you a decent error message instead of panicking, so that part is indeed a bug.

Problem

This code doesn't work ``` data Expression = Atom String | Sequence [Expression] deriving (show) ``` I get this error: ``` $ runghc bug.hs ghc: panic! (the 'impossible' happened) (GHC version 7.4.1 for x86_64-apple-darwin): nameModule show{tv a9J} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug ``` Am I doing something wrong, or is it indeed a bug?

Original source