[GHC] #15789: GHC panic using visible kind applications and a higher-rank kind

#15789: GHC panic using visible kind applications and a higher-rank kind -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Using visible kind applications (#12045): {{{#!hs {-# Language LiberalTypeSynonyms #-} {-# Language PolyKinds #-} {-# Language RankNTypes #-} {-# Language DataKinds #-} import Data.Kind type Cat ob = ob -> ob -> Type data Zero :: forall (cat :: forall xx. xx -> Type) a. forall b. Cat (forall b. cat b u) }}} {{{ $ ghci -ignore-dot-ghci 546_bug.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 546_bug.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_a1yl} 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/15789 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15789: GHC panic using visible kind applications and a higher-rank kind -------------------------------------+------------------------------------- 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): this also fails: {{{#!hs {-# Language LiberalTypeSynonyms #-} {-# Language PolyKinds #-} {-# Language RankNTypes #-} {-# Language DataKinds #-} import Data.Kind data Zero :: forall (f :: forall xx. (forall yy. yy -> Type) -> Type). f a }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15789#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15789: GHC panic using visible kind applications and a higher-rank kind -------------------------------------+------------------------------------- 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: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: Old description:
Using visible kind applications (#12045):
{{{#!hs {-# Language LiberalTypeSynonyms #-} {-# Language PolyKinds #-} {-# Language RankNTypes #-} {-# Language DataKinds #-}
import Data.Kind
type Cat ob = ob -> ob -> Type
data Zero :: forall (cat :: forall xx. xx -> Type) a. forall b. Cat (forall b. cat b u) }}}
{{{ $ ghci -ignore-dot-ghci 546_bug.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 546_bug.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_a1yl} 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
}}}
New description: Using visible kind applications (#12045): {{{#!hs {-# Language LiberalTypeSynonyms #-} {-# Language PolyKinds #-} {-# Language RankNTypes #-} {-# Language DataKinds #-} import Data.Kind type Cat ob = ob -> ob -> Type data Zero :: forall (cat :: forall xx. xx -> Type) a. forall b. Cat (forall b. cat b u) }}} {{{ $ ghci -ignore-dot-ghci 546_bug.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 546_bug.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_a1yl} 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/15789#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15789: GHC panic using visible kind applications and a higher-rank kind -------------------------------------+------------------------------------- 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 goldfire): * cc: mnguyen (removed) * keywords: => TypeInType Comment: This also fails without visible kind application -- any DEBUG compiler will trigger it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15789#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15789: GHC panic using visible kind applications and a higher-rank kind -------------------------------------+------------------------------------- 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): I have a fix for this -- as part of #15809 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15789#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15789: GHC panic using visible kind applications and a higher-rank kind
-------------------------------------+-------------------------------------
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

#15789: GHC panic using visible kind applications and a higher-rank kind -------------------------------------+------------------------------------- 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/T15789 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => polykinds/T15789 * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15789#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC