[GHC] #15804: GHC panic (Visible kind application diff): data T :: (a :: k) -> *

#15804: GHC panic (Visible kind application diff): data T :: (a :: k) -> * -------------------------------------+------------------------------------- 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: -------------------------------------+------------------------------------- (using [https://phabricator.haskell.org/D5229 Visual Kind Application (D5229)]) This might be the root cause of some of my previous {{{#!hs {-# Language PolyKinds #-} data T :: (a :: k) -> * }}} {{{ $ ghci -ignore-dot-ghci 580.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 580.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181017 for x86_64-unknown-linux): ASSERT failed! Type-correct unfilled coercion hole {co_a1xI} 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/TcHsSyn.hs:1805:99 in ghc:TcHsSyn Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} on 8.6.1 this gives {{{ $ ~/.stack/programs/x86_64-linux/ghc-8.6.1/bin/ghci -ignore-dot-ghci 580.hs GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /home/baldur/hs/580.hs, interpreted ) /home/baldur/hs/580.hs:3:11: error: • Expected a type, but ‘(a :: k)’ has kind ‘k’ • In the kind ‘(a :: k) -> *’ | 3 | data T :: (a :: k) -> * | ^^^^^^^^ Failed, no modules loaded. Prelude> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic (Visible kind application diff): data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: | TypeApplications 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 RyanGlScott): It's entirely possible that this is due to some other change that was introduced between 8.6.1 and HEAD. Since you're filing bug reports about code that hasn't even shipped yet, I'd think the task falls upon you to check this :) Do you mind building GHC HEAD from `master` and seeing if this bug can be reproduced from there as well? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic (Visible kind application diff): data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: | TypeApplications 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 RyanGlScott): Actually, I should clarify my previous statement: you will never see an `ASSERT` failure on a released version of GHC, since they only appear when you build GHC with extra compile-time checks. (I'm guessing you're building with the `devel2` build flavour or something similar.) So it's not at all surprising that this doesn't fire on 8.6.1. Another possibility is that if you built 8.6.1 with `ASSERT`s enabled, then you'd also see this failure there. That would be worth a try. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic (Visible kind application diff): data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: | TypeApplications 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 Iceland_jack): Just built head and it panics the same {{{ $ ./ghc-stage2 -ignore-dot-ghci --interactive ~/hs/583.hs GHCi, version 8.7.20181025: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /home/baldur/hs/583.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181025 for x86_64-unknown-linux): ASSERT failed! Type-correct unfilled coercion hole {co_a1xI} 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/TcHsSyn.hs:1805:99 in ghc:TcHsSyn Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic (Visible kind application diff): data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: 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 RyanGlScott): * cc: mnguyen (removed) * keywords: TypeApplications => Comment: Thanks! So that confirms one thing: this is not the fault of the VKA patch. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic: data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: | TypeApplications 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 * cc: mnguyen (added) Old description:
(using [https://phabricator.haskell.org/D5229 Visual Kind Application (D5229)])
This might be the root cause of some of my previous
{{{#!hs {-# Language PolyKinds #-}
data T :: (a :: k) -> * }}} {{{ $ ghci -ignore-dot-ghci 580.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 580.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181017 for x86_64-unknown-linux): ASSERT failed! Type-correct unfilled coercion hole {co_a1xI} 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/TcHsSyn.hs:1805:99 in ghc:TcHsSyn
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
on 8.6.1 this gives
{{{ $ ~/.stack/programs/x86_64-linux/ghc-8.6.1/bin/ghci -ignore-dot-ghci 580.hs GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /home/baldur/hs/580.hs, interpreted )
/home/baldur/hs/580.hs:3:11: error: • Expected a type, but ‘(a :: k)’ has kind ‘k’ • In the kind ‘(a :: k) -> *’ | 3 | data T :: (a :: k) -> * | ^^^^^^^^ Failed, no modules loaded. Prelude> }}}
New description: This might be the root cause of some of my previous {{{#!hs {-# Language PolyKinds #-} data T :: (a :: k) -> * }}} {{{ $ ghci -ignore-dot-ghci 580.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 580.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181017 for x86_64-unknown-linux): ASSERT failed! Type-correct unfilled coercion hole {co_a1xI} 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/TcHsSyn.hs:1805:99 in ghc:TcHsSyn Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} on 8.6.1 this gives {{{ $ ~/.stack/programs/x86_64-linux/ghc-8.6.1/bin/ghci -ignore-dot-ghci 580.hs GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /home/baldur/hs/580.hs, interpreted ) /home/baldur/hs/580.hs:3:11: error: • Expected a type, but ‘(a :: k)’ has kind ‘k’ • In the kind ‘(a :: k) -> *’ | 3 | data T :: (a :: k) -> * | ^^^^^^^^ Failed, no modules loaded. Prelude> }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic: data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: 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 RyanGlScott): * cc: mnguyen (removed) * keywords: TypeApplications => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic: data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: 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 Iceland_jack): oops, edit clash -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic: data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15881 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * related: => #15881 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15804: GHC panic: data T :: (a :: k) -> *
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #15881 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#15804: GHC panic: data T :: (a :: k) -> * -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | polykinds/T15804 Blocked By: | Blocking: Related Tickets: #15881 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => polykinds/T15804 * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15804#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC