Opened 11 years ago

Closed 11 years ago

#864 closed bug (fixed)

-fgenerics bug

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.4.2
Keywords: Cc:
Operating System: MacOS X Architecture: powerpc
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I've discovered a simple fgenerics program that GHC doesn't like. Compiler output is as follows:

$ ghc --make gen-bug.hs Chasing modules from: gen-bug.hs Compiling Main ( gen-bug.hs, gen-bug.o ) ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):

TcClassDecl: Type Application!

Please report this as a compiler bug. See:

Attachments (1)

gen-bug.hs (565 bytes) - added by guest 11 years ago.
Simple fgenerics program that demonstrates the bug

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by guest

Attachment: gen-bug.hs added

Simple fgenerics program that demonstrates the bug

comment:1 Changed 11 years ago by simonpj

Resolution: fixed
Status: newclosed

Good point. The derivable-type-class mechanism isn't capable of handling higher-rank method types, I'm afraid. (And much else besides!) Sorry.

I've fixed the compiler so that it fails more gracefully; crashing is definitely a bug.

Thanks for pointing this out.

Test is tcfail163.hs


Note: See TracTickets for help on using tickets.