Opened 9 years ago

Closed 9 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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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:

http://www.haskell.org/ghc/reportabug

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by guest

Simple fgenerics program that demonstrates the bug

comment:1 Changed 9 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

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

Simon

Note: See TracTickets for help on using tickets.