[GHC] #15817: Visible kind application + data family = GHC panic, ‘impossible’ happened

#15817: Visible kind application + data family = GHC panic, ‘impossible’ happened -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Keywords: | Operating System: Unknown/Multiple TypeApplications | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# Language RankNTypes #-} {-# Language TypeApplications #-} {-# Language PolyKinds #-} {-# Language KindSignatures #-} {-# Language TypeFamilies #-} data family Pair :: forall a. forall b. * data instance Pair @a @b = MkPair a b }}} {{{ $ ghci -ignore-dot-ghci 593_bug.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 593_bug.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181017 for x86_64-unknown-linux): ASSERT failed! kind axiom D:R:Pairabab0 :: forall a b (a :: a) (b :: b). Pair = R:Pairabab -- Defined at 593_bug.hs:8:15 forall k k (a :: k) (b :: k). * forall a b -> a -> b -> * Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable pprPanic, called at compiler/utils/Outputable.hs:1219:5 in ghc:Outputable assertPprPanic, called at compiler/typecheck/FamInst.hs:158:61 in ghc:FamInst Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15817 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15817: Visible kind application + data family = GHC panic, ‘impossible’ happened -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * keywords: TypeApplications => TypeInType * cc: mnguyen (removed) Comment: Minimized example that compiles fine on GHC 8.6.1 but fails on HEAD {{{#!hs {-# Language RankNTypes #-} {-# Language PolyKinds #-} {-# Language TypeFamilies #-} data family X :: forall (a :: *). * data instance X = MkX }}} {{{ $ ghci-stage2 -ignore-dot-ghci --interactive ~/hs/593_bug.hs GHCi, version 8.7.20181025: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /home/baldur/hs/593_bug.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181025 for x86_64-unknown-linux): ASSERT failed! kind axiom D:R:Xa0 :: X = R:Xa -- Defined at /home/baldur/hs/593_bug.hs:6:15 forall a. * * -> * Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable pprPanic, called at compiler/utils/Outputable.hs:1219:5 in ghc:Outputable assertPprPanic, called at compiler/typecheck/FamInst.hs:158:61 in ghc:FamInst Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} so it does not actually depend on VKA. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15817#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15817: Data family quantification = GHC panic, ‘impossible’ happened -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15817#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15817: Data family quantification = GHC panic, ‘impossible’ happened -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): #15874 is another example -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15817#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15817: Data family quantification = GHC panic, ‘impossible’ happened
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#15817: Data family quantification = GHC panic, ‘impossible’ happened -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: fixed | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | polykinds/T15817 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => polykinds/T15817 * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15817#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC