[GHC] #9305: GHC panic when deriving Functor on a Fixed type

#9305: GHC panic when deriving Functor on a Fixed type -----------------------------------+--------------------------------------- Reporter: andreyLevushkin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: Compile-time crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -----------------------------------+--------------------------------------- Building the following {{{ #!haskell {-# LANGUAGE DeriveFunctor#-} module Main where data Event a b = Event a deriving (Functor) newtype F f = F (f (F f)) data EventF a = EventF (F (Event a)) deriving (Functor) }}} results in {{{ Main.hs:7:48:ghc: panic! (the 'impossible' happened) (GHC version 7.8.2 for x86_64-unknown-linux): Prelude.(!!): index too large }}} I am not sure if the above code should actually compile but it probably shouldn't panic. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9305 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9305: GHC panic when deriving Functor on a Fixed type
---------------------------------------+----------------------------------
Reporter: andreyLevushkin | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: Compile-time crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
---------------------------------------+----------------------------------
Comment (by Joachim Breitner

#9305: GHC panic when deriving Functor on a Fixed type ---------------------------------------+---------------------------------- Reporter: andreyLevushkin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: T9305 | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by nomeata): * testcase: => T9305 Comment: I get {{{ T9305.hs:8:48: No instance for (Functor Event) arising from the first field of ‘EventF’ (type ‘F (Event a)’) Possible fix: use a standalone 'deriving instance' declaration, so you can specify the instance context yourself When deriving the instance for (Functor EventF) }}} when trying with GHC head. I’m not quite sure if its the best error message, but it looks better than what you report, hence adding it as a (non-broken) test case. If convenient, can you check if it still happens with 7.8.3? Might be an already fixed and merged bug. Otherwise we should identify the fix and merge it for 7.8.4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9305#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9305: GHC panic when deriving Functor on a Fixed type ---------------------------------------+---------------------------------- Reporter: andreyLevushkin | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: T9305 | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by monoidal): * status: new => closed * resolution: => duplicate Comment: This is already fixed in 7.8.3 (#9071, #9255) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9305#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9305: GHC panic when deriving Functor on a Fixed type ---------------------------------------+---------------------------------- Reporter: andreyLevushkin | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: T9305 | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by andreyLevushkin): Yes, appears to be fixed in 7.8.3. I get the same output as you. Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9305#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC