Opened 12 years ago

Closed 12 years ago

Last modified 48 years ago

#428 closed bug (Fixed)

Template Haskell panic with class names

Reported by: wthaller Owned by: simonpj
Priority: normal Milestone:
Component: Template Haskell Version: 6.4
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


File Bug.hs:
module Bug where
foo = ''Show

Compile using:
ghc -c -fth Bug.hs

ghc-6.4.1: panic! (the `impossible' happened, GHC version 6.4.1):
        lookupDeprec GHCziShow.Show{tc 2h}

Please report it as a compiler bug to glasgow-haskell-,

The panic does not happen if the type class or one of its method is 
actually used in the same module.

Change History (4)

comment:1 Changed 12 years ago by simonpj

Logged In: YES 

Good point. I'd fixed this in the HEAD but not the 6.4 branch.


comment:2 Changed 12 years ago by wthaller

Logged In: YES 

The fix causes more problems:

$ cat THClassName.hs 
module THClassName where

class Foo a

baz = ''Foo

$ ghc -c -fth THClassName.hs 
Bad interface file: THClassName.hi
    THClassName.hi: openBinaryFile: does not exist (No such file or 

It tries to load the .hi file that doesn't yet exist, which it probably 
shouldn't do.


comment:3 Changed 12 years ago by simonpj

Logged In: YES 

Urk.  A typo.  Fixed again!

comment:4 Changed 12 years ago by simonpj

Status: assignedclosed
Note: See TracTickets for help on using tickets.