[GHC] #13297: Panic when deriving Applicative instance through transformer

#13297: Panic when deriving Applicative instance through transformer -------------------------------------+------------------------------------- Reporter: blaze | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I'm not sure if code below is valid, but panic is wrong anyway. {{{#!hs {-# Language TypeFamilies, StandaloneDeriving, GeneralizedNewtypeDeriving, UndecidableInstances #-} module Example where newtype N p m a = N (((CT p) m) a) deriving instance (CT p ~ f, Functor (f m)) => Functor (N p m) deriving instance (CT p ~ f, Applicative (f m)) => Applicative (N p m) -- panic when this line added class C p where type CT p :: (* -> *) -> * -> * }}} Compiler output for 8.0.1 and 8.0.2 is slightly different: {{{ test.hs:6:1: error:ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): No skolem info: f1_auk[sk] }}} {{{ test.hs:6:1: error:ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): No skolem info: f1_aun[sk] }}} If I try to derive only Functor instance, code compiles just fine. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13297 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13297: Panic when deriving Applicative instance through transformer
-------------------------------------+-------------------------------------
Reporter: blaze | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#13297: Panic when deriving Applicative instance through transformer -------------------------------------+------------------------------------- Reporter: blaze | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Compile-time | Test Case: crash or panic | deriving/should_compile/T13297 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => deriving/should_compile/T13297 * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13297#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC