[GHC] #10938: DeriveAnyClass + deriving Bifunctor causes GHC panic

GHC ghc-devs at haskell.org
Wed Oct 7 04:19:02 UTC 2015


#10938: DeriveAnyClass + deriving Bifunctor causes GHC panic
-------------------------------------+-------------------------------------
           Reporter:  erantapaa      |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.2
           Keywords:                 |  Operating System:  MacOS X
  DeriveAnyClass                     |
       Architecture:  x86_64         |   Type of failure:  Compile-time
  (amd64)                            |  crash
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |
-------------------------------------+-------------------------------------
 Attempting the derive Bifunctor with DeriveAnyClass caused this message
 from GHC:

 {{{
 $ ghc Foo.hs
 [1 of 1] Compiling Foo              ( Foo.hs, Foo.o )
 Var/Type length mismatch:
   [a_an7, b_an8]
   []
 Var/Type length mismatch:
   [a_an7, b_an8]
   []
 Var/Type length mismatch:
   [a_an7, b_an8]
   []

 Foo.hs:8:13:ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.2 for x86_64-apple-darwin):
         tcTyVarDetails a_an7

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

 The code:

 {{{#!hs
 {-# LANGUAGE DeriveAnyClass #-}

 module Foo where

 import Data.Bifunctor

 data Blah a b = A a | B b
   deriving (Bifunctor)
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10938>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list