
#15787: GHC panic using kind application -------------------------------------+------------------------------------- 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 GHC head at diff [https://phabricator.haskell.org/D5229 Visible kind application D5229] (#12045), bug goes away if you remove `@ob`. {{{#!hs {-# Language RankNTypes #-} {-# Language TypeApplications #-} {-# Language DataKinds #-} {-# Language PolyKinds #-} {-# Language GADTs #-} {-# Language TypeFamilies #-} import Data.Kind class RĂki (ob :: Type) where type Hom :: ob -> ob -> Type data Kl_kind :: forall ob . (ob -> ob) -> ob -> Type where Kl :: k -> Kl_kind @ob (m) k type family UnKl (kl :: Kl_kind m k) = (res :: k) where UnKl (Kl a) = a }}} {{{ $ ghci -ignore-dot-ghci 543_bug.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 543_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_a1yH} 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/15787 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler