Opened 2 years ago

Closed 2 years ago

Last modified 4 months ago

#10938 closed bug (duplicate)

DeriveAnyClass + deriving Bifunctor causes GHC panic

Reported by: erantapaa Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 7.10.2
Keywords: deriving Cc: dreixel
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: #9968 Differential Rev(s):
Wiki Page:

Description

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:

{-# LANGUAGE DeriveAnyClass #-}

module Foo where

import Data.Bifunctor

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

Change History (4)

comment:1 Changed 2 years ago by thomie

Cc: dreixel added
Component: CompilerCompiler (Type checker)

Reproducable with HEAD (ghc-7.11.20151002).

comment:2 Changed 2 years ago by thomie

Operating System: MacOS XUnknown/Multiple

comment:3 Changed 2 years ago by dreixel

Resolution: duplicate
Status: newclosed

Thanks for reporting, but this is already reported as #9968.

comment:4 Changed 4 months ago by RyanGlScott

Keywords: deriving added; DeriveAnyClass removed
Note: See TracTickets for help on using tickets.