Ticket #2394 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

deriving instance Data (a->b) leads to 'impossible' error instead of "can't do" message

Reported by: claus Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: deriving/should_fail/T2394 Blocked By:
Blocking: Related Tickets:

Description

$ cat Data.hs
{-# OPTIONS_GHC -fglasgow-exts #-}
import Data.Generics(Data)

deriving instance (Data a,Data b) => Data (a->b)

$ ghc --make Data.hs
[1 of 1] Compiling Main             ( Data.hs, Data.o )

Data.hs:4:0:ghc.exe: panic! (the 'impossible' happened)
  (GHC version 6.9.20080514 for i386-unknown-mingw32):
        newTyConEtadRhs ghc-prim:GHC.Prim.(->){(w) tc 3D}

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

Change History

Changed 4 years ago by simonpj

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed
  • testcase set to deriving/should_fail/T2394

Yes, this should fail gracefully, thanks. Fixed by

Wed Jun 25 17:02:04 BST 2008  simonpj@microsoft.com
  * Fix Trac #2394: test for non-algebraic types in standalone deriving

Simon

Changed 3 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 3 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.