Opened 10 years ago

Closed 10 years ago

Last modified 45 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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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

Compile using:
ghc -c -fth Bug.hs

Result:
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-
[email protected],
or http://sourceforge.net/projects/ghc/.

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 10 years ago by simonpj

Logged In: YES 
user_id=50165

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

Simon

comment:2 Changed 10 years ago by wthaller

Logged In: YES 
user_id=566359

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 
directory)

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

Wolfgang

comment:3 Changed 10 years ago by simonpj

Logged In: YES 
user_id=50165

Urk.  A typo.  Fixed again!

comment:4 Changed 10 years ago by simonpj

  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.