Opened 9 years ago

Closed 8 years ago

#958 closed bug (fixed)

deriving Show, impossible happened

Reported by: greg@… Owned by:
Priority: normal Milestone:
Component: GHCi Version: 6.6
Keywords: Cc: greg@…
Operating System: Linux Architecture: x86
Type of failure: Test Case: tcfail169
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Here's the program (note the missing "deriving Show" clause on the Succ data type)...

data Succ a = S a
data Seq' a = Cons' a (Seq' (Succ a)) | Nil' deriving Show

...and here's the error message for 'ghci -fglasgow-exts -fallow-undecidable-instances foo.hs'...

   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for i386-unknown-linux):
	solveDerivEqns: probable loop
    (main:Main.$f1{v rLa} base:GHC.Show.Show{tc 2h} main:Main.Seq'{tc rFH} [a{tv aFR} [tv]] = [base:GHC.Show.Show{tc 2h} a{tv aFR} [tv],
											       base:GHC.Show.Show{tc 2h} (main:Main.Seq'{tc rFH} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))])
    [[base:GHC.Show.Show{tc 2h} a{tv aFR} [tv],
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} a{tv aFR} [tv]),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv]))))))))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))))))))))))),
      base:GHC.Show.Show{tc 2h} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} (main:Main.Succ{tc rFN} a{tv aFR} [tv])))))))))))))))))))]]

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Change History (1)

comment:1 Changed 8 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to tcfail169

Good bug. Fixed in the HEAD.

Ian, you could push this to the branch I think.

Simon

Note: See TracTickets for help on using tickets.