Opened 6 months ago

Closed 5 months ago

Last modified 5 months ago

#8479 closed bug (fixed)

Generic1 crashes with tyConStupidTheta when using associated type families

Reported by: ghorn Owned by: dreixel
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Generics, Generic1 Cc: gregmainland@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: generics/T8479 Blocked By:
Blocking: Related Tickets:

Description

{-# OPTIONS_GHC -Wall #-}
{-# Language TypeFamilies #-}
{-# Language DeriveGeneric #-}

import GHC.Generics

class Blah (a :: * -> *) where
  type F a :: * -> *

data Foo (f :: * -> *) a = MkFoo ((F f) a) deriving Generic1

--data Foo a = MkFoo ((F f) a) deriving Generic1 -- also crashes

the above code crashes GHC with error:

[1 of 1] Compiling Main             ( GenericBug.hs, GenericBug.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for x86_64-unknown-linux):
	tyConStupidTheta main:Main.F{tc ro4}

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

Change History (6)

comment:1 Changed 6 months ago by simonpj

  • Owner set to dreixel

Pedro, might you look?

comment:2 Changed 6 months ago by dreixel

Yes, I was actually just looking at it right now :-)

comment:3 Changed 6 months ago by ghorn

  • Cc gregmainland@… added

comment:4 Changed 5 months ago by Jose Pedro Magalhaes <jpm@…>

In 2c74f9899ed5a99a4f6e8ea726841450c3d1211d/ghc:

fixing canDoGenerics1 (fixes #8468) (fixes #8479)

Signed-off-by: Jose Pedro Magalhaes <jpm@cs.ox.ac.uk>

comment:5 Changed 5 months ago by dreixel

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to T8479

Fixed in HEAD, thanks.

comment:6 Changed 5 months ago by simonpj

  • Test Case changed from T8479 to generics/T8479
Note: See TracTickets for help on using tickets.